# NOT RUN {
thStrt <- list(list(beta=c(3.0,0.1),sigsq=16,lambda=0.5),
list(beta=c(0.0,0.0),sigsq=16,lambda=0.5))
fit <- mixreg(aphRel,plntsInf,ncomp=2,thetaStart=thStrt,data=aphids)
rrr <- residuals(fit)
plot(rrr)
plot(rrr,shape="n")
# The plot with shape="n" gives an impression that variability
# increases with aphRel; the plot with default shape ("disc")
# does not give that impression
rrs <- residuals(fit,std=TRUE)
plot(rrs,vsFit=TRUE)
plot(rrs,vsFit=TRUE,shape="n")
fit <- mixreg(plntsInf ~ 1,data=aphids,ncomp=2)
rrr <- residuals(fit,std=TRUE)
plot(rrr,vsFit=TRUE,digits=4,polycol="blue")
# }
Run the code above in your browser using DataLab