PowerTable {PDXpower} | R Documentation |
A function to obtain a power table with the combination of various number of PDX lines and number of individuals per PDX lines per treatment.
Description
A function to obtain a power table with the combination of various number of PDX lines and number of individuals per PDX lines per treatment.
Usage
PowerTable(
n,
m,
beta,
tau2 = 0.5,
alpha = 0.05,
lambda = 0.03,
nu = 2,
sigma2 = 1,
two.sided = TRUE,
distr = c("Weibull", "normal"),
Ct = 5,
censor = TRUE,
sim = 1000,
print = c("both", "ANOVA", "Cox-frailty"),
fixed.effect = FALSE,
ncores = NULL
)
Arguments
n |
an integer number to specify the number of PDX lines. |
m |
an integer number to specify the number of individuals per PDX line per treatment. |
beta |
Treatment effect for the treated group. |
tau2 |
variance of PDX line specific random effect. |
alpha |
significance level. Default is 0.05. |
lambda |
Scale parameter of Weibull distribution for the baseline hazard. |
nu |
Shape parameter of Weibull distribution for the baseline hazard. |
sigma2 |
Error variance of log survival time for both treatment groups. |
two.sided |
A logical value to indicate if a two-sided hypothesis testing is conducted. Default is TRUE. |
distr |
Distributional assumption of the simulated event time. |
Ct |
a fixed time point when a study is designed to end for generating type 1 censoring data. |
censor |
logical value of whether a censoring distribution is considered in a data generation setting. Default is TRUE. |
sim |
Number of Monte Carlo samples to be generated. Default is 1000. |
print |
a string to indicate which model result to be printed.
If |
fixed.effect |
logical value to indicate if a fixed effects only model is fitted. Default is FALSE. |
ncores |
number of cores for parallel computation. |
Value
Object of class PowerTable
with elements
NofLine |
the number of PDX line |
NofAnimals |
the number of animals per arm per PDX line |
ANOVArandom |
the proportion of rejecting null treatment effect by fitting a ANOVA mixed effects model. |
Coxrandom |
the proportion of rejecting null treatment effect by fitting a Cox frailty model. |
ANOVAfix |
the proportion of rejecting null treatment effect by fitting a ANOVA fixed effects model if |
Coxfix |
the proportion of rejecting null treatment effect by fitting a Cox fixed effects model if |
censoringrate |
the average censoring rate across all Monte Carlo replicates. |
beta |
the pre-determined treatment effect. |
lambda |
the pre-determined scale parameter of baseline hazard for the Cox frailty model. |
nu |
the pre-determined shape parameter of baseline hazard for the Cox frailty model. |
tau2 |
the pre-determined inter-PDX variance. |
Ct |
the pre-determined fixed time point to indicate the end of a study for type I censoring. |
nsim |
total number of Monte Carlo replicates. |
sigma2 |
the pre-determined error variance for the ANOVA mixed effects model. |
censor |
a logical value to indicate whether type I censoring mechanism is considered for simulation. |
print |
a string to indicate which model is considered for simulation. |
fixed.effect |
a logical value to indicate whether a fixed effects model is considered for simulation. |
call |
match call. |
See Also
Examples
n <- 3
m <- 2
beta <- 0.8
lambda <- 0.3
nu <- 1
tau2 <- 0.1
fit <- PowerTable(n = n, m = m, beta = beta, lambda = lambda, nu = nu,
tau2 = tau2, distr = "Weibull", sim = 5,
censor = FALSE,
print = "both", ncores = 1)
plotpower(fit, ylim = c(0, 1))