proptest_num {exams.forge}R Documentation

Proportion Tests

Description

Computes all results for test on proportion using either stats::binom.test(), or a normal approximation without continuity correction. Either named parameters can be given or an arglist with the following parameters:

Usage

proptest_num(..., arglist = NULL)

prop_binomtest_num(..., arglist = NULL)

nbinomtest(..., arglist = NULL)

Arguments

...

named input parameters

arglist

list: named input parameters, if given ... will be ignored

Details

The results of proptest_num may differ from stats::binom.test(). proptest_num is designed to return results when you compute a binomial test by hand. For example, for computing the test statistic the approximation t_n \approx N(0; 1) is used if n>n.tapprox. The p.value is computed by stats::binom.test and may not be reliable, for Details see Note!

Value

A list with the input parameters and the following:

Note

The computation of a p-value for non-symmetric distribution is not well defined, see https://stats.stackexchange.com/questions/140107/p-value-in-a-two-tail-test-with-asymmetric-null-distribution.

Examples

n <- 100
x <- sum(runif(n)<0.4)
proptest_num(x=x, n=n)

[Package exams.forge version 1.0.10 Index]