Skip to content

coxsnell_flexsurvreg fails if the model formula contains a function call #181

@chjackson

Description

@chjackson

coxsnell_flexsurvreg fails when the formula contains a transformation.

fitg <- flexsurvreg(formula = Surv(futime, fustat) ~ factor(ecog.ps),  data = ovarian, dist = "gengamma")
coxsnell_flexsurvreg(fitg)

Users can work around this by transforming their data before calling flexsurvreg. However it would be nice to handle this properly.
Just as in #167 it seems like the function stats::get_all_vars would be useful to get the untransformed data used in a formula, but this fails for the cases demonstrated in #167 (comment)

Suggestions appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions