falkcarl / multilevelmediation

5 stars 1 forks source link

try toggle between nlme and glmmTMB #4

Open falkcarl opened 4 years ago

falkcarl commented 4 years ago

did I see something with glmmTMB()? gamm()? that might be able to run the combined model in one shot?

toddvogel1628 commented 4 years ago

I tested out brms for a different study that used multilevel models, and it seemed to work well. It might work for the combined model, but I'm unsure how to get the random effects matrix from it (I only tested it on a few models that had trouble converging).

falkcarl commented 3 years ago

About lme4 again. Only possible if two separate models are fit to the data. A single model is only needed when a and b both have random effects, as we need the covariance among the two random effects. Do not do lme4 with a single model using the BPG06 approach. With BPG06, we need to model heteroscedasticity as M and Y may have different error variances.

falkcarl commented 8 months ago

I tested out glmmTMB and I believe it shall work very nicely. Changed title to reflect this.