View source: R/pvalue_maxcombo.R
pvalue_maxcombo | R Documentation |
pvalue_maxcombo()
computes p-values for the MaxCombo test
based on output from simtrial::tenFHcorr()
.
This is still in an experimental stage and is intended for use with
the simtrial::sim_fixed_n()
trial simulation routine.
However, it can also be used to analyze clinical trial data such as that provided in the
ADaM ADTTE format.
pvalue_maxcombo(
Z,
dummy_var,
algorithm = GenzBretz(maxpts = 50000, abseps = 1e-05)
)
Z |
a dataset output from |
dummy_var |
a dummy input that allows |
algorithm |
This is passed directly to the |
A numeric p-value
library(tidyr)
library(tibble)
library(dplyr)
# example 1
x <- sim_fixed_n(nsim = 1,
timingType = 5,
rg = tibble(rho = c(0, 0, 1),
gamma = c(0, 1, 1)))
head(x)
pvalue_maxcombo(x)
# example 2
# Only use cuts for events, events + min follow-up
xx <- sim_fixed_n(nsim = 100,
timingType = 5,
rg = tibble(rho = c(0, 0, 1),
gamma = c(0, 1, 1)))
head(xx)
# MaxCombo power estimate for cutoff at max of targeted events, minimum follow-up
p <- xx %>% group_by(Sim) %>% group_map(pvalue_maxcombo) %>% unlist()
mean(p < .025)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.