# NOT RUN {
### REPRODUCE THE RESULTS IN BERKEY ET AL. (1998)
# INSPECT THE DATA
berkey98
# FIXED-EFFECTS
year <- berkey98$pubyear - 1983
mod1 <- mixmeta(cbind(PD,AL) ~ year, S=berkey98[5:7], data=berkey98,
method="fixed")
print(summary(mod1), digits=3)
# GLS MODEL (VARIANCE COMPONENTS)
mod2 <- mixmeta(cbind(PD,AL) ~ year, S=berkey98[5:7], data=berkey98,
method="vc", control=list(vc.adj=FALSE))
print(summary(mod2), digits=3)
round(mod2$Psi, 3)
# ML MODEL
mod3 <- mixmeta(cbind(PD,AL) ~ year, S=berkey98[5:7], data=berkey98, method="ml")
print(summary(mod3), digits=3)
round(mod3$Psi, 3)
# }
Run the code above in your browser using DataLab