- data
A data frame.
- x
A character string of the predictor variable.
- y
A character string of the outcome variable.
- time
A character string of the time variable. If NULL, logistic regression is used.
Otherwise, Cox proportional hazards regression is used.
- time2
A character string of the ending time of the interval for interval censored or counting process
data only.
- model_covs
A character vector or a named list of covariates for different models.
If NULL, only the crude model is used.
- cluster
A character string of the cluster variable. If set, correct for heteroscedasticity and for
correlated responses from cluster samples using rms::robcov().
- pers
A numeric vector of the denominators of variable x. Set this denominator to obtain a reasonable
OR or HR.
- factor_breaks
A numeric vector of the breaks to factorize the x variable.
- factor_labels
A character vector of the labels for the factor levels.
- quantile_breaks
A numeric vector of the quantile breaks to factorize the x variable.
- quantile_labels
A character vector of the labels for the quantile levels.
- label_with_range
A logical value indicating whether to add the range of the levels to the labels.
- save_output
A logical value indicating whether to save the results.
- figure_type
A character string of the figure type. Can be "png", "pdf", and other types that
ggplot2::ggsave() support.
- ref_levels
A vector of strings of the reference levels of the factor variable. You can use "lowest"
or "highest" to select the lowest or highest level as the reference level. Otherwise, any level that
matches the provided strings will be used as the reference level.
- est_nsmall
An integer specifying the precision for the estimates in the plot.
- p_nsmall
An integer specifying the number of decimal places for the p-values.
- pval_eps
The threshold for rounding p values to 0.
- median_nsmall
The minimum number of digits to the right of the decimal point for the median survival time.
- colors
A vector of colors for the KM curves.
- xlab
A character string of the x-axis label of the survival plot.
- legend_title
A character string of the title of the legend.
- legend_pos
A numeric vector of the position of the legend.
- pval_pos
A numeric vector of the position of the p-value.
- n_y_pos
A numerical of range 0 to 1 to assign the y position of total sample count. NULL to hide.
- height
The height of the plot.
- width
The width of the plot.
- ...
Additional arguments passed to the survminer::ggsurvplot function for KM curve.