# NOT RUN {
# Not run to comply with CRAN policy about examples' run-time;
# minimum number of sim's should be 1E5 for 'power', 1E6 sim's for 'alpha'
# }
# NOT RUN {
power.tsd.ssr(alpha=0.05, n1=10, GMR=1, CV=0.239, targetpower=0.9,
pmethod="ls", blind=TRUE, theta0=1.25)
# should give an alpha-inflation 0.072359 (run time <5 seconds)
# repeated with noncentral t-approximation
power.tsd.ssr(alpha=0.05, n1=10, GMR=1, CV=0.239, targetpower=0.9,
pmethod="nct", blind=TRUE, theta0=1.25)
# should give an alpha-inflation 0.069789 (run time ~20 seconds)
#
# adjusted alpha to control the Type I Error, noncentral t-approx.
power.tsd.ssr(alpha=0.03505, n1=10, GMR=1, CV=0.239, targetpower=0.9,
pmethod="nct", blind=TRUE, theta0=1.25)
# should control the TIE with 0.049877
# }
Run the code above in your browser using DataLab