## Not run:
# # School Girls Data Example
# data(schoolgirls)
# attach(schoolgirls)
#
# # Prior information
# prior<-list(alpha=1,
# M=4,
# tau1=0.01,tau2=0.01,
# nu0=4.01,
# tinv=diag(10,2),
# mub=rep(0,2),
# Sb=diag(1000,2))
#
# # Initial state
# state <- NULL
#
# # MCMC parameters
#
# nburn<-5000
# nsave<-5000
# nskip<-0
# ndisplay<-100
# mcmc <- list(nburn=nburn,nsave=nsave,nskip=nskip,ndisplay=ndisplay,
# tune1=1.5,tune2=1.1)
#
# # Fitting the model
#
# fit1<-PTlmm(fixed=height~1,random=~age|child,prior=prior,mcmc=mcmc,
# state=state,status=TRUE)
# fit1
#
#
# # Extract random effects
#
# PTrandom(fit1)
#
# plot(PTrandom(fit1))
#
# # Extract predictive information of random effects
#
# PTrandom(fit1,predictive=TRUE)
# plot(PTrandom(fit1,predictive=TRUE,gridl=c(75,89,3.8,7.5)))
# ## End(Not run)
Run the code above in your browser using DataLab