if (FALSE) {
data(cvd, package = "R2MLwiN")
# Example taken from Leyland and Groenewegen (2020)
F1 <- logit(cvddef) ~ 1 + I(age^3) + I(age^3):I(log(age)) +
sex + sex:I(age^3) + sex:I(age^3):I(log(age)) +
(1 | area)
(mod_MQL1 <- runMLwiN(Formula = F1,
D = "Binomial",
data = cvd))
(mod_PQL2 <- runMLwiN(Formula = F1,
D = "Binomial",
data = cvd,
estoptions = list(
nonlinear = c(N = 1, M = 2),
startval = list(FP.b = mod_MQL1@FP,
FP.v = mod_MQL1@FP.cov,
RP.b = mod_MQL1@RP,
RP.v = mod_MQL1@RP.cov))))
}
Run the code above in your browser using DataLab