Description Usage Arguments Value Author(s) See Also
This is an auxiliary function. It calculates the sample size, the type I error rate and the power of the design with an internal pilot study for different standard deviations and for multiple timings of the internal pilot studies. The originally planned sample size is calculated on the basis of an assumed standard deviation. A distinction is made between one-sided and two-sided tests.
1 2 | sim_sample_pow(sd_ber, delta = 0, Delta, sd, test = 1, alpha = 0.05, beta = 0.2,
prop = c(0.5, 0.7), adj = F, rule = F, nbound = 500, simu = 10000)
|
sd_ber |
Sequence of numbers. Interval of the actual standard deviation in the data. |
delta |
Number. Expectation difference of two samples. |
Delta |
Number. Relevant difference of expected values in the alternative hypothesis. |
sd |
Number. Assumed standard deviation of the data. |
test |
Number. What type of hypothesis test should be performed. One-sided (Superiority/ |
alpha |
Number. Desired alpha-level of the test. |
beta |
Number. Acceptable beta error of the test. |
prop |
Number or vector of numbers. Timing of the internal pilot study depending on the originally |
adj |
Logical. Should the one-sample variance, calculated in the internal pilot study, be adjusted? |
rule |
Logical. Should the sample size adjustment rule be applied by Wittes and Brittain? |
nbound |
Number. Upper limit of the sample size. |
simu |
Number. How many simulations should be performed? |
This function only creates the sample size and power values for multiple standard deviations.
The output is used in the function sample_pow
to visualize the sample size and power
depending on the timing of the internal pilot studies.
Csilla van Lunteren
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.