chisq: Pearson's chi-squared test

Description Usage Arguments Value

View source: R/tests.R

Description

This function conducts a Pearson's chi-squared test for a twoxtwo constructed using the specified exposure and outcome. Internally the function uses chisq.test. The output of the function includes the chi-squared test statistic, degrees of freedom, and the p-value from the test.

Usage

1
chisq(.data, exposure, outcome, correct = TRUE, ...)

Arguments

.data

Either a data frame with observation-level exposure and outcome data or a twoxtwo object

exposure

Name of exposure variable; ignored if input to .data is a twoxtwo object

outcome

Name of outcome variable; ignored if input to .data is a twoxtwo object

correct

Logical as to whether or not to apply continuity correction; default is TRUE

...

Additional arguments passed to twoxtwo function; ignored if input to .data is a twoxtwo object

Value

A tibble with the following columns:


vpnagraj/twoxtwo documentation built on Nov. 3, 2021, 6:20 p.m.