sampleN.NTIDFDA(alpha = 0.05, targetpower = 0.8, theta0, theta1, theta2, CV,
design=c("2x2x4", "2x2x3"), nsims = 1e+05, nstart, print = TRUE,
details = TRUE, setseed = TRUE)length(CV) = 1 the same CV is assumed for Test and Reference.
If length(CV) = 2 the CV for Test must be given in CV[1] and for
Reference in CV[2].design="2x2x4".TRUE (default) the function prints its results.
If FALSE only the resulting dataframe will be returned.TRUE, the default, the steps during sample size search are shown.
Moreover the details of the method settings are printed.set.seed(123456) is issued if setseed=TRUE, the default.exp(+-1.053605*swR).
In case of a failed sample size search you may restart with setting tha argument nstart.
In case of theta0 values outside the implied scaled (tightened/widened) ABE limits
no sample size estimation is possible and the function throws an error
(f.i. CV=0.04, theta0=0.95).
The results for the design "2x2x3" are to be considered as experimental since
at present not thorougly tested.power.NTIDFDAsampleN.NTIDFDA(CV=0.04,theta0=0.975)
# should give
# n=54 with an (empirical) power of 0.809590
#
# Test formulation with lower variability
sampleN.NTIDFDA(CV=c(0.04,0.06),theta0=0.975)
# should give
# n=20 with an (empirical) power of 0.0.814610
#
# alternative 3-period design
sampleN.NTIDFDA(CV=0.04,theta0=0.975, design="2x2x3")
# should give
# n=86 with power = 0.80364Run the code above in your browser using DataLab