View source: R/robincar-covhr.R
robincar_covhr | R Documentation |
Estimate a covariate-adjusted hazard ratio ('adj_method="CL"'), or a covariate-adjusted stratified hazard ratio ('adj_method="CSL"').
robincar_covhr(
df,
treat_col,
response_col,
event_col,
car_strata_cols = NULL,
covariate_cols = NULL,
p_trt = 0.5,
ref_arm = NULL,
car_scheme = "simple",
adj_method = "CL",
interval = c(-10, 10)
)
df |
A data.frame with the required columns |
treat_col |
Name of column in df with treatment variable |
response_col |
Name of the column in df with response variable |
event_col |
Name of column in df with event indicator (0/FALSE=no event, 1/TRUE=event) |
car_strata_cols |
Names of columns in df with car_strata variables |
covariate_cols |
Names of columns in df with covariate variables |
p_trt |
Treatment allocation ratio for the reference arm. |
ref_arm |
Reference arm of the treatment group, defaults to NULL, which results in using the first element of 'unique(data[, treat_col])'. |
car_scheme |
Name of the type of covariate-adaptive randomization scheme. One of: "simple", "pocock-simon", "biased-coin", "permuted-block". |
adj_method |
Adjustment method (one of "CL", "CSL") |
interval |
Interval for uniroot function |
An object with attribute named "result", which lists:
theta_L |
estimate of the hazard ratio |
se_theta_L |
SE estimate of the hazard ratio |
theta_CL |
estimate of the covariate-adjusted hazard ratio |
se_theta_CL |
SE estimate of the covariate-adjusted hazard ratio |
Other attributes are the settings used, data attributes, and the original data frame supplied by the user.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.