Description
Usage
Arguments
Value
Author(s)
See Also
It creates a plot or a table for the sample size, type I error rate, and power versus standard deviation.
If desired, it may represent several actual expected value differences for comparison.
 (delta = 0, Delta, , test = 1, alpha = 0.05, = 0.2, prop = (0.1, 1),
adj = F, rule = F, nbound = 500, simu = 10000, create = "plot")

delta 
Number. Expectation difference of two samples.
If you select a Test for superiority/ difference then select 'delta = 0'.
Only if you select a Test for noninferiority you can select 'delta != 0'.
Attention: If you chose 'test = 1' and 'delta != 0', the test for noninferiority will
automatically be applied.
If not specified, delta is set to 0.

Delta 
Number/ vector of numbers. Relevant difference of expected values in the alternative hypothesis.
A maximum of five different values are possible if you choose create = "tab" .

sd 
Number. Assumed standard deviation of the data.
Used to calculate the originally planned number of cases.

test 
Number. What type of hypothesis test should be performed. Onesided (Superiority/
NonInferiority test) or twosided (Test for difference).
Onesided (test = 1): Superiortity H0: mu_x  mu_y <= 0 vs. H1: mu_x  mu_y > 0
NonInferiority H0: mu_x  mu_y >= delta vs. H1: mu_x  mu_y < delta
Twosided (test = 2): Difference H0: mu_x  mu_y = 0 vs. H1: mu_x  mu_y != 0
Attention: Choice of delta. (see delta )
If not specified, the oneSided Test (Superiority/ NonInferiority Test) is used.

alpha 
Number. Desired alphalevel of the test.
If not specified, alpha is set to 0.05.

beta 
Number. Acceptable beta error of the test.
If not specified, beta is set to 0.2.

prop 
Two numbers/ Vector of numbers. Timing of the internal pilot study depending on the originally
planned sample size.
Two numbers must be passed, the smallest and largest timing of the internal pilot study.
The plot is displayed for the interval of these values.
If two values are transferred, a sequence is automatically defined.
If several values are transferred, these are interreted as a sequence.

adj 
Logical. Should the onesample 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.
Attention: Only if you choose nbound can a suitable standard deviation range for the plots
be calculated automatically.
If no nbound are defined then a standard deviation range must be chosen (see sd_ber ).

simu 
Number. How many simulations should be performed?
If not specified, simu is set to 10000.

create 
"plot" if a plot is to be returned.
"tab" if a table is to be returned.

It returns a plot.
Csilla van Lunteren
pow
ggplot2
vanLunteren/plan_norm documentation built on May 20, 2019, 12:32 p.m.