if (FALSE) {
# Example based on criminal data
data(data_criminal_sim)
data_criminal_sim <- data.frame(data_criminal_sim)
# Estimate mixed LM model for females
responsesFormula <- lmestFormula(data = data_criminal_sim,
response = "y")$responsesFormula
# fit mixed LM model only for females
out <- lmestMixed(responsesFormula = responsesFormula,
index = c("id","time"),
k1 = 2,
k2 = 2,
data = data_criminal_sim[data_criminal_sim$sex == 2,])
out
summary(out)
}
Run the code above in your browser using DataLab