This function estimates the power of test routines that calculate p value(s)
power_newtest(
TS,
vals = NA,
pnull,
ralt,
param_alt,
phat,
TSextra,
alpha = 0.05,
B = 1000
)
A matrix of power values
routine to calculate test statistics.
=NA if data is discrete, a vector of possible values
routine to calculate the cdf under the null hypothesis
generate data under altenative hypothesis
values of parameter under the alternative hypothesis.
function to estimate parameters, function(x) -99 if no parameter estimation
list (possibly) passed to TS
=0.05 type I error.
= 1000 number of simulation runs to estimate the power.