xtp.chi2 {poliscidata}R Documentation

Cross tabulation Analysis with Chi-Squared Statistic

Description

This function makes use of the crosstab function from the descr package

Usage

xtp.chi2(data, y, x, w = NULL, digits = 1, prop.c = FALSE)

Arguments

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)

Value

Returns a data frame of cross tabulation results

Examples

   library(poliscidata)
   
   xtp.chi2(gss, pornlaw, attend3, wtss)

[Package poliscidata version 2.3.0 Index]