csi: Generate output for a Chi Square Test of Association

Description Usage Arguments Value Examples

View source: R/csi.R

Description

This function performs a Chi Sqare test for association on two factors and returns reporting information on the model.

Usage

1
csi(x, y = NULL, z = NULL)

Arguments

x

A formula dependent variable ~ independent variable.

y

A data frame, necessary if data frame is not referenced in formula or piped in.

Value

A list of output for reporting $analysis_type, $results, $odds_ratio, $observed, $expected, $standardized_residuals, $contribution, $table_percentages, $column_percentages, $row_percentages

Examples

1
2
3
x2_results <- x2_data %>% csi(class_rank ~ gender)
x2_results <- csi(class_rank ~ gender, x2_data)
x2_results <- csi(x2_data$class_rank, x2_data$gender)

ECO230/eco230r documentation built on May 12, 2020, 2:10 a.m.