Mathematical-statistics / simulation / computation toolkit (R parity)
Source:R/mrm_mathstats.R
mrm_mathstats.RdR parity of morie.mrm_mathstats. Closes the Chapter-2
coverage gap from designexptr.org/mathematical-statistics-
simulation-and-computation.html.
Value
Each callable returns a named list with the computed
statistic(s) and a plain-language interpretation.
References
Wilks, S. S. (1962). Mathematical Statistics. Wiley. Casella, G. & Berger, R. L. (2002). Statistical Inference. Duxbury. Lehmann, E. L. & Romano, J. P. (2005). Testing Statistical Hypotheses.
Examples
mrm_oneprop_test(x = 58, n = 100, p0 = 0.5)
#> $p_hat
#> [1] 0.58
#>
#> $p0
#> [1] 0.5
#>
#> $n
#> [1] 100
#>
#> $z_wald
#> [1] 1.6
#>
#> $p_value_wald
#> [1] 0.1095986
#>
#> $p_value_exact
#> [1] 0.1332106
#>
#> $ci95_wald_lower
#> [1] 0.483264
#>
#> $ci95_wald_upper
#> [1] 0.676736
#>
#> $ci95_exact_lower
#> [1] 0.477119
#>
#> $ci95_exact_upper
#> [1] 0.678014
#>
#> $interpretation
#> [1] "p_hat = 0.5800, H0: p = 0.5; exact p = 0.133 (fail to reject H0 at alpha=0.05)."
#>