Power function of the two-sided sign test (Gibbons Ch 5.4.4)
Source:R/sgnpw.R
morie_sign_test_power.RdBuilds the discrete rejection region under H0: p = 0.5 with size <= alpha, then evaluates power at the alternative p_alt.
Examples
morie_sign_test_power(x = rnorm(50))
#> $statistic
#> [1] 0.7821938
#>
#> $n
#> [1] 50
#>
#> $p_alt
#> [1] 0.7
#>
#> $alpha
#> [1] 0.05
#>
#> $size
#> [1] 0.04887389
#>
#> $k_lower
#> [1] 0
#>
#> $k_upper
#> [1] 50
#>
#> $method
#> [1] "Two-sided sign-test power function"
#>