## --------------------------------------------------------- #
## Example 1: Schizophrenia (see also example of 'olmm')
## --------------------------------------------------------- #
data(schizo)
schizo <- schizo[1:181,]
schizo$id <- droplevels(schizo$id)
## fit two alternative models for the 'schizo' data
model.0 <- olmm(imps79o ~ tx + sqrt(week) + re(1|id), schizo)
model.1 <- olmm(imps79o ~ tx + sqrt(week)+tx*sqrt(week)+re(1|id),schizo)
anova(model.0, model.1)
coef(model.1)
fixef(model.1)
head(model.matrix(model.1, "fe-ge"))
head(weights(model.1))
ranefCov(model.1)
head(resid(model.1))
head(simulate(model.1))
terms(model.1, "fe-ge")
VarCorr(model.1)
head(weights(model.1, "subject"))
Run the code above in your browser using DataLab