Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
chjackson opened this issue Feb 17, 2024 · 0 comments
Open
Labels

Comments

@chjackson
Copy link
Owner

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!

@chjackson chjackson added the bug label Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant