test_chi_square: test_chi_square

Description Usage Arguments Value Examples

View source: R/test_chi_square.R

Description

It is a wrapper for the chisq.test. Two main diffenrece are that this function evaluates if the expected values of each cells is greater than 5 before computing test and it also adds a observed proportion table.

Usage

1
test_chi_square(df, cat_1, cat_2)

Arguments

df

A data frame.

cat_1

The quoted column name which contains one of categorical variable.

cat_2

The quoted column name which contains the other categorical variable to be adressed.

Value

The same list as chisq.test would return plus the observed proportion.

Examples

1
test_chi_square(df = data, cat_1 = "Pclass", cat_2 = "Survived")

vinisousa04/AdvancedDataAnalysis documentation built on Sept. 18, 2017, 3:23 a.m.