[R-sig-ME] blmer(), minimum amount of prior to get a model to converge

Vincent Dorie vdor|e @end|ng |rom gm@||@com
Sun Oct 4 03:22:49 CEST 2020


There's no single minimum amount, but you can decrease the relative
impact of the prior by fitting a sequence of models until convergence
becomes a problem again.

# default
m2 <- blmer(math ~ ses*sector + (ses | sch.id), data = hsb, cov.prior
= wishart(df = level.dim + 2.5))
# point at which blme model is same as lme4
m3 <- blmer(math ~ ses*sector + (ses | sch.id), data = hsb, cov.prior
= wishart(df = level.dim + 1))
# fit models in sequence with df from level.dim + 2.5 to level.dim + 1

Technically, any prior which goes to zero when the determinant of the
covariance of the random effects go to zero should have the desired
effect (df > level.dim + 1), but there may be limitations introduced
by the optimizer.

Vince


On Sat, Oct 3, 2020 at 1:17 AM Simon Harmel <sim.harmel using gmail.com> wrote:
>
> Hello all,
>
> This may be a simple/naive question, but I have a non-converging lmer()
> model due to singularity.
>
> I was wondering what is the minimum prior specification in `blmer()` to get
> this singular model to converge?
>
> library(lme4)
> library(blme)
> hsb <- read.csv('
> https://raw.githubusercontent.com/rnorouzian/e/master/hsb.csv')m4 <- m1 <-
> lmer(math ~ ses*sector + (ses | sch.id), data = hsb)
>
> m2 <- blmer(math ~ ses*sector + (ses | sch.id), data = hsb, cov.prior = ???)
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models



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