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

Simon Harmel @|m@h@rme| @end|ng |rom gm@||@com
Sun Oct 4 21:34:33 CEST 2020


Dear Vincent,

Unfortunately, I couldn't improve the singularity problem using the prior
specification solution you suggested (In fact, I played around with
`wishart(df = level.dim + 2.5)` more than your suggested range without
success).

library(lme4)
library(blme)

hsb <- read.csv('
https://raw.githubusercontent.com/rnorouzian/e/master/hsb.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 = ???)

On Sun, Oct 4, 2020 at 11:10 AM Vincent Dorie <vdorie using gmail.com> wrote:

> I agree, that that is a meaningful distinction. You can use a prior to
> nudge the estimate away from the boundary of the space, which
> addresses singularity. You can also use a prior to add information to
> the likelihood, which addresses convergence. However, in the latter
> scenario that information would modify your estimate in a subjective
> manner, and it would be impossible to say that it was better than
> simply living with an optimizer warning unless you actually had prior
> information.
>
> On Sat, Oct 3, 2020 at 9:36 PM Ben Bolker <bbolker using gmail.com> wrote:
> >
> >    Thanks Vincent.
> >
> >    FWIW it would make me really happy if people distinguished clearly
> > between
> >
> > * "singular/nonsingular" - an issue with the 'true' best estimate, i.e.
> > whether the MLE for the variance-covariance matrix of the REs is
> > positive definite vs. being only positive *semi*definite
> >
> > * "converged/nonconverged" - a question of whether we think the
> > numerical optimization has worked correctly or not
> >
> >    cheers
> >     Ben Bolker
> >
> >
> > On 10/3/20 9:22 PM, Vincent Dorie wrote:
> > > 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
> > >
> > > _______________________________________________
> > > R-sig-mixed-models using r-project.org mailing list
> > > https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> > >
> >
> > _______________________________________________
> > R-sig-mixed-models using r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
> _______________________________________________
> R-sig-mixed-models using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>

	[[alternative HTML version deleted]]



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