[R-sig-ME] Longitudinal logistic regression with continuous-time first-order autocorrelation structure
Ben Bolker
bbolker at gmail.com
Thu Mar 1 13:33:41 CET 2018
Don't use (time_hours|id) ... that will expand to a random effect with
a full, unstructured covariance matrix term.
If you have t distinct times measured, you'll end up with t*(t+1)/2
parameters to estimate. Try (1|time_hours)
(and probably also include (1|id))
On Wed, Feb 28, 2018 at 8:44 PM, Dennis Ruenger
<dennis.ruenger at gmail.com> wrote:
> Thanks, Alain and Ben, for your replies.
>
> My understanding is that for the kind of intensive longitudinal data I'm
> dealing with, a mixed model with both random intercepts and slopes for the
> time effect *and *autoregressive errors are recommended.
>
> I'd like to follow Alain's suggestion and give glmmTMB a try. Based on a
> description of the covariance structures available with glmmTMB (link
> below), it looks like the Ornstein–Uhlenbeck covariance structure might be
> what I'm looking for (i.e., something akin to corrCAR1() that works in a
> GLMM).
>
> So I tried:
>
> df$time_hours <- numFactor(df$time_hours)
> fit <- glmmTMB(y ~ time_hours + (time_hours|id) + ou(time_hours-1|id),
> family = binomial, data = df)
>
> However, after about 10 minutes, I receive an error message about failed
> memory allocation (on a laptop with a 7th gen Intel Core i5 processor and
> 8GB RAM). The data set includes 34 participants with up to 300 data points
> per participants. Running the model for a subset of 5 participants also
> resulted in memory allocation failure. The same was true for the spatial
> Gaussian and spatial exponential covariance structures.
>
> Does anyone see a way to make this work with glmmTMB?
>
> Thanks a lot.
>
> https://cran.r-project.org/web/packages/glmmTMB/vignettes/covstruct.html
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models at 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