Comments (8)
Let's have a look at it.
First try
library(mmrm)
library(broom.helpers)
mod <-
mmrm(
formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
data = fev_data
)
tidy_plus_plus(mod)
#> ! `broom::tidy()` failed to tidy the model.
#> ✔ `tidy_parameters()` used instead.
#> ℹ Add `tidy_fun = broom.helpers::tidy_parameters` to quiet these messages.
#> ✖ Unable to identify the list of variables.
#>
#> This is usually due to an error calling `stats::model.frame(x)`or `stats::model.matrix(x)`.
#> It could be the case if that type of model does not implement these methods.
#> Rarely, this error may occur if the model object was created within
#> a functional programming framework (e.g. using `lappy()`, `purrr::map()`, etc.).
#> # A tibble: 11 × 19
#> term variable var_label var_class var_type var_nlevels contrasts
#> <chr> <chr> <chr> <int> <chr> <int> <chr>
#> 1 (Intercept) (Interc… (Interce… NA unknown NA <NA>
#> 2 RACEBlack or Afr… RACEBla… RACEBlac… NA unknown NA <NA>
#> 3 RACEWhite RACEWhi… RACEWhite NA unknown NA <NA>
#> 4 SEXFemale SEXFema… SEXFemale NA unknown NA <NA>
#> 5 ARMCDTRT ARMCDTRT ARMCDTRT NA unknown NA <NA>
#> 6 AVISITVIS2 AVISITV… AVISITVI… NA unknown NA <NA>
#> 7 AVISITVIS3 AVISITV… AVISITVI… NA unknown NA <NA>
#> 8 AVISITVIS4 AVISITV… AVISITVI… NA unknown NA <NA>
#> 9 ARMCDTRT:AVISITV… ARMCDTR… ARMCDTRT… NA unknown NA <NA>
#> 10 ARMCDTRT:AVISITV… ARMCDTR… ARMCDTRT… NA unknown NA <NA>
#> 11 ARMCDTRT:AVISITV… ARMCDTR… ARMCDTRT… NA unknown NA <NA>
#> # ℹ 12 more variables: contrasts_type <chr>, reference_row <lgl>, label <chr>,
#> # estimate <dbl>, std.error <dbl>, conf.level <dbl>, conf.low <dbl>,
#> # conf.high <dbl>, statistic <dbl>, df.error <dbl>, p.value <dbl>, n <dbl>
Created on 2023-07-27 with reprex v2.0.2
It seems that there is no tidy()
method for this model but tidy_parameters()
does work.
I need to check how to identify variables.
from broom.helpers.
@ddsjoberg could you have a look at #229 ? It would requires testing to check if everything works as expected.
from broom.helpers.
If you want to provide them some feedback:
- they could develop a
tidy()
method to be sure that the tidier is working as expected - a
terms()
method is missing - a
model.matrix()
method is missing - however,
model.frame()
is working as expected - to be noted,
weights(model)
return a vector of the same length of the original data frame passed to the model, but not of the length ofmodel.frame(model)
(where NA values have been removed). Withlm()
orglm()
, the vector obtained withweights()
is of the same length asmodel.frame(mod)
from broom.helpers.
@larmarange thank you soooo much!! I'll give them this feedback, and let you know!
If they are amenable to these updates, would this affect PR #229? Should I review it now, it wait to here back from them?
from broom.helpers.
If they implement some of these feedbacks, #229 will have to be updated as some of the custom code I wrote would be useless.
However, you can already test if the results are correct and we can implement some unit tests, that will still be valid.
Regards
from broom.helpers.
awesome, i'll review and add unit tests! What timeline do you need to have this included in the next release?
from broom.helpers.
The next release will be the 7 of August. It is a minor release to be retained on CRAN (see #225 ).
We will prepare another release for mmrm support later in August or September. No rush
from broom.helpers.
Great, thank you :)
from broom.helpers.
Related Issues (20)
- Support for MASS::contr.sdif() contrasts
- Support for zero-inflated models
- beta regression is not supported yet HOT 2
- Considering a `tidy_post_fun` argument to `tidy_plus_plus()` HOT 2
- Support with coxphf model HOT 9
- Bug fixes and improvements for mixed models HOT 1
- tbl_regression (package gtsummary) and ggcoef_model (package ggstats) not working on the output of a replicate svyglm model HOT 2
- fantastic support of multivariate quantile regression for any quantile HOT 1
- Support for survival::cch model? HOT 5
- Avg_comparisons and nlme::lme() models HOT 1
- order of variable levels with marginal tidiers HOT 8
- Release broom.helpers 1.15.0
- Take into account (id) when computing model_get_n() for coxph models
- `marginaleffects::datagridcf()` is deprecated
- Do you know the status of the {margins} pkg? HOT 3
- Explore better support of VGAM::vglm() models HOT 1
- Execution time HOT 4
- marginaleffects::datagridcf() is deprecated
- pkgdown site has no search facility HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from broom.helpers.