About when to drop correlation between random intercept and slope

458 views
Skip to first unread message

David Sidhu

unread,
Apr 16, 2018, 4:25:41 PM4/16/18
to brms-users
I am estimating the following model:

exp1<-brm (DV ~ IV1*IV2+(1+IV1+IV2|Subject) + (1|Item), data=data1, family="bernoulli", prior = prior, warmup = 1500, iter = 3000, chains = 30)

All of the output in the resulting model looks good, except for the correlation between the subject intercept and IV1, which has an Rhat of 1.03.

I believe this means that the analysis has not converged on a value for this correlation.

However, the value of this correlation per se is not of interest to me, I only have the random effects in the model to increase accuracy with regards to the fixed effects. Thus, I'm wondering if it is necessary to have the model converge on a value for this correlation when my interest is solely in the fixed effects?

I've tried increasing the number of iterations and chains however this hasn't worked. I thought to try a model that doesn't estimate this correlation, but it doesn't seem like that's possible while still estimating the IV2 random slope, and its correlation with the subject intercept?

Thanks, as always.


Paul Buerkner

unread,
Apr 17, 2018, 3:14:49 AM4/17/18
to David Sidhu, brms-users
You can drop correlation by replacing "|" with "||" in random effects terms.

That said, I would rather include the correlation even if convergence is not optimal.
You may try setting a stronger prior on it. For instance

set_prior("lkj(2)", class = "cor", group = "Subject")

--
You received this message because you are subscribed to the Google Groups "brms-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brms-users+unsubscribe@googlegroups.com.
To post to this group, send email to brms-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brms-users/89817cf0-3f81-4513-8e28-08e2ba0e3f5b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Sidhu

unread,
Apr 17, 2018, 3:53:48 PM4/17/18
to brms-users
Thanks Paul! I will try changing the prior.

Out of interest, am I right that (1+IV1+IV2||Subject) will not model ANY correlations between slopes and intercepts?
I'm curious if there is a way to still model the intercept/IV2 correlation, and only not model the intercept/IV1 correlation?


On Tuesday, 17 April 2018 01:14:49 UTC-6, Paul Buerkner wrote:
You can drop correlation by replacing "|" with "||" in random effects terms.

That said, I would rather include the correlation even if convergence is not optimal.
You may try setting a stronger prior on it. For instance

set_prior("lkj(2)", class = "cor", group = "Subject")
2018-04-16 22:25 GMT+02:00 David Sidhu <dms...@gmail.com>:
I am estimating the following model:

exp1<-brm (DV ~ IV1*IV2+(1+IV1+IV2|Subject) + (1|Item), data=data1, family="bernoulli", prior = prior, warmup = 1500, iter = 3000, chains = 30)

All of the output in the resulting model looks good, except for the correlation between the subject intercept and IV1, which has an Rhat of 1.03.

I believe this means that the analysis has not converged on a value for this correlation.

However, the value of this correlation per se is not of interest to me, I only have the random effects in the model to increase accuracy with regards to the fixed effects. Thus, I'm wondering if it is necessary to have the model converge on a value for this correlation when my interest is solely in the fixed effects?

I've tried increasing the number of iterations and chains however this hasn't worked. I thought to try a model that doesn't estimate this correlation, but it doesn't seem like that's possible while still estimating the IV2 random slope, and its correlation with the subject intercept?

Thanks, as always.


--
You received this message because you are subscribed to the Google Groups "brms-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brms-users+...@googlegroups.com.

Paul Buerkner

unread,
Apr 17, 2018, 4:58:55 PM4/17/18
to David Sidhu, brms-users
You can specify

(1+IV2|Subject) + (0+IV1|Subject)

so that Intercept and IV2 will be modeled as correlated, but IV1 will not be modeled as correlated with the other two. Only works if IV1 is numeric (not a factor).

To unsubscribe from this group and stop receiving emails from it, send an email to brms-users+unsubscribe@googlegroups.com.

To post to this group, send email to brms-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages