[R-sig-ME] Nlme corAR1 error: Model won't converge

Thierry Onkelinx thierry.onkelinx at inbo.be
Mon Mar 14 09:11:32 CET 2016


Dear Igor,

Note that corAR1() assumes that time is integer and increases by one after
each time point. You need to check that.

Apart from that. A random slope along time and an AR1 model on the noise
will compete for the same information. When you have a lot of time points
per group, the model can decide with of the two is the most important.
Since you have only 3 time points, the model has difficulties with that.

So you probably better choose between the random slope and the AR1 instead
of using them both.

Best regards,


ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium

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

2016-03-14 3:37 GMT+01:00 Igor Yakovenko <iyakoven op ucalgary.ca>:

> Hi Everyone,
>
>
>
> I'm absolutely stuck trying to figure this out, so I thought brighter minds
> here may be able to shed some light on the situation. I'm relatively new to
> mixed modeling in R, so it could be something obvious. I'm trying to fit a
> longitudinal mixed model in Nlme, specifically to be able to model the
> covariance structure. The data itself is based on an RCT intervention with
> two groups followed over three time points (baseline, 3 and 6 months).
> Before I even started adding the group predictor or any other factors, I
> started building the basic model with just the fixed intercept, random
> intercept, then a fixed time and random slopes. After building these first
> 4
> models, which went fine, I modeled corAR1 on top of the previous model and
> got a convergence error. Here is the syntax I used, including the resulting
> error:
>
>
>
> model1 = gls(PGSI3months_Total ~1, data = vse, method = "ML", na.action =
> "na.omit")
>
> model2 = lme(PGSI3months_Total ~1, data = vse, method = "ML", na.action =
> "na.omit", random = ~1|id)
>
> timeRI = update(model2, .~. + Time)
>
> timeRS = update(timeRI, random = ~Time|id)
>
> ARModel = update(timeRS, correlation = corAR1(0, form = ~Time|id))
>
> Error in lme.formula(fixed = PGSI3months_Total ~ Time, data = vse, random =
> ~Time |  :
>
>   nlminb problem, convergence error code = 1
>
>   message = iteration limit reached without convergence (10)
>
>
>
> Time is my time variable, id is the subject number variable, distance
> between time points is equal. Changing the maximum number of iterations or
> the optimizer did not resolve this issue.
>
>
>
> Here is the summary for the timeRS model. The degrees of freedom and sample
> size appear to be appropriate to model additional parameters, unless I
> missed something, so I can't understand why trying to model autocorrelation
> produces an error.
>
>
>
> Linear mixed-effects model fit by maximum likelihood
>  Data: vse
>        AIC      BIC    logLik
>   3391.798 3417.239 -1689.899
>
> Random effects:
>  Formula: ~Time | id
>  Structure: General positive-definite, Log-Cholesky parametrization
>             StdDev      Corr
> (Intercept) 3.869742861 (Intr)
> Time        0.005132771 -0.001
> Residual    5.588313454
>
> Fixed effects: PGSI3months_Total ~ Time
>                 Value Std.Error  DF   t-value p-value
> (Intercept) 18.208305 0.6840868 307  26.61695       0
> Time        -4.693759 0.3065688 307 -15.31062       0
>  Correlation:
>      (Intr)
> Time -0.839
>
> Standardized Within-Group Residuals:
>         Min          Q1         Med          Q3         Max
> -2.26592087 -0.68602172 -0.06530166  0.60976438  2.47559836
>
> Number of Observations: 513
> Number of Groups: 205
>
>
>
> Happy to provide any additional information.
>
>
>
> Thank you in advance for your help.
>
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models op 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