Description Usage Arguments Value Author(s) Examples
An app to illustrate use of the chi-square statistic to test for a relationship between two categorical variables. The P-value is computed by resampling, and the resamples are done one at a time. A histogram of resampled chi-square statistics is displayed after each resample, and summary information is output to the console.
1 | ChisqSimSlow(form,data,effects=c("random","fixed"))
|
form |
a formula of the form ~x+y. When using fixed effects (see below for explanation), x should be the variable that is considered the predictor variable. |
data |
A data frame from which x and y are drawn. |
effects |
When effects="fixed", the re-sampling is performed under the condition that the row sums in the re-sampled two-way table (with x for rows) are the same as the row sums in the two-way table based on the original data. When effects="random", then both row and column sums in the re-sampled table may vary: only the sum of the counts is constant. (Note: in the re-sampling procedure for chisq.test in the stats package of R, both row and column sums are required to equal the corresponding sums for the original data.) |
Graphical and numerical output
Homer White hwhite0@georgetowncollege.edu
1 2 3 4 | ## Not run:
ChisqSimSlow(~weather+crowd.behavior,data=ledgejump,effects="fixed")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.