drizopoulos / GLMMadaptive

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

Does max_coef_value work? #21

Closed wviechtb closed 5 years ago

wviechtb commented 5 years ago

Maybe I am misunderstanding the max_coef_value control argument:

dat <- data.frame(xi=rep(1,10), mi=rep(9,10), id=1:10)
dat[1:5,"xi"] <- 4
dat[1:5,"mi"] <- 6
GLMMadaptive::mixed_model(cbind(xi,mi) ~ 1, random = ~ 1 | id, data=dat, family=binomial)
GLMMadaptive::mixed_model(cbind(xi,mi) ~ 1, random = ~ 1 | id, data=dat, family=binomial, control=list(max_coef_value=1))

But I would have expected the intercept to be constrained to <= 1 in the second fit.

drizopoulos commented 5 years ago

The max_coef_value applies to all coefficients except the intercept. The idea is to identify pathogenic situations at which the coefficient value of a covariate starts to diverge (i.e., gets very large in absolute value).