Description Usage Arguments Value Examples
This function makes use of the crosstab function from the descr package
1 |
data |
Dataset to be sorted |
y |
Dependent variable |
x |
Independent variable |
w |
Weights (optional) |
digits |
Number of digits to report after decimal place, optional (default = 1). |
prop.c |
Do you want column percentages reported in table? (default is FALSE) |
Returns a data frame of cross tabulation results
1 2 3 |
Cell Contents
|-------------------------|
| Count |
| Expected Values |
|-------------------------|
====================================================
attend3
pornlaw Low Moderate High Total
----------------------------------------------------
ILLEGAL TO ALL 113 82 233 428
185.3 113.5 129.2
----------------------------------------------------
ILLEGAL UNDER 18 428 257 156 841
364.1 223.1 253.8
----------------------------------------------------
LEGAL 27 9 7 43
18.6 11.4 13.0
----------------------------------------------------
Total 568 348 396 1312
====================================================
Statistics for All Table Factors
Pearson's Chi-squared test
------------------------------------------------------------
Chi^2 = 181.5177 d.f. = 4 p <2e-16
Minimum expected frequency: 11.40549
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.