Replies: 2 comments
-
We currently don't have support for constraints on the correlation structure of the residuals (though I guess something could be hacked together using an observation-level random effect and the next point). For the random effects, we only have one constraint implemented,
For what it's worth, this challenge is shared with lme4. Both lme4 and MixedModels.jl use a very efficient way of evaluating the (profiled) log likelihood, which makes fitting a model with an unstructured covariance structure very fast (and via the magic of sparse matrix methods, quite efficient in memory). In many cases, this advantage is worthwhile: lots of traditional assumptions about the structure of the covariance matrix were added to optimize special cases because the classical general procedures were quite slow. Somewhat ironically, lme4 and MixedModels.jl are very fast at the general problem, but struggle more with the special cases. I think autoregressive correlation structures and certain very constrained covariance structures in genomics are the cases where there are good theoretical reasons for imposing these constraints though. I don't think solving these problems is impossible, but I don't have the time to do so at the moment (this is a 'hobby' project for me!). I haven't used it myself, but Metida.jl seems to have more support for restricted covariance structures, but is somewhat more limited in the size of the problems it can handle. Tradeoffs. 😄 |
Beta Was this translation helpful? Give feedback.
-
Just for the sake of completeness. You can also zero correlation parameters (CPs) between subsets of variance components (VCs) associated with a grouping variable, e.g., |
Beta Was this translation helpful? Give feedback.
-
I am new to Julia and trying to understand equivalent approach for specifying correlation structure in MixedModlels.
Is there any equivalent of the following available in R:
m = lme(y ~ x + time + (1|id), correlation = corAR1, data = df)
or
m = glmmTMB(y ~ x + (1|id) + ar1(0 + factor(time)|id), data = df)
Many thanks!
sbs
Beta Was this translation helpful? Give feedback.
All reactions