hyper_gof_test: perform a gof for hypergeometric

Description Usage Arguments Value Examples

View source: R/homogeneous_GoF.R

Description

creates equidistant bins based on hyper then calculates p-value based on chi and also based on empirical

Usage

1
hyper_gof_test(data, m, n, k, n_sims = NA, trace = FALSE)

Arguments

m

number of success in proposed hypergeom

n

number of failures in proposed hypergeom

k

sample size of hypergeom

n_sims

is number of sims for empirical p-value

Value

list is both p-values and data frame of observed and expected freq so that can plot. Class is 'gof'

Examples

1
2
3
4
5
data = rhyper(nn = 1000,m = 500,n = 500,k = 200)
gof = hyper_gof_test(data,m = 500,n = 500,k = 200)
print(gof)
gof = hyper_gof_test(data,m = 500,n = 500,k = 200, n_sims = 100)
print(gof)

jonotuke/graphr documentation built on May 19, 2019, 8:37 p.m.