Hi all,
I have a problem using spread_draws() fim tidy_bayes with multilevel models fitted with brms. I get variable names like r_Studienstand:ID__theta[0_1,Intercept]
and when I call model_multilvl %>% spread_draws(r_Studienstand:ID__theta[groupAndId])
I get the following error:
Error in r_Studienstand:ID__theta[groupAndId] : NA/NaN argument
In addition: Warning messages:
1: In r_Studienstand:ID__theta[groupAndId] :
numerical expression has 3 elements: only the first used
2: In r_Studienstand:ID__theta[groupAndId] :
numerical expression has 3 elements: only the first used
I’m pritty sure the : is the problem because variables without colons are fine and : are used in formulas to specify a range. I also tried model_multilvl %>% spread_draws('r_Studienstand:ID__theta'[groupAndId])
and got:
Error in spec[[2]] : subscript out of bounds
and model_multilvl %>% spread_draws(.$'r_Studienstand:ID__theta'[groupAndId])
yields:
Error in spread_draws_long_(draws, variable_names, dimension_names, regex = regex, : No variables found matching spec: c()[groupAndId]
Is there a way to specify the spread_draws call to work with the variable names or to alter the names in the fitobject?
- Operating System: Win 10 x64
- brms Version: 2.14.4