Message-ID: <CA+++UwQx7TWinkLq9Nh6Sz9qifaa9xCOGoah5ZEiJX7mtu6_UA@mail.gmail.com>
Date: 2020-10-04T01:22:49Z
From: Vincent Dorie
Subject: blmer(), minimum amount of prior to get a model to converge
In-Reply-To: <CACgv6yX980K9BwUQtxg3cdSGuoN2UnZBVi_FFnehQGKwnbF5yA@mail.gmail.com>
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 at 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 at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models