Hi all, I’m looking at the MixedModels.jl package and I’m curious if it (or something similar in Julia) can fit the following type of model I used nlme to fit in R. The part I can’t figure out is if there is a simple way to specify an AR(1) correlation structure on the errors like is available via corAR1: AR(1) Correlation Structure in nlme: Linear and Nonlinear Mixed Effects Models in R.
The model is from Simon Wood’s GAM book, for the curious.
Thanks, is this a fundamental constraint? I’m curious how the formulation of the numerical problem makes it difficult to use different covariance structures, since they are necessary for my case. Could you point me to where I can learn more about the implementation in the package?
The biggest issue for AR1 is that the formulation depends rather heavily on the residual error term being a constant multiple of the identity matrix. In theory, it’s possible to implement this via iterative reweighting, like is done for GLMMs, but I have a very long backlog of FOSS improvements to do and likely won’t get around to this anytime soon…
MixedModel.jl and Metida.jl works with different implementation of optimizing REML/ML function. MixedModels using the penalized, iteratively reweighted, least squares (PIRLS) algorithm to determine parameters and it very fast (but works only with random effects and not support repeated[just now, maybe in theory it can be implemented]), Metida.jl - direct optimize REML function and it’s slowly, but can fit any covariance structure - random and repeated effects. If you want AR(1) - it is fully supported for random and repeated effects in Metida.jl and now it works even with rank deficient fixed effects.