Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

discuss new defaults #7

Closed
bbolker opened this issue Dec 31, 2017 · 6 comments
Closed

discuss new defaults #7

bbolker opened this issue Dec 31, 2017 · 6 comments

Comments

@bbolker
Copy link
Owner

bbolker commented Dec 31, 2017

inst/NEWS.Rd now contains the following description, which is my preference for the (default) behaviour of mixed model tidiers. I don't actually understand the use case for which effects="ran_coefs" (the old behaviour) is the desired default. I could see an argument for effects="fixed" (only) rather than effects=c("fixed","ran_pars"), but slightly prefer the latter.

Discuss.


The default behaviour of most mixed-model tidiers has changed/will gradually be changed to the following (description modified from TJ Mahr at <URL: https://github.com/tidyverse/broom/issues/96>):

  • Random effect variances and covariances can be now extracted. ‘effects = "ran_pars"’ returns the standard deviations/correlations of random effects (if ‘scales="sdcor"’) or their variances and covariances (if ‘scales = "varcov"’)
  • Random effects estimates are now extracted with ‘effects = "ran_coefs"’ for the group-level estimates (previously these effects were extracted with ‘tidy(model, "random")’) or ‘effects = "ran_modes"’ for the conditional modes (deviations of the group-level parameters from the population-level estimates)
  • ‘effects’ can take a vector of values (those listed above, plus "fixed" for fixed effects). The default value is ‘effects = c("ran_pars", "fixed")’ which extracts random effect variances/covariances and fixed effect estimates.
@paul-buerkner
Copy link

I would probably prefer effects=c("fixed","ran_pars") since these are the coefficients most people would use to initially interprete their model results.

Regarding random effects, I don't like the term ran_modes, since it is incorrect for Bayesian models (we don't use [conditional] modes). Also effects = "ran_coefs" as the sum of fixed and random effects I assume is still based on the conditional modes of the random effects for (RE)ML models, so the terms are not really consistent.

Not sure what the best naming convention is here. Using ran_ranef to refer to the ranef method (in the same way as ran_coef refers to the coef method) is probably not optimal.

@bbolker
Copy link
Owner Author

bbolker commented Jan 11, 2018

the current MCMCglmm tidier has ran_vals for the BLUPs/conditional modes/posterior means of the random variables ... does that sound like a reasonable universal choice?

You might want to chime in on #6 as well (got a bit derailed into terminology/API questions toward the end) ... e.g. intervals vs conf.int vs conf_int vs ... ?

@paul-buerkner
Copy link

ran_vals sounds reasonable to me. It a term's, which I have not seen anywhere else before, but it doesn't trigger false impressions of what the result will be I think.

@bbolker
Copy link
Owner Author

bbolker commented Jan 28, 2018

@paul-buerkner; @dgrtwo what do you think about intervals vs conf.int vs conf_int? This is a situation where we're not just deviating from previous behaviour of some parts of broom.mixed, but from the core broom behaviour (and thus risking fragmentation). I feel like intervals is rather long, but I do agree that it's more general.

There's also the question of what the resulting columns should be called. conf.low and conf.high as in broom (not really consistent with credible intervals)? lwr and upr? lo and hi? lower and upper? c_lwr (where c could stand for credible or confidence)?

PS @paul-buerkner , how would you feel about modifying your par_types argument to bring it into closer correspondence with the other tidying methods? I would say

  • par_type=="non-varying" -> effects=="fixed"
  • par_type=="varying" -> effects==ran_vals (I guess? or is this what I would call ran_coefs, which we haven't decided on a name for?)
  • par_type=="hierarchical" -> effects==ran_pars

?

@dmenne
Copy link
Contributor

dmenne commented Jan 29, 2018

Gelman/Hill have some arguments against this naming (page 245), but it is closer to the nlm(e,4) world.

@bbolker
Copy link
Owner Author

bbolker commented Jun 29, 2018

This has been implemented now, closing it. Decided not to change conf.int/conf.low/conf.high - we don't love these, but they're compatible with broom.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants