This is a very simple wrapper for stats::chisq.test.

nom_chisqu(x, y = NULL, correct = FALSE)

Arguments

x

Dependent variable. Alternatively a table.

y

Independent variable

correct

Apply correction, passed to chisq.test.

Value

A numeric value

Note

The warning message in case of low samples size and possibly incorrect approximation is suppressed silently.

Examples

nom_chisqu(ngo$abschalt, ngo$geschl)
#> [1] 5.3478261