PowANOVADat {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 based on a preliminary dataset
PowANOVADat(
data = NULL,
formula = NULL,
random = NULL,
n = NULL,
m = NULL,
sim = 100,
two.sided = TRUE,
alpha = 0.05,
fixed.effect = FALSE,
digits = 4,
ncores = NULL
)
data |
data.frame in which to interpret the variables named in the formula. |
formula |
a two-sided linear formula object describing the fixed-effects part of the model, with the response on the left of a ~ operator and the terms, separated by + operators, on the right. |
random |
an one-sided formula of the form |
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. |
sim |
Number of Monte Carlo samples to be generated. Default is 1000. |
two.sided |
a logical value to indicate if a two-sided hypothesis testing is conducted. Default is TRUE. |
alpha |
significance level. Default is 0.05. |
fixed.effect |
logical value to indicate if a fixed effects only model is fitted. Default is FALSE. |
digits |
digits the number of significant digits to use when printing. |
ncores |
number of cores for parallel computation. |
Object of PowANOVADat
with elements
beta |
the estimated treatment effect from the pilot data. |
tau2 |
the estimated inter-PDX variance from the pilot data. |
sigma2 |
the estimated random error variance from the pilot data. |
PowTab |
the estimates of statistical power across |
require(PDXpower)
data(animals1)
PowTab <- PowANOVADat(data = animals1, formula = log(Y) ~ Tx, random = ~ 1|ID,
n = 3, m = 2, ncores = 1)
PowTab
plotpower(PowTab[[4]], ylim = c(0, 1))