Hi,
This is my model specification:
model009 = brm(
pairtotal ~ Condition +Trials_new +(Trials_new|Subnum),
family = gaussian(),
data = bloddy1
save_all_pars = TRUE,
sample_prior = TRUE,
chains = 6,
iter = 10000,
seed = 009
)
I get the following error.I have played around with a number of different iterations.
My data is a table of 4000*30

The largest R-hat is NA, indicating chains have not mixed.
Running the chains for more iterations may help. See http://mc-stan.org/misc/warnings.html#r-hatBulk Effective Samples Size (ESS) is too low, indicating posterior means and medians may be unreliable.
Running the chains for more iterations may help. See http://mc-stan.org/misc/warnings.html#bulk-essTail Effective Samples Size (ESS) is too low, indicating posterior variances and tail quantiles may be unreliable.
Running the chains for more iterations may help. See http://mc-stan.org/misc/warnings.html#tail-ess

Why not use intercepts, i.e., pairtotal ~ 1 + Condition + Trials_new + (1 + Trials_new | Subnum)?

What does the output of rhat(model009) look like?

What’s pairtotal, i.e., can you plot the density and explain a bit what you want to model?

You use default priors? What does get_prior(pairtotal ~ 1 + Condition + Trials_new + (1 + Trials_new | Subnum), data =bloddy1, family = gaussian) look like?

6 because when I digged around this forum for a solution, I came across this number around this R-hat Na issue.
2.Because as @mike-lawrence mentioned I thought writing 1+… is not explicitly required for brms like in lme4.

There is an intercept added automatically, but it is by default not part of vector b, and so e.g. has it’s own prior specification. Something to do with how brms does mean centering to improve performance. y ~ x is the same as y ~ 1 + x, and you can turn off the special handeling of the intercept with y ~ 0 + Intercept + x.

The Intercept is it’s own class, separate from the other population level effects which are all in class b. You can see that in the image you posted.

This was just to clarify that the formula torkar wrote in his point 2 is indeed identical to your formula.

But perhaps it’s worth pointing you to the section “Parameterization of the population-level intercept” of ?brmsformula, which reads:

… be aware that you are effectively defining a prior on the intercept of the centered design matrix not on the real intercept. You can turn off this special handling of the intercept by setting argument center to FALSE. For more details on setting priors on population-level intercepts, see set_prior.

As well as the referenced ?set_prior and the second paragraph of section 1.

I’m not sure if that means your prior on the Intercept with mean 2 may be causing issues.

@ Ax3man
The trials are centered. Could you explain the difference between " 0+ intercept" and ‘y~x’ in this particular context? Is the interpretation of intercept different if I use a centered predictor in the first place?
What difference does it cause to the intercept or better how does the definition change when we have a centered predictor vs non-centered one? @andymilne