[R-sig-ME] recent message not posted
John Kingston
jkingston at linguist.umass.edu
Wed May 21 17:27:29 CEST 2014
I recently sent the message repeated below to this address, but it
hasn't appeared. I haven't attached the data set referred to in that
message to this one. Can you let me know what's up? Thank you.
John Kingston
I have recently been running a hierarchy pf mixed effect logistic
regression models using glmer on data collected from 28 participants
who had to choose between one of two possible responses on each trial.
The code for two models in the model hierarchy is pasted below, along
with the fixed effects estimates. Yhe data file is attached to this
message (as .csv file). As you can see, the the first model includes
only the random effect of participant on the intercept, while the
second model adds the random effects of participant on the slopes of
all the fixed effects. Unsurprisingly, that model with those random
effects fits the data significantly better:
anova(sfInd, sfIndR)
# Df AIC BIC logLik deviance Chisq Chi Df Pr(>Chisq)
# sfInd 6 15438 15485 -7712.9 15426
# sfIndR 20 14146 14303 -7053.2 14106 1319.4 14 < 2.2e-16 ***
What does surprise/trouble me is that the second model takes an
extremely long time to complete, and moreover, once I moved to models
including interactions between the fixed effects, the maximum number
of function calls had to be increased, first to 100,000, and
eventually to 1,000,000. Does anyone have any suggestions about why
the models take so long to calculate, and why the maximum number of
function calls must be increased so much. Neither has been typical of
my experience calculating such models, which I do routinely. Thank you.
Intercept only:
attach(sfCompiled)
# independence
sfInd <- glmer(fRspRN ~ cTrialNumber +
cStep +
cContext +
cSpeed +
(1 | participant),
family = "binomial",
control = glmerControl(optCtrl = list(maxfun=1000000)),
data = sfCompiled)
# Estimate Std. Error z value Pr(>|z|)
# (Intercept) -6.024e-01 1.769e-01 -3.40 0.000662 ***
# cTrialNumber 9.739e-04 9.454e-05 10.30 < 2e-16 ***
# cStep 2.252e-01 3.357e-03 67.09 < 2e-16 ***
# cContext 5.356e-01 2.528e-02 21.19 < 2e-16 ***
# cSpeed 2.783e-01 2.492e-02 11.16 < 2e-16 ***
#
sfIndR <- glmer(fRspRN ~ cTrialNumber +
cStep +
cContext +
cSpeed +
(1 + cTrialNumber +
cStep +
cContext +
cSpeed | participant),
family = "binomial",
control = glmerControl(optCtrl = list(maxfun=1000000)),
data = sfCompiled)
summary(sfIndR)
# Estimate Std. Error z value Pr(>|z|)
# (Intercept) -0.8191734 0.3079764 -2.660 0.007817 **
# cTrialNumber 0.0012851 0.0003641 3.530 0.000416 ***
# cStep 0.2665563 0.0197676 13.485 < 2e-16 ***
# cContext 0.6654796 0.1140261 5.836 5.34e-09 ***
# cSpeed 0.3245607 0.0812122 3.996 6.43e-05 ***
John Kingston
--------------------------------
Professor and Head
Linguistics Department
University of Massachusetts
150 Hicks Way, 226 South College
Amherst, MA 01003-9274
1-413-545-6837, fax -2792
jkingston at linguist.umass.edu
https://blogs.umass.edu/jkingstn/
More information about the R-sig-mixed-models
mailing list