paul-buerkner / brms

brms R package for Bayesian generalized multivariate non-linear multilevel models using Stan
https://paul-buerkner.github.io/brms/
GNU General Public License v2.0
1.27k stars 182 forks source link

Align prefixes of regression parameters? #543

Open paul-buerkner opened 5 years ago

paul-buerkner commented 5 years ago

Currently, "standard" regression coefficients have the b_ prefix, while special coefficients such as monotonic effects have bsp_, and category-specific effects have bcs_. For several applications outside of brms itself, it may be better to make them all use the b_ prefix (e.g., see https://github.com/bbolker/broom.mixed/issues/45), but it may break backwards compatibility if users directly target the parameter names. Any opinions are welcome. Bringing @jgabry and @bgoodri into the discussion.

mvuorre commented 5 years ago

For what it's worth, from one user's perspective, I find the different prefixes less useful than having the same prefix. Different prefixes lead to what seem unnecessary complications when postprocessing the model's output (as you note with tidy(), for example).

strengejacke commented 5 years ago

I'm not quite sure, but I think that everything that makes sense to get an own "paragraph" or section in the output, e.g. from summary(), is worth having its own unique prefix to be distinguishable. It should then be the task of packages like broom.mixed to clean the output.

paul-buerkner commented 5 years ago

That would be an argument for aligning the prefixes I guess since the regression coefficients of special predictor types are nowhere explicitly differentiated from the basic regression coefficients in a user-facing function.

strengejacke commented 5 years ago

As far as I remember, simplex parameters are printed separately from the remaining coefficients, so I would give them different prefixes.

paul-buerkner commented 5 years ago

The simplex parameters of monotonic effects are not "regression coefficients" under my personal definition and as such are not under discussion. They will, of course, keep their simo_ prefix.

However, the scale parameters of monotonic effects have regression coefficient like properties and currently share the prefix bsp_ with other special coefficients. Those may be change to b_ at some point.

strengejacke commented 5 years ago

Ah, I forgot. I confused this, thought that simplex parameters were starting with bsp. But yes, than I would suggest aligning the prefixes you mentioned.