Learn R Programming

MIDN (version 1.0)

McNem_Score_midn: Nearly exact sample size calculation for the level-corrected score test for differences between binomial proportions estimated from paired data

Description

Again, the function computes the exact sample sizes required in the randomized UMPU test and its conservative nonrandomized counterepart for attaining prespecified power. However, in contrast to the parallel group setting, the midpoint of the interval between these two numbers shall now used as an nearly exact value of the number of pairs to be observed in the asymptotic test based on the score-statistic corrected for possible exceedances of the nominal significance level.

Usage

McNem_Score_midn(alpha, SW, ppl, pmi, POWO)

Arguments

alpha
target significance level, 1-sided
SW
width of search grid for determining the size of a given critical region in the sample space of N+ [= number of pairs with (Xi,Yi) = (1,0)] and N0 [= number of tied pairs]
ppl
true value of Pr[(X,Y) = (1,0)]
pmi
true value of Pr[(X,Y) = (0,1)]
POWO
power to be attained in the level-corrected score test against the alternative (ppl,pmi)

Value

References

Wellek S: Nearly exact sample size calculation for powerful nonrandomized tests for differences between binomial proportions. Statistica Neerlandica 69 (2015), 358-373.

Examples

Run this code

result2 <- McNem_Score_midn(0.025,0.0001,0.585,0.315,0.9)
POWEX <- result2[3]
result2  # shows values of vector result2
POWEX    # shows value of POWEX

Run the code above in your browser using DataLab