[R] Comparison of Output from "dwtest" and "durbin.watson"

Tom La Bone booboo at gforcecable.com
Mon Aug 3 02:22:50 CEST 2009


Should "dwtest" and "durbin.watson" be giving me the same DW statistic and
p-value for these two fits?


library(lmtest)
library(car)
X <- c(4.8509E-1,8.2667E-2,6.4010E-2,5.1188E-2,3.4492E-2,2.1660E-2,
	3.2242E-3,1.8285E-3)
Y <- c(2720,1150,1010,790,482,358,78,35)
W <- 1/Y^2

fit <- lm(Y ~ X - 1)
dwtest(fit,alternative="two.sided")
durbin.watson(fit,alternative="two.sided")

fit <- lm(Y ~ X - 1,weights=W)
dwtest(fit,alternative="two.sided")
durbin.watson(fit,alternative="two.sided")


Tom

-- 
View this message in context: http://www.nabble.com/Comparison-of-Output-from-%22dwtest%22-and-%22durbin.watson%22-tp24783494p24783494.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list