Skip to content

keeping both numerically and factor coded factors

3 messages · Robert Long, Ben Bolker, Phillip Alday

#
Dear Elisa,

Yes, one of the possible steps is to force correlations to zero, but then
you are imposing (possibly unreasonable) constraints at the cost of trying
to make the model converge. It is a highly questionable procedure to remove
something or impose constraints purely to cause a model to converge. Random
variables that arise in nature as part of the same data generating process
are rarely uncorrelated. It may be that the correlations are small and
/can/ reasonably be set to zero, but you should investigate whether this is
reasonable first.

Removing random slopes is usually a good way to proceed.

If you can't make progress this way you could try the rstanarm package
which provides a drop in replacement for lmer and will fit the model using
a Bayesian approach. Then, the convergence diagnostics should provide a
better way to solve the problem. It may be that one or more of the variance
components and/or correlations between them are close to zero, in which
case you can remove them from the random structure.
On Wed, 31 Jul 2019, 09:14 MONACO Elisa, <elisa.monaco at unifr.ch> wrote:

            

  
  
#
I generally agree with Robert's point of view - I don't *necessarily*
object to removing correlations, but you have to think carefully about
what it means.

  As to the question of "how should I put more than one factor into a
compound symmetric model"?: suppose you want to make (L*V*D|subjects)
compound symmetric.  You (unfortunately) have a variety of choices.  If
you really want all CS interactions represented, I think you need the
equivalent of (1|subjects/(L+V+D)^2) (which probably won't work as
written, i.e.

 (1|subjects) +
 (1|subjects:L) + (1|subjects:V) + (1|subjects:D) +
 (1|subjects:L:V) + (1|subjects:V:D) + (1|subjects:D:L)

(if you included the (1|subjects:L:V:D) term it would be redundant with
the residual error term).  This is getting complex again -- 7 parameters
(still much better than (L*V*D|subjects), which gives you (16*17)/2 =
136 parameters to estimate) ...

  I'm not sure rstanarm will solve your problems.  That is, I don't see
how the convergence diagnostics that rstanarm gives you are going to be
much more useful than lme4's in deciding how to simplify the problem.
On the other hand, rstanarm offers a big advantage in allowing you to
set priors to keep the solutions to the fitted problem more realistic -
it also integrates over the uncertainty in a useful way.

  [Robert: sorry if I missed or misconstrued something in your answer.
Could you be a little more specific in how you would use rstanarm's
output & diagnostics to help solve this kind of problem?]

 Ben Bolker
On 2019-08-01 10:02 a.m., Robert Long wrote:
#
John Kruschke has a recent blog post highlighting how removing
correlations can drastically change your model.

http://doingbayesiandataanalysis.blogspot.com/2019/07/shrinkage-in-hierarchical-models-random.html

Again, I'm with everybody else here: I'm not opposed to "removing"
correlations per se, but you should be aware of what it means in terms
of your model, estimates, and interpretation.

Phillip
On 1/8/19 7:38 pm, Ben Bolker wrote: