# NOT RUN {
############################################
# The Australian Institute of Sport's data
############################################
data(sports)
attach(sports)
# Initial state
state <- NULL
# MCMC parameters
nburn <- 5000
nsave <- 10000
nskip <- 20
ndisplay <- 100
mcmc <- list(nburn=nburn,nsave=nsave,nskip=nskip,
ndisplay=ndisplay)
# Prior information
prior <- list(beta0=rep(0,3),
Sbeta0=diag(1000,3),
tau1=0.01,
tau2=0.01)
# Fit the model
fit <- Plm(formula=bmi~lbm+gender,prior=prior,mcmc=mcmc,
state=state,status=TRUE)
# Summary with HPD and Credibility intervals
summary(fit)
summary(fit,hpd=FALSE)
# Plot model parameters (to see the plots gradually set ask=TRUE)
plot(fit)
plot(fit,nfigr=2,nfigc=2)
# Table of Pseudo Contour Probabilities
anova(fit)
# }
Run the code above in your browser using DataLab