# NOT RUN {
# Aphids.
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(plntsInf~aphRel,ncomp=2,thetaStart=thStrt,
covMat=TRUE,data=aphids)
cbds <- cband(fit,plot=TRUE)
plot(cbds) # Same plot as was produced by call to cband().
# Kilns.
thStrt <- list(
list(beta=c(26.07,48808),sigsq=1.1573,lambda=0.33333333),
list(beta=c(23.48,32387),sigsq=1.8730,lambda=0.33333333),
list(beta=c(-0.0597,20760),sigsq=0.2478,lambda=0.33333333)
)
fit <- mixreg(y ~ x,ncomp=3,data=kilnAoneOut,thetaStart=thStrt)
# }
# NOT RUN {
# Takes too long.
res <- residuals(fit,std=TRUE)
qqMix(res) # No way are these residuals Gaussian!
cbdsG <- cband(fit)
cbdsMC <- cband(fit,MC=TRUE)
plot(cbdsG)
plot(cbdsMC)
# Same-same, despite the lack of Gaussianity!
# }
Run the code above in your browser using DataLab