robincar_covhr.Rd
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)
)
A data.frame with the required columns
Name of column in df with treatment variable
Name of the column in df with response variable
Name of column in df with event indicator (0/FALSE=no event, 1/TRUE=event)
Names of columns in df with car_strata variables
Names of columns in df with covariate variables
Treatment allocation ratio for the reference arm.
Reference arm of the treatment group, defaults to NULL, which results in using the first element of `unique(data[, treat_col])`.
Name of the type of covariate-adaptive randomization scheme. One of: "simple", "pocock-simon", "biased-coin", "permuted-block".
Adjustment method (one of "CL", "CSL")
Interval for uniroot function
An object with attribute named "result", which lists:
estimate of the hazard ratio
SE estimate of the hazard ratio
estimate of the covariate-adjusted hazard ratio
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.