[R-sig-ME] convergence: nearly unidentifiable: very large eigenvalue-Rescale variables?
Phillip Alday
ph||||p@@|d@y @end|ng |rom mp|@n|
Sat Sep 28 23:15:00 CEST 2019
Hi Souheyla,
it's been a while, but coming back to your question.
Scaling a variable x works like this:
scale(x) = (x - mean(x)) / sd(x)
In other words, it centers things around zero and then converts the
units to standard deviations on the original scale.
Critically, this is a linear transformation, so it doesn't impact model
fit (for converged models), but it can make it easier for the software
to converge. In other words, scale() won't impact where you do or don't
find significance for converged models. It does impact the
interpretation of the model coefficients so that a coefficient reflects
the impact of a 1 SD change instead of an impact of (in your case) a 1s
change. But that's not a big deal, and if you know the SD and the mean
on the original scale, you can even back transform the coefficient to
the original scale.
You could also think of it like this: whether you measure time in
seconds or milliseconds should have no impact on your inferences, but it
does impact how big the numbers are and thus how easy it is to deal with
them (which is analagous to convergence for the software). It also
impacts whether 1000 is a big span of time or a little one (analogous to
the interpretation of coefficients above). And indeed this is the case
because converting between seconds and milliseconds is also a linear
transformation.
Note that the logarithm is not a linear transformation and so this
doesn't hold for log transforms.
I'm a bit curious about your span of durations for 'words' -- those
don't all seem like plausible values for me, especially not 0 and 400s.
Phillip
On 18/04/2019 15:22, Souheyla GHEBGHOUB wrote:
> Hi Phillip,
>
> Yes. Duration is a predictor for 28 words. So there are 28 values for
> duration, in a range of 0 to 400, e.g. c(0, 10, 0, 320, 8, 35, 2, 400,
> 10, 2, 0..).
> Yes, I applied log() since its a duration in seconds, but values of 0
> turned to infin values does the model did not recognise.
> I used scale() , though the model converged but it resulted in certain
> negative values for duration, I found that the scaling made the values
> quite close, no much difference between them and I am worried to what
> extent this affects my hypothesis testing that the duration should have
> an effect on DV ? I found no significant effect could this be due to
> scale() function?
>
> Thank you very much,
> Souheyla
> /
> /
>
>
> On Thu, 18 Apr 2019 at 12:40, Phillip Alday <phillip.alday using mpi.nl
> <mailto:phillip.alday using mpi.nl>> wrote:
>
>
>
> On 18/4/19 1:14 pm, Souheyla GHEBGHOUB wrote:
> > Hi everyone,
> >
> > I have a continuous predictor, duration, of 28 levels but with a large
> > variance (from 0 to 400).
>
> Um, how do you have a continuous predictor with levels? Do you mean that
> there are only 28 different/unique observed values within that
> continuous predictor?
>
> Did you try applying scale() to duration? Or if duration is a response
> time, maybe log()?
>
> How many subjects do you have? How many words? Are they fully crossed?
>
> Best,
> Phillip
>
>
>
>
>
> This inhibits convergence. I used all techniques
> > mentioned in this link lme4 convergence warnings: troubleshooting
> >
> <https://rstudio-pubs-static.s3.amazonaws.com/33653_57fc7b8e5d484c909b615d8633c01d51.html>
> > but
> > nothing worked : ( ?
> > Here is my model:
> >
> > *mod <- glmer(response~duration + wfpre + sequence + verbalfreq +
> PoS +
> > Characters + (1|Subject) + (1|Word), glmerControl(optimizer="bobyqa",
> > optCtrl = list(maxfun = 2e5)), **data = df, family = 'binomial')*
> >
> > Could you please assist me with this?
> > Thank you
> > Souheyla
> >
> > [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-sig-mixed-models using r-project.org
> <mailto:R-sig-mixed-models using r-project.org> mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> >
>
More information about the R-sig-mixed-models
mailing list