openpharma / mmrm

Mixed Models for Repeated Measures (MMRM) in R.
https://openpharma.github.io/mmrm/
Other
122 stars 21 forks source link

"mmrm" not available in engines of linear_reg() when using tidymodels #367

Closed Dannyzhd closed 10 months ago

Dannyzhd commented 10 months ago

Dear development team.

I was trying to integrate mmrm with tidymodels as you showed on one of the workshops. But it says "mmrm" is not supported yet. parsnip::show_engines("linear_reg")

# A tibble: 7 × 2
  engine mode      
  <chr>  <chr>     
1 lm     regression
2 glm    regression
3 glmnet regression
4 stan   regression
5 spark  regression
6 keras  regression
7 brulee regression

whereas in the online workspace from the workshop I can indeed get 8. mmrm regression

my local package version: mmrm: 0.3.3 parsnip: 1.1.1 (same as the workshop version) tidymodels: 1.1.1 (same as the workshop version)

I am not sure if this is a bug or is the mmrm engine temporrily unavailable due to some maintenance. Please kindly let me know if I missed some set up steps that led to this.

Thanks in advance for taking the time to review my question. Best regards.

yonicd commented 10 months ago

The engine methods are built into mmrm, not native to parsnip.

This means you need to load the mmrm library

library(mmrm)

prior to using tidymodels functions

Dannyzhd commented 10 months ago

Thanks so much!