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

Stratification based on censored data #445

Open
hfrick opened this issue Aug 9, 2023 · 0 comments
Open

Stratification based on censored data #445

hfrick opened this issue Aug 9, 2023 · 0 comments
Labels
feature a feature request or enhancement

Comments

@hfrick
Copy link
Member

hfrick commented Aug 9, 2023

We currently don't allow stratification based on Surv objects and instead suggest to use the time or event variable directly:

rsample/R/misc.R

Lines 105 to 107 in 46de181

if (inherits(data[, strata], "Surv")) {
rlang::abort("`strata` cannot be a `Surv` object. Use the time or event variable directly.")
}

Given that we've settled on the advice to make the Surv object outside of a recipe, people may not have the individual variables available. Soo we should rethink this.

@hfrick hfrick added the feature a feature request or enhancement label Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant