diagnostic plot 1: non constant variance
- example how a the diagnostic plot no 1 looks if the error variance is not constant (strong non-constant variance)
par(mfrow=c(3,3)) ## 9 plots on one page
x <- runif(100,0,20)
for(i in 1:9){
y <- x + x * rnorm(100)
m <- lm(y ~ x)
plot(m,which=1)
}

0 comments:
Post a Comment