[R-sig-ME] cross validation of glmmLasso

Mollie Brooks mo|||eebrook@ @end|ng |rom gm@||@com
Mon Dec 12 11:50:23 CET 2022


I’m interested in doing cross validation on GLMMs fit with LASSO. I found two functions for doing this: lmmen::cv.glmmLasso and cv.glmmLasso::cv.glmmLasso. With a small amount of digging, it looks like lmmen has been used more since it was on CRAN in the past and it shows up in a thesis and a working paper on Google scholar.

Both packages only work with a single random effect and I need 2 RE for my data set. I managed to fix that problem in the cv.glmmLasso package (https://github.com/thepira/cv.glmmLasso/pull/18 <https://github.com/thepira/cv.glmmLasso/pull/18>). Making lmmen work with multiple random effects is a little harder.

Another problem with lmmen is that the example from the helpfile isn’t working for me. So I’m not sure I should put time into making it work with multiple random effects.
> tmp=cv.glmmLasso(initialize_example(seed=1))
Error in rep(0, d.size) : invalid 'times' argument
In addition: Warning message:
In cv.glmmLasso(initialize_example(seed = 1)) : NAs introduced by coercion 

I’m wondering if anyone else has already been down this rabbit hole and can offer advice. Is there another package (or random code lying around) for doing cross validation on GLMMs with LASSO that is more thoroughly tested and currently in use?

Cheers,
Mollie



	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list