[R-lang] trouble with mixed-model

Francisco Torreira ftorrei2 at uiuc.edu
Fri Aug 3 22:23:48 PDT 2007


Dear Roger and Florian,

Thanks so much for your comments. A model with random slopes but no
random intercepts (e.g. (0+type|spk)) also seems to lead to
singularity. As I said in my previous message, this happens too for a
model with both random intercept and slop (e.g. (1+type|spk)). I
understand Roger's suggestion to merge levels 'e' and 'i'. However, if
I am fitting the model, it's precisely to compare the level means :-)

I have therefore fitted a model with a random intercept and calculated
the CI for the level means using Baayen's pvals.fnc().
I suppose that the CI obtained this way are not equivalent to the ones
obtained with post-hoc comparison procedures (e.g. TukeyHSD). Does
anyone have an idea how to do this with a mixed model?  For the moment
I am satisfied with these intervals though. Along with some lattice
graphs I think I can already get a good idea of what's going on in my
data.

Francisco


On 7/31/07, T. Florian Jaeger <tiflo at csli.stanford.edu> wrote:
> Dear Francisco,
>
> as Roger said, too strong correlations between the variances of the random
> effects can lead to a singularity in the estimation of the
> variance-covariance matrix for the random effects. This can also happen, if
> any of the variances are indistinguishable from zero. Like Roger, I do not
> have a clear understanding of the underlying fitting procedure, but too the
> best of my knowledge the singularity is due to one of the underlying
> parameters determining the random effects whose value is being optimized is
> too close to zero.
>
> I suggest the following: look at the a couple of different models. I would
> start by comparing a model with only a random intercept vs. a model with
> only the random slopes (the "type | spk" part). If a model with only the
> random slopes does not converge, the singularity due to some of the levels
> of "type" being indistinguishable with regard to their random effects and
> you should do what Roger suggested. If the model with only random slopes
> DOES converge, you can compare it against a model with only the random
> intercept. Too a first approximation, you may use the model fit measures,
> e.g. AIC to compare the two models. When you compare these models, keep in
> mind that the slopes have more DFs than just the intercept. If a model with
> only the random intercept has basically the same model fit quality as a
> model with only the random slopes, than it seems that (given the fixed
> effects that you are considering) the random slopes do not seem to do much (
> i.e. the different types do not seem to affect your dependent variable, at
> least not under the assumption that their effect is normally distributed).
> Have a look at Baayen, Davidson, & Bates, 07 for more detail on how to
> compare different models based on their random effects.
>
> Florian
>
>
> On 6/23/07, Francisco Torreira <ftorrei2 at uiuc.edu> wrote:
> >
> > Hello,
> >
> > I am fitting a mixed model that prompts the following warning messages:
> >
> > Warning messages:
> > 1: Estimated variance-covariance for factor 'spk' is singular
> > in: `LMEoptimize<-`(`*tmp*`, value = list(maxIter = 200L, tolerance =
> > 1.49011611938477e-08,
> > 2: nlminb returned message function evaluation limit reached without
> > convergence (9)
> > in: `LMEoptimize<-`(`*tmp*`, value = list(maxIter = 200L, tolerance =
> > 1.49011611938477e-08,
> >
> > Although the model is fitted, R does not let me run simulations on it
> > with mcmcamp(). This is the error message I get:
> >
> > > mcmcsamp(full, n=10000)
> > Error: inconsistent degrees of freedom and dimension
> > Error in t(.Call(mer_MCMCsamp, object, saveb, n, trans, verbose,
> deviance)) :
> >         error in evaluating the argument 'x' in selecting a method for
> function 't
> >
> > The model was:
> > full <- lmer(an ~ type + (1 + type | spk) - 1)
> >
> > My design included 5 speakers (spk) and 5 utterance types (type). For
> > each combination of speaker and utterance type there were
> > approximately 20 repetitions. If I fit a more reduced model with no
> > random effect for type within speakers, as in lmer(an~type+(1|spk)),
> > no warning appears. Here is the summary of my full model:
> >
> > Linear mixed-effects model fit by REML
> > Formula: an ~ 1 + type + (1 + type | spk) - 1
> >   AIC  BIC logLik MLdeviance REMLdeviance
> > 4663 4747  -2311       4653         4623
> > Random effects:
> > Groups   Name        Variance Std.Dev. Corr
> > spk      (Intercept) 1568.3   39.601
> >           typee       1037.3   32.208   -0.745
> >           typeg       1303.7   36.107   -0.659  0.946
> >           typei       1780.9   42.200   -0.778  0.976  0.864
> >           typel        757.4   27.521   -0.725  0.839  0.826  0.865
> > Residual              598.8   24.470
> > number of obs: 498, groups: spk, 5
> >
> > Fixed effects:
> >       Estimate Std. Error t value
> > typea    78.87      17.88   4.410
> > typee    18.49      12.13   1.524
> > typeg    50.86      14.26   3.566
> > typei    11.42      12.48   0.915
> > typel    14.94      12.46   1.199
> >
> > Correlation of Fixed Effects:
> >       typea typee typeg typei
> > typee 0.570
> > typeg 0.491 0.898
> > typei 0.240 0.851 0.722
> > typel 0.699 0.758 0.739 0.622
> >
> > I wonder if the high correlations correlations between several
> > utterance types and the intercept in the random part of the model
> > aren't causing all this trouble. I would appreciate any comment on the
> > warnings.
> >
> > Thanks in advance,
> > Francisco Torreira
> >
> > --
> > Francisco Torreira
> > PhD Candidate in Hispanic Linguistics
> > University of Illinois at Urbana-Champaign
> >
> >
> https://netfiles.uiuc.edu/ftorrei2/www/index.html
> > tel: (+1) 217 - 778 8510
> > _______________________________________________
> > R-lang mailing list
> > R-lang at ling.ucsd.edu
> >
> https://ling.ucsd.edu/mailman/listinfo.cgi/r-lang
> >
>
>


-- 
Francisco Torreira
PhD Candidate in Hispanic Linguistics
University of Illinois at Urbana-Champaign

https://netfiles.uiuc.edu/ftorrei2/www/index.html
tel: (+1) 217 - 778 8510


More information about the R-lang mailing list