Skip to content

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

@PCK1992

Description

@PCK1992

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions