Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling of auto_prior for variables with space in categorical value #97

Open
PCK1992 opened this issue Mar 6, 2020 · 1 comment
Open

Comments

@PCK1992
Copy link

PCK1992 commented Mar 6, 2020

I have encountered a potential bug in the auto_prior() function handling of categorical variables that contain spaces

For example when I use auto_prior(data) and the data contains a factor variable with spaces in the individual categories (e.g. outcome 1 instead of outcome_1) priors are assigned but when you plug in the priors into brm() I get the following error:
The following priors do not correspond to any model parameter: outcome 2 ~ normal(0, 1) outcome 3 ~ normal(0, 1) Function 'get_prior' might be helpful to you.

The reference category is not mentioned. When I change the coding of the variable to outcome_2 by replacing the space everything works as expected.

@strengejacke
Copy link
Owner

Do you have a small reproducible example?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants