broom.mixed
broom.mixed copied to clipboard
term naming
It would be good to come up with a unified scheme for naming parameters (e.g. the random-effects correlation between A and B with grouping variable C) and finding streamlined ways to translate from, e.g. the MCMCglmm or brms naming convention to the standard
Current naming scheme is
((sd|var)|(cor|cov))__<term1>(.<term2>)?
In one place the separator between the type and terms components (__) is coded as options(broom.mixed.sep1). Could make the second separator (currently a dot) into options(broom.mixed.sep2) ...
I suppose you should probably put the options(broom.mixed.sep2) in what you have. I will use both with the defaults __ and . respectively for now.
I personally think that SD(parameter) is more readable, but it may cause other issues I am not thinking through right now.
broom.mixed.sep2 is done.
One of the desiderata for separators is that it should be relatively easy for people to use tidyr::separate to split columns if desired -- surrounding by parentheses makes that harder.
Ok. Thats fine with me.
Dots are used in variable names, could that be problematic for the default . separator
For example, I have seen many people use eta.v and eta.cl then the separator would be:
cor__eta.v.eta.cl
which would mean it is difficult to apply a tidyr::separate for the columns. Of course that is also true for _
Perhaps change . to , which is syntactically invalid for a variable name?
Hmmm. Could use two dots (which are much less usual within names ...)
That would work too.
Just let me know what the default is and I will update my default.
I'm going to leave the default as . for now; changing to .., while an improvement, will be a breaking change and I should think about the right way to get there ...
Ok. Let me know if/when you decide to change this.
I think it probably should be changed at some time, though. Preferably earlier than later since broom is still relatively new and it won't break as many things right now.
that's always the tough decision, isn't it?
Indeed...