The 1x2 Table tests
the_1x2_table_tests(X, n, pi0)
NULL. This function should be called for its printed output
# Example: The number of 1st order male births (Singh et al. 2010)
the_1x2_table_tests(singh_2010["1st", "X"], singh_2010["1st", "n"], pi0 = 0.513)
#> H_0: pi = 0.513 vs H_A: pi ~= 0.513
#> Estimate of pi: 250/533 = 0.469
#>
#> Test P-value (test statistic)
#> ------------------------------------------------
#> Wald 0.0420 (Z = -2.034)
#> Wald with CC 0.0466 (Z = 1.990)
#> Likelihood ratio 0.0423 (T = 4.121, df = 1)
#> Score 0.0423 (Z = -2.030)
#> Score with CC 0.0469 (Z = 1.987)
#>
#>
#> Mid-P binomial 0.0425
#>
#> ------------------------------------------------
#> CC = continuity correction
# Example: The number of 2nd order male births (Singh et al. 2010)
the_1x2_table_tests(singh_2010["2nd", "X"], singh_2010["2nd", "n"], pi0 = 0.513)
#> H_0: pi = 0.513 vs H_A: pi ~= 0.513
#> Estimate of pi: 204/412 = 0.495
#>
#> Test P-value (test statistic)
#> ------------------------------------------------
#> Wald 0.4685 (Z = -0.725)
#> Wald with CC 0.4993 (Z = 0.676)
#> Likelihood ratio 0.4685 (T = 0.525, df = 1)
#> Score 0.4684 (Z = -0.725)
#> Score with CC 0.4992 (Z = 0.676)
#>
#>
#> Mid-P binomial 0.4689
#>
#> ------------------------------------------------
#> CC = continuity correction
# Example: The number of 3rd order male births (Singh et al. 2010)
the_1x2_table_tests(singh_2010["3rd", "X"], singh_2010["3rd", "n"], pi0 = 0.513)
#> H_0: pi = 0.513 vs H_A: pi ~= 0.513
#> Estimate of pi: 103/167 = 0.617
#>
#> Test P-value (test statistic)
#> ------------------------------------------------
#> Wald 0.0058 (Z = 2.758)
#> Wald with CC 0.0074 (Z = 2.679)
#> Likelihood ratio 0.0070 (T = 7.277, df = 1)
#> Score 0.0073 (Z = 2.683)
#> Score with CC 0.0092 (Z = 2.605)
#>
#>
#> Mid-P binomial 0.0072
#>
#> ------------------------------------------------
#> CC = continuity correction
# Example: The number of 4th order male births (Singh et al. 2010)
the_1x2_table_tests(singh_2010["4th", "X"], singh_2010["4th", "n"], pi0 = 0.513)
#> H_0: pi = 0.513 vs H_A: pi ~= 0.513
#> Estimate of pi: 33/45 = 0.733
#>
#> Test P-value (test statistic)
#> ------------------------------------------------
#> Wald 0.0008 (Z = 3.342)
#> Wald with CC 0.0015 (Z = 3.174)
#> Likelihood ratio 0.0025 (T = 9.129, df = 1)
#> Score 0.0031 (Z = 2.957)
#> Score with CC 0.0050 (Z = 2.808)
#>
#>
#> Mid-P binomial 0.0029
#>
#> ------------------------------------------------
#> CC = continuity correction
# Example: Ligarden et al. (2010)
the_1x2_table_tests(ligarden_2010["X"], ligarden_2010["n"], pi0 = 0.5)
#> H_0: pi = 0.500 vs H_A: pi ~= 0.500
#> Estimate of pi: 13/16 = 0.812
#>
#> Test P-value (test statistic)
#> ------------------------------------------------
#> Wald 0.0014 (Z = 3.203)
#> Wald with CC 0.0039 (Z = 2.882)
#> Likelihood ratio 0.0094 (T = 6.738, df = 1)
#> Score 0.0124 (Z = 2.500)
#> Score with CC 0.0244 (Z = 2.250)
#>
#>
#> Mid-P binomial 0.0127
#>
#> ------------------------------------------------
#> CC = continuity correction