test_h0: Comparison of a test statistic with the associated...

Description Usage Arguments Details Value Author(s)

Description

This is an important secondary function. It checks whether the corresponding null hypothesis can be rejected by a calculated test statistic. Three cases of hypotheses can be considered: test for superiority, test for non-inferiority, test for difference. The test statistic is compared with the corresponding quantiles of the t-distribution.

Usage

1
test_h0(test = 1, T, n1, n2, alpha = 0.05, delta = 0)

Arguments

test

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.

T

Number. Value of the calculated test statistic.

n1

Number. sample size of the first sample.

n2

Number. sample size of the second sample.

alpha

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

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 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.

Details

The aim of this function is to simplify the application of test decisions in hypothesis tests.

Value

The value 0 or 1 will be returned.
0 means the null hypothesis can not be rejected to the level alpha.
1 means the null hypothesis is rejected to the level alpha.

Author(s)

Csilla van Lunteren


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