survival_score_functions | R Documentation |
These functions compute the log-rank score statistics for a survival analysis. Depending on the function, these are stratified and/or adjusted for covariates.
h_lr_score_no_strata_no_cov(
theta,
df,
treatment,
time,
status,
n = nrow(df),
use_ties_factor = TRUE
)
h_lr_score_strat(
theta,
df,
treatment,
time,
status,
strata,
use_ties_factor = TRUE
)
h_lr_score_cov(
theta,
df,
treatment,
time,
status,
model,
theta_hat = theta,
use_ties_factor = TRUE,
hr_se_plugin_adjusted = TRUE
)
h_lr_score_strat_cov(
theta,
df,
treatment,
time,
status,
strata,
model,
theta_hat = theta,
use_ties_factor = TRUE,
hr_se_plugin_adjusted = TRUE
)
theta |
( |
df |
( |
treatment |
( |
time |
( |
status |
( |
n |
( |
use_ties_factor |
( |
strata |
( |
model |
( |
theta_hat |
( |
hr_se_plugin_adjusted |
( |
The hr_se_plugin_adjusted
flag is relevant only for the standard error of the covariate adjusted
log hazard ratio estimate: When TRUE
, the adjusted hazard ratio estimate
is plugged in into the variance formula, as per the original publication.
On the other hand, when FALSE
, the unadjusted estimate is used instead. This is explained in more
detail in the vignette "Survival Analysis with RobinCar2" in Section "Covariate adjusted analysis without strata".
Note that for the not covariate adjusted score functions, these also work
with a numeric
theta
vector of length > 1.
The score function value(s), with the following attributes:
sigma_l2
: The variance of the log-rank statistic.
se_theta_l
: The corresponding standard error term for the log hazard ratio.
n
: The number of observations used in the calculation.
h_lr_score_no_strata_no_cov()
: without strata or covariates.
h_lr_score_strat()
: with strata but without covariates.
h_lr_score_cov()
: with covariates but without strata.
h_lr_score_strat_cov()
: with strata and covariates.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.