# \donttest{
## Chicken Embryo Data
data(chicken.embryo)
a<-0; b<-21
day<-chicken.embryo$day
nT<-chicken.embryo$nT
Day<-rep(day,nT)
res<-mable.group(x=nT, breaks=a:b, M=c(2,100), interval=c(a, b), IC="aic",
controls=mable.ctrl(sig.level=1e-6, maxit=2000, eps=1.0e-7))
op<-par(mfrow=c(1,2), lwd=2)
layout(rbind(c(1, 2), c(3, 3)))
plot(res, which="likelihood")
plot(res, which="change-point")
fk<-density(x=rep((0:20)+.5, nT), bw="sj", n=101, from=a, to=b)
hist(Day, breaks=seq(a,b, length=12), freq=FALSE, col="grey",
border="white", main="Histogram and Density Estimates")
plot(res, which="density",types=1:2, colors=1:2)
lines(fk, lty=2, col=2)
legend("topright", lty=c(1:2), c("MABLE", "Kernel"), bty="n", col=c(1:2))
par(op)
# }
Run the code above in your browser using DataLab