Description Usage Arguments Details Value Examples
View source: R/chiSquareCounts.R
Given a tibble, calculates a chi-square statistic, with degree of freedom and p-values
1 | chiSquareCounts(tib, v1, v2)
|
tib |
a tibble of data with at least 2 columns represting grouping variables |
v1 |
string representing column name of first grouping variable in the tibble |
v2 |
string representing column name of second grouping variable in the tibble |
computes a 2x2 count table, uses chisq.test() to compute the chi-sq statistics and results
Chi Sq test statistic object, with X2, df, and p-values
1 2 3 | #using a sample daaset from Dr. McKay's website
count_data <- read.csv("https://jlucasmckay.bmi.emory.edu/global/bmi585/demographics.csv")
chiSquareCounts(count_data,"sex","group")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.