summarise_test {SimNPH} | R Documentation |
Generic summarise function for tests
Description
Generic summarise function for tests
Usage
summarise_test(alpha, name = NULL)
Arguments
alpha |
the significance level(s) |
name |
name for the summarise function, appended to the name of the analysis method in the final results |
Value
A function that can be used in Summarise that returns a data frame with the columns
rejection_X
rejection_Y
...
Where X, Y, ... are the alpha levels given in the argument
Examples
condition <- merge(
assumptions_delayed_effect(),
design_fixed_followup(),
by=NULL
) |>
tail(4) |>
head(1)
summarise_all <- create_summarise_function(
logrank=summarise_test(alpha=c(0.5, 0.9, 0.95, 0.99))
)
# runs simulations
sim_results <- runSimulation(
design=condition,
replications=100,
generate=generate_delayed_effect,
analyse=list(
logrank=analyse_logrank()
),
summarise = summarise_all
)
sim_results[, grepl("rejection", names(sim_results))]
[Package SimNPH version 0.5.5 Index]