iwillsurvive | R Documentation |
Create an iwillsurvive object
iwillsurvive(
data,
followup_time = "followup_months",
event_status = "event_status",
patient_id = "patientid",
terms = NULL,
type = "right",
fit = NULL,
event_title = "<event>",
index_title = "<index>",
title = NULL,
followup_time_units = NULL,
verbose = TRUE
)
data |
dataframe. A one-row-per-patient dataframe |
followup_time |
character. The column representing followup time. |
event_status |
character. The column representing event status – must be logical. |
patient_id |
character. ... uniquep patientid. |
terms |
character. A vector of model terms. |
type |
character. See ?survival::survfit.formula |
fit |
survfit. An optional survfit object created from survival:survfit(). If specified, no additional model(s) will be fit. |
event_title |
character. An optional name of |
index_title |
character. |
title |
character. An optional title of the analysis that is passed to print() and plot() methods. |
followup_time_units |
character. Units used in followup time |
verbose |
logical. If TRUE, return messages |
survfit. See ?survival::survfit.object to learn more
cohort_survival
# No Terms
cohort_fit <- iwillsurvive(cohort_survival,
followup_time = "followup_days"
)
cohort_fit
# Now including a term
cohort_fit <- iwillsurvive(cohort_survival,
followup_time = "followup_days",
terms = "condition"
)
cohort_fit
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.