[R-sig-ME] Errors in GLMER
Michiel Kiggen
michiel@kiggen @ending from gm@il@com
Mon Jun 25 18:33:02 CEST 2018
Dear Thierry
Thanks so much for comments, I really appreciate it.
Based on your feedback, I'm running the following model now:
model_poly_nc <- glmer(AoR ~ Offers_lin*(sFW*sMF)+ Offers_quad *(sFW*sMF) +
(1 |ID)+ (0 + Offers_lin| ID)+(0 + Offers_quad| ID),family = binomial, data
= data, control = glmerControl(optCtrl = list(maxfun = 1e+9)))
*Offers_lin* & *Offers_quad* are the trial variables (polynomials for
linear and quadratic patterns). Both of them are centered. Metric is from 1
till 10. (1 being trial in which people get lowest offer and 10 being the
highest offer in an ultimatum game)
*sFW* & *sMF *are the continous questionairre sumscores, standardized &
centered.
*DV* (2 level factor accept or reject)
*n = 103*
I ran the model with covariance terms for the random effects. It didn't
converge, neither with optimizers bobyqa & Nelder_Mead.
However, the function *allFit,* strangely returned *[OK] for bobyqa,
Nelder_Mead, nloptwrap.NLOPT_LN_NELDERMEAD & nloptwrap.NLOPT_LN_BOBYQA*.
The model above is without covariance terms for the random effects. After
running this I get the same convergence issue and the same output on
allFit: [OK] for bobyqa, Nelder_Mead, nloptwrap.NLOPT_LN_NELDERMEAD
& nloptwrap.NLOPT_LN_BOBYQA.
Using the *getME *function to look at the different *Fixed Effects*
generated by *allFit* (no covariance term model, as described above), it
reveals that the numbers are similar for bobyqa, loptwrap.NLOPT_LN_NELDERMEAD
& nloptwrap.NLOPT_LN_BOBYQA. While for the Nelder_mead numbers are just
slightly different. Like a 0.02 difference.
For the seperate Models with optimizers Bobyqa & Nelder_Mead (both with
convergence issues), the fixed effects were exactly the same.
I'm not sure how to interpret these allFit function results. For what
patterns should I look incase I want to conclude these warnings are
false-positives?
Else, what options do I have? I've already stripped the model of it random
covariances (Removing the random slope will make the purpose of using Mixed
Models dispensable).
My apologies if I'm asking any obvious questions. First time i'm running
this kind of analysis.
Any help is much appreciated!
Kind regards,
Michiel
Op ma 25 jun. 2018 om 09:08 schreef Thierry Onkelinx <
thierry.onkelinx using inbo.be>:
> Dear Michiel,
>
> Does it run with the random slope for trial. If I understand the
> design correctly, you have only one observation per trial and per ID.
> In that case a random slope for trial as an (ordered) factor won't
> work.
>
> Consider using trial as a continuous variable and use some polynomials
> to model it.
>
> Best regards,
>
> ir. Thierry Onkelinx
> Statisticus / Statistician
>
> Vlaamse Overheid / Government of Flanders
> INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE
> AND FOREST
> Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
> thierry.onkelinx using inbo.be
> Havenlaan 88 bus 73, 1000 Brussel
> www.inbo.be
>
>
> ///////////////////////////////////////////////////////////////////////////////////////////
> To call in the statistician after the experiment is done may be no
> more than asking him to perform a post-mortem examination: he may be
> able to say what the experiment died of. ~ Sir Ronald Aylmer Fisher
> The plural of anecdote is not data. ~ Roger Brinner
> The combination of some data and an aching desire for an answer does
> not ensure that a reasonable answer can be extracted from a given body
> of data. ~ John Tukey
>
> ///////////////////////////////////////////////////////////////////////////////////////////
>
>
>
>
> 2018-06-24 23:41 GMT+02:00 Michiel Kiggen <michiel.kiggen using gmail.com>:
> > Dear Reader,
> >
> > I'm trying to run a GLMER model for the following data:
> > *2x scaled continous predictor* (sum score of 2 questionairres)
> > *1x predictor being 10 trials* on a ultimatum game of which each trial
> is 1
> > out of 10 possible options. (offer of a split of $20: e.g. you 1 and 19
> > me). Inserted this a non ordered factor (10-levels) with sum-to-zero
> coding
> > (contrast.sum).
> > *1x dependent binary variable *being the response to the 10 trials valued
> > at accepted (1) or reject (2). Entered as a factor.
> >
> > After the following model without correlations terms (I ran this model
> > after failing to converge on a model without optimizers and the all_fit
> of
> > that) I get the following errors:
> >
> > glmer(AoR ~ Trials * (sPredictor1*sPredictor2) + (1 | ID )+ (0 + Trials
> > |ID),family = binomial, data = data, control = glmerControl(optCtrl =
> > list(maxfun = 1e+9, optimizer = "bobyqa")))
> >
> >
> > *fixed-effect model matrix is rank deficient so dropping 10 columns /
> > coefficients*
> > *Warning messages:*
> > *1: In (function (npt = min(n + 2L, 2L * n), rhobeg = NA, rhoend = NA,
> :*
> > * unused control arguments ignored*
> > *2: In (function (iprint = 0L, maxfun = 10000L, FtolAbs = 0.00001,
> FtolRel
> > = 1e-15, :*
> > * unused control arguments ignored*
> > 3: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,
> :
> > unable to evaluate scaled gradient
> > 4: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,
> :
> > Model failed to converge: degenerate Hessian with 11 negative
> eigenvalues
> >
> > I'm afraid I might be doing something wrong in handeling the DV or
> > 10-factor level IV, which in turn, is causing the 3 errors in bold. Does
> > anyone have suggestions. Or can some one tell me what the source of these
> > errors are?
> >
> > Much obliged in advance,
> >
> > Kindest regards,
> >
> > Michiel Kiggen
> >
> > [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-sig-mixed-models using r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models
mailing list