broom.mixed icon indicating copy to clipboard operation
broom.mixed copied to clipboard

term naming

Open bbolker opened this issue 7 years ago • 14 comments
trafficstars

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

bbolker avatar Dec 31 '17 21:12 bbolker

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) ...

bbolker avatar Apr 22 '19 16:04 bbolker

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.

mattfidler avatar Apr 22 '19 16:04 mattfidler

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.

bbolker avatar Apr 22 '19 16:04 bbolker

Ok. Thats fine with me.

mattfidler avatar Apr 22 '19 16:04 mattfidler

Dots are used in variable names, could that be problematic for the default . separator

mattfidler avatar Apr 22 '19 16:04 mattfidler

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 _

mattfidler avatar Apr 22 '19 16:04 mattfidler

Perhaps change . to , which is syntactically invalid for a variable name?

mattfidler avatar Apr 22 '19 16:04 mattfidler

Hmmm. Could use two dots (which are much less usual within names ...)

bbolker avatar Apr 22 '19 16:04 bbolker

That would work too.

mattfidler avatar Apr 22 '19 17:04 mattfidler

Just let me know what the default is and I will update my default.

mattfidler avatar Apr 22 '19 17:04 mattfidler

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 ...

bbolker avatar Apr 22 '19 19:04 bbolker

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.

mattfidler avatar Apr 22 '19 20:04 mattfidler

that's always the tough decision, isn't it?

bbolker avatar Apr 22 '19 21:04 bbolker

Indeed...

mattfidler avatar Apr 22 '19 21:04 mattfidler