# NOT RUN {
data(mexico)
attach(mexico)
## Table 7.3
library(lme4)
cs <- function(x) scale(x,scale=TRUE,center=TRUE) # Function to re-scale
mexico.out <- glmer(MIGR ~ cs(NCRIME) + cs(SEV) + cs(PAST) +
cs(FUT) +cs(INC) + cs(AGE) + WAVE
+ (1|SUBJECT), data=mexico, family=binomial("logit"),
glmerControl(optimizer="bobyqa", tolPwrss=5e-2, optCtrl = list(maxfun=10000)))
summary(mexico.out)
se <- sqrt(diag(vcov(mexico.out)))
(cis.mexico.out <- cbind(Est = fixef(mexico.out),
LL = fixef(mexico.out) - 1.96 * se,
UL = fixef(mexico.out) + 1.96 * se))
# }
Run the code above in your browser using DataLab