bbolker / broom.mixed

tidy methods for mixed models in R
229 stars 24 forks source link

version 0.2.0 release #25

Closed bbolker closed 6 years ago

bbolker commented 6 years ago

@dmenne @dgrtwo @wpetry @JWiley @alexpghayes (I don't know if this will work for everyone)

I don't know of any release-blocking, or even release-wishlist, items, but would be happy to hear of any (and would be even happier to have people look over the package and see if there are any issues)

wpetry commented 6 years ago

I played around quickly with some of the glmmTMB tidiers using some code written under an older version (v. 0.0.1, 83dbbf6 or something close). I really liked the new tibble return, and I agree this is the right way to go. I did however find a few potential issues, ranked in order of concern (subjectively to my own typical use cases):

bbolker commented 6 years ago

It looks like the "component" column has been dropped in tidy.glmmTMB. This matters for zero-inflated models where it's not clear which (Intercept) is which when both the zi and conditional components fit an intercept. Maybe also a problem for dispersion models?

oops, fixed.

There appears to be some unresolved renaming/cleaning of column names in the tidy.glmmTMB function. ... The group column doesn't fill correctly on rows 1-6 (or at least doesn't fill as it's documented and how I would intuitively expect it to).

Do you mean rows 1-3? I switched that to be NA on purpose. I think it makes just as much (if not more) sense that "fixed" ("fixed" isn't really a group), and it makes the code slightly cleaner since we can just compose the sub-tibbles for each effect (fixed, ran_pars, ran_vals, etc.), and then rely on bind_rows() to insert NA values appropriately. Do you object/see potential problems? Can you remind me where it's documented so that I can fix the documentation?

It may be worthwhile to add language to the augment.glmmTMB documentation that explains additional columns that may appear. For example, a model fit with glmmTMB(..., weights = someColumn, ...) will add a column called X.weights. Cleaning up these naming conventions would be better as an issue for broom. broom.mixed could simply offer blanket text about other common model components being included as columns.

Could you add this as a separate issue?

Formatting pedantry: Looks like an extra "_" snuck in for the random effect standard error in the "term" column in tidy.glmmTMB. Could break some folks' downstream code.

This was actually on purpose. I saw this in some of the brms term names, and thought it could make it easier, downstream, if people had single underscores in some of their variable names and wanted to split the prefixes from the variable name e.g. with strsplit() ...

alexpghayes commented 6 years ago

I don't think there are any release blocking items, but the more consistent broom and broom.mixed, the better off we'll both be. Might be worth taking a quick look at the adding new tidiers vignette. At some point it'll be good to pass the modeltests tests, but that isn't on CRAN just yet.

bbolker commented 6 years ago

@alexpghayes :

I'm just about ready to send to CRAN ...

bbolker commented 6 years ago

Sent! (I wanted to get it over with.) Let's hope it wasn't premature ...