drizopoulos / GLMMadaptive

GLMMs with adaptive Gaussian quadrature
https://drizopoulos.github.io/GLMMadaptive/
59 stars 14 forks source link

mixed_model() without random effect? #19

Closed andburch closed 5 years ago

andburch commented 5 years ago

So I'm trying to compare a two-part model that incorporates random effects with a similar version that does not. I love how wonderful the mixed_model() function is, but I'm wondering if there's a way to run it without the random effect component.

The normal call (which uses a random effect by group) is below:

mixed_model(Y~ X, 
            random = ~ 1|group,
            data=df,
            family = hurdle.lognormal(), n_phis = 1,
            zi_fixed = ~ Z")

However, whenever I set random = ~1 or random = NULL or random = ~0, I get an error. Is there any way to run this two-part hurdle model without using a random effect? I would really like to see how the model compares without it.

Thank you so much for your time.

drizopoulos commented 5 years ago

Unfortunately, this is not possible. The package is designed to work with random effects. There are other packages in R to fit this model without random effects.

andburch commented 5 years ago

Thank you anyway!