Proportional Hazard Cox regression with a multiple predictors
IQRcoxRegression.Rd
This is a convenient interface to the coxph function that performs a proportional hazard regression for one or multiple predictors and displays the results graphically. It handles continuous and categorical predictors as well as their interaction.
IQRcoxRegression(
data,
TIMEcol,
CENScol,
PREDcol = NULL,
IDcol = "ID",
PREDinteraction = NULL,
PREDval = NULL,
RHSformula = NULL,
ci.level = 0.95,
xlab = NULL,
ylab = NULL,
tunit = NULL,
pathname = NULL,
FLAGreport = TRUE,
SIGNIF = 4
)
Arguments
- data
A data frame containing the columns that are defined in the following.
- TIMEcol
Name of the column in data that contains time of the event.
- CENScol
Name of the column in data that contains censoring information. Expects 0 for uncensored and 1 for censored observations.
- PREDcol
Name(s) of the column in data that should be used as a predictor.
- IDcol
Name of the column with subject IDs (only for annotation purpose).
- PREDinteraction
Character vector with comma separated predictor names for which an interaction term is included. Only second order interactions are considered.
- PREDval
Named vector with coefficients of numerical predictors that should be fixed (categorical are not handled yet). Second order interactions can be fixed by the two predictor names separated by comma. Note that the order of variables within interaction terms needs to be the same as given in PREDinteraction or the formula.
- RHSformula
Formula or string to define the model for coxph. If given (not NULL) the arguments VARcol, PREDcol, PREDinteraction, and FLAGintercept are ignored
- ci.level
Confidence interval level (between 0 an 1, defaults to 0.95)
- xlab
Label for the x-axis.
- ylab
Label for the y-axis.
- tunit
Label for time unit.
- pathname
If given, path to which results are written.
- FLAGreport
Whether to produce report ready table with estimates.
- SIGNIF
Number of significant digits used for the displayed values.
Value
IQRcoxRegression object: Main output is a table with estimation results. Attributes to the output argument contain a data frame with the estimates, a data frame with global model metrics, the coxph fit object, and diagnostic plots
See also
Other Survival analysis:
export_IQRcoxRegression()
,
import_IQRcoxRegression()
,
km_IQRsurvival()
,
plot_IQRcoxRegression()
,
summary_IQRcoxRegression()