Wrapper for speff2trial::speffsurv: See speff2trial::speffSurv
Source:R/speffsurv_impart.R
speffsurv_impart.RdWrapper for speff2trial::speffsurv: See speff2trial::speffSurv
Usage
speffsurv_impart(
data,
estimand = "log_hazard_ratio",
formula,
treatment_column = NULL,
alpha = 0.05,
ci = FALSE
)Arguments
- data
A
data.frame- estimand
A
charactervector - must be "log_hazard_ratio" (default)- formula
A
formulafor covariate adjustment.- treatment_column
A
characterscalar, indicating the column containing the treatment indicator.- alpha
A
numericscalar, indicating Type I error rate- ci
A
logicalscalar: should CI be returned
Value
A list containing the estimate, standard error, estimand,
and confidence interval (if requested).
Examples
speffsurv_impart(
data = sim_colon_cancer,
estimand = "log_hazard_ratio",
formula =
survival::Surv(time = years_to_death, event = event_death) ~
age + sex + obstruction + perforation + organ_adherence + positive_nodes +
differentiation + local_spread,
treatment_column = "tx",
alpha = 0.05,
ci = FALSE
)
#> $estimate
#> [1] -0.3588601
#>
#> $se
#> [1] 0.08296293
#>
#> $variance
#> [1] 0.006882848
#>
#> $influence
#> NULL
#>
#> $lcl
#> NULL
#>
#> $ucl
#> NULL
#>
#> $alpha
#> [1] 0.05
#>
#> $estimand
#> [1] "log_hazard_ratio"
#>