You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
brms allows users to model the residual standard deviation. tidy.brmsfit gives an error with such models. A MWE follows:
library(brms)
library(broom.mixed)
library(lme4)
### Let's repeat a model from lme4
fm1 <- brm(angle ~ recipe * temperature + (1|recipe) + (1|recipe:replicate),
data = cake,
cores = 4,
chains = 4)
### WORKS
tfm1 <- tidy(fm1)
### Complicate by adding heteroskedasticity
fm2 <- brm(bf(angle ~ recipe * temperature + (1|recipe) + (1|recipe:replicate),
sigma ~ recipe),
data = cake,
cores = 4,
chains = 4)
### DOESN'T WORK
tfm2 <- tidy(fm2)
The problem arises because the regular expression which identifies random effects uses the term "sigma". Here, "sigma" is present, but not because it identifies a random effect, but because it's the outcome in an auxiliary regression.
I think the issue can be resolved by dropping in the following code (or something equivalent) in just after line 227 in the code:
brms
allows users to model the residual standard deviation.tidy.brmsfit
gives an error with such models. A MWE follows:The problem arises because the regular expression which identifies random effects uses the term "sigma". Here, "sigma" is present, but not because it identifies a random effect, but because it's the outcome in an auxiliary regression.
I think the issue can be resolved by dropping in the following code (or something equivalent) in just after line 227 in the code:
The text was updated successfully, but these errors were encountered: