Open bbolker opened 6 years ago
Should there be a set of default parameters in the tidy/augment/glance that are built-in into all supported models? This would allow for a common api, with changes only to the arguments of the broom.mixed functions.
can you be more specific? give an example?
I'm thinking something along the lines of every tidy function should at least have the following parameters:
Or should each model have an independently maintained set of functions that don't necessarily have to the same parameters. (Like brms with "intervals", since credible intervals != confidence intervals).
I'm thinking of a more unified api among mixed models tidiers.
good points.
conf.int
for a while, at least to conf_int
(since that's more tidyverse-like); it does make sense to change it to intervals
, for reasons you suggest above (although IMO it would be not too horrible to keep conf[_.]int
and note that it has a different meaning. I'd really like to change the names of the returned columns, conf.low
and conf.high
, to lower
/upper
or lwr
/upr
(these are shorter, and each pair has the same length; I've sometimes used conf.lo
and conf.hi
, but I prefer lower
/upper
- that would also take care of the credible vs confidence issue). However, I haven't wanted to do any of this for fear or breaking (back-)compatibility with broom
. transform
rather than exponentiate
(as in tidy.lm
)So the questions are:
broom
-compatibility in pursuit of consistency within broom.mixed
(and/or other criteria such as keeping snake case)?API.md
) ? Does such a document exist already for broom
?@dgrtwo ? Opinions?
I think that since we are splitting up parts of broom
, this is our chance to get naming conventions straight and general enough. We won't get it again in a similar way. So my preference would be to break all broom-compatibility we need to break in order to have consistent conventions that "feel right" going forward.
With regard to the specific names, I prefer using intervals
, lower/upper
and transform
.
Agreed, but probably better singular (interval
)
I've gradually been refactoring the lme4 tidiers, moving away from the
broom::fix*()
functions - instead, make sure columns are renamed appropriately on the fly, and usetibble::rownames_to_column()
as appropriate. Need to make sure that code is re-used appropriately and that behaviour is a similar as possible across these cases.