marginaleffects
marginaleffects copied to clipboard
[DRAFT] adding support for the {mmrm} package
Hi,
this is an attempt to implement support for the {mmrm} package https://github.com/openpharma/mmrm following the steps outlined in the {marginaleffects} documentation https://marginaleffects.com/vignettes/extensions.html#marginaleffects-extension.
I am still unclear about the role of the option setting.
options("marginaleffects_model_classes" = "lm_manual")
Is it expected that the user triggers this everytime they want to use {marginaleffects} with {mmrm}? This does not seem to be the case for other extensions.
My test case is
library(mmrm)
fit <- mmrm(
formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
data = fev_data
)
predictions(fit, newdata = insight::get_data(fit))
Also tagging @lang-benjamin @danielinteractive