Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nashutoing/bf278612286b8bc730a6d342b28195e7 to your computer and use it in GitHub Desktop.
Save nashutoing/bf278612286b8bc730a6d342b28195e7 to your computer and use it in GitHub Desktop.
DWratio for requiring value2
set.seed(123)
x<- runif(100)
y<- 2*x + rnorm(100,0,0.1)
plot(x,y)
plot(y~x)
summary(lm(y~x))
anova(lm(y~x))
abline(lm(y~x))
lm.devo<- lm(y~x)
library(lmtest)
dwtest(y~x)
help("dwtest")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment