Closed kzalocusky closed 4 years ago
I can take on this issue.
The issue is now fixed in development. Use vr_KM_est(data = data, strata = NULL). Mind that the time variable is expecting to be named 'AVAL' and the censoring variable 'CNSR' with 1 = censored.
Issue description
I'm hoping to generate kaplan-meier plots/tables without stratifying my population. My equation looks like this: surv_eq <- "survival::Surv(time, status)~1"
Steps to reproduce the issue
Please share code if possible.
What's the expected result?
I get back a summary table if I supply "ms_subtype" rather than "1" as the strata. For possibly unrelated reasons, I'm unable to generate a kaplan-meier plot even with strata supplied (see below).
What's the actual result?
vr_kaplan_meier_summary() generates this error if I do not supply strata: Error: Column
strata
must be length 9 (the number of rows) or one, not 0vr_kaplan_meier_summary() generates the expected tables if I do supply strata.
vr_kaplan_meier() generates this error if I do not supply strata: Error in data.frame(time = survfit_summary$time, n.risk = survfit_summary$n.risk, : arguments imply differing number of rows: 43, 0
vr_kaplan_meier() generates this error if I do supply strata: Error in summarize(., max_time = max(time)) : argument "by" is missing, with no default
Additional details / screenshot