Coding individual variability of noise in brms model

Question about coding of the variation in a BRMS model:

I have built a hierarchical model; the data format is that for each participant I have about 50 measurements. I want to allow their mean and variation to vary for each participant (and the mean also to vary between groups).

I have coded it like this:

bf(y ~ 1+ group + (1|ID), sigma ~ group + (1|ID)

I hope this looks ok.

I am a bit unsure what the equivalent model for a single subject would be? I’ve tried two options:

[1] bf(y ~ 1, sigma ~1)

or:

[2] y ~ 1

I thought that these models would be equivalent for a single subject. But I don’t think they are. For example, for one participant I get as outputs

for model [1]:
Population-level effects:
Intercept - estimate: 4.75
sigma_intercept - estimate: 0.91

for model [2]:
Population level effects
Intercept - estimate: 4.75
family specific parameters:
sigma: 2.51

→ So, the intercept is the same, but I’m not sure how to map the two sigma values onto each other?

When I simulated the ‘y’ values to test my model (in fact they are parameters that then get used in a more complicated decision-making model), I use:

rnorm(mean=subject.mean, sd= subject.sd); I’m assuming this is equivalent to model [2]?

I would be very grateful for any pointers
Jacquie

Howdy.
When you just do brm(y ~ 1, data=data) the identity link for sigma is used.
However, when you do brm(bf(y ~ 1, sigma ~ 1), data=data) the log link for sigma is used.

1 Like

Thanks!! sorry, actually seeing now that it says that in the top of the BRMS output as well; somehow my eyes had skipped over this