Wrapper for speff2trial::speffsurv: See speff2trial::speffSurv
Source:R/speffsurv_impart.R
speffsurv_impart.Rd
Wrapper 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
character
vector - must be "log_hazard_ratio" (default)- formula
A
formula
for covariate adjustment.- treatment_column
A
character
scalar, indicating the column containing the treatment indicator.- alpha
A
numeric
scalar, indicating Type I error rate- ci
A
logical
scalar: 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
#>
#> $var
#> [1] 0.006882848
#>
#> $lcl
#> NULL
#>
#> $ucl
#> NULL
#>
#> $alpha
#> [1] 0.05
#>
#> $estimand
#> [1] "log_hazard_ratio"
#>