## these examples are slow to run
data(aces_daily, package = "JWileymisc")
evaluateLags(
"NegAff ~ Female + Age + BornAUS + (1 | UserID)",
"STRESS",
4L,
"UserID",
aces_daily)
# \donttest{
## not run, more complex example with random slope, fails to converge
evaluateLags(
"NegAff ~ Female + Age + BornAUS + (1 + STRESS | UserID)",
"STRESS",
5L,
"UserID",
aces_daily)
## use different control to fit model and now converges
strictControl <- lme4::lmerControl(optCtrl = list(
algorithm = "NLOPT_LN_NELDERMEAD",
xtol_abs = 1e-10,
ftol_abs = 1e-10))
evaluateLags(
"NegAff ~ Female + Age + BornAUS + (1 + STRESS | UserID)",
"STRESS",
5L,
"UserID",
aces_daily,
control = strictControl)
# }
Run the code above in your browser using DataLab