chi.sq | R Documentation |
This function simplifies the call for Pearson's Chi Square test (chi.sq) on a given data frame.
chi.sq(df, var1, var2, correct = FALSE, post = FALSE, cramer = FALSE)
df |
data frame to read in. |
var1 |
the dependent/outcome variable, |
var2 |
the main independent/predictor variable, |
correct |
logical (default set to |
post |
logical (default set to |
cramer |
logical (default set to |
This function returns the summary results table for a Pearson's Chi Square test, examining the relationship between var1
from data frame df
, and var2
.
data <- mtcars
chi.sq(data,vs,am)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.