fix_calc: Conducted a study with a fixed sample size and normally...

Description Usage Arguments Value Author(s)

View source: R/fix_sample_pow.R


This is an auxiliary function of 'fix_sample_pow' and 'pow'. It is conducting a study with fixed sample size and normally distributed data. The calculated value of the test statistic is compared directly with the corresponding quantile of the normal distribution.


fix_calc(N0, sd_ber, delta = 0, Delta, test = 1, alpha = 0.05, beta = 0.2)



Number. Size of the originally planned sample size.


Number. Actual standard deviation in the data.


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 non-inferiority you can select 'delta != 0'.
Attention: If you chose 'test = 1' and 'delta != 0', the test for non-inferiority will
automatically be applied.
If not specified, delta is set to 0.


Number. Relevant difference of expected values in the alternative hypothesis.


Number. What type of hypothesis test should be performed, one-sided (Superiority/
Non-Inferiority test) or two-sided (Test for difference).
One-sided (test = 1): Superiortity H0: mu_x - mu_y <= 0 vs. H1: mu_x - mu_y > 0
Non-Inferiority H0: mu_x - mu_y >= delta vs. H1: mu_x - mu_y < delta
Two-sided (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 one-Sided Test (Superiority/ Non-Inferiority Test) is used.


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


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


This function returns a value if the simulation study rejects (1) or can not reject (0) the
null hypothesis.


Csilla van Lunteren

@seealso test_h0

vanLunteren/plan_norm documentation built on May 20, 2019, 12:32 p.m.