analyse_ahr {SimNPH} | R Documentation |
Analyse the dataset using extimators for the the average hazard ratio
Description
Analyse the dataset using extimators for the the average hazard ratio
Usage
analyse_ahr(
max_time = NA,
type = "AHR",
level = 0.95,
alternative = "two.sided"
)
Arguments
max_time |
time for which the RMST is calculated |
type |
"AHR" for average hazard ratio "gAHR" for geometric average hazard ratio |
level |
confidence level for CI computation |
alternative |
alternative hypothesis for the tests "two.sided" or "one.sieded" |
Details
The implementation from the nph package is used, see the documentation there for details.
alternative
can be "two.sided" for a two sided test of equality of the
summary statistic or "one.sided" for a one sided test testing H0: treatment
has equal or shorter survival than control vs. H1 treatment has longer
survival than control.
The data.frame returned by the created function includes the follwing columns:
-
p
p value of the test, see Details -
alternative
the alternative used -
AHR
/gAHR
estimated (geometric) average hazard ratio -
AHR_lower
/gAHR_lower
unadjusted lower bound of the confidence interval for the (geometric) average hazard ratio -
AHR_upper
/gAHR_upper
unadjusted upper bound of the confidence interval for the (geometric) average hazard ratio -
CI_level
the CI level used -
N_pat
number of patients -
N_evt
number of events
Value
Returns an analysis function, that can be used in runSimulations
See Also
Examples
condition <- merge(
assumptions_delayed_effect(),
design_fixed_followup(),
by = NULL
) |>
head(1)
dat <- generate_delayed_effect(condition)
analyse_ahr()(condition, dat)
analyse_ahr(type = "gAHR")(condition, dat)
analyse_ahr(max_time = 50, type = "AHR")(condition, dat)
analyse_ahr(max_time = 50, type = "gAHR")(condition, dat)