xtabC: Controlled cross tabulation analysis with optional weights

Description Usage Arguments Value Examples

View source: R/xtabC.r

Description

Controlled cross tabulation analysis with optional weights

Usage

1
xtabC(function1, data, digits = 2)

Arguments

function1

A function of the relationship to be analyzed expressed in the form ~ depvar + indepvar + controlvar

data

A design dataset (e.g. gssD, nesD, statesD, worldD)

digits

Number of digits to report after decimal place, optional (default = 2).

Value

A controlled cross tabulation as a multi-dimensional array.

Examples

1
2
3
   library(poliscidata)
   
   xtabC(~ divlaw2 + attend3 + kids, gssD)

Example output

, , kids = No

                attend3
divlaw2            Low Moderate  High
  Same/easier     69.5     67.4  55.9
  More difficult  30.5     32.6  44.1
  Total          100.0    100.0 100.0
  Count          213.0     86.0  68.0

, , kids = Yes

                attend3
divlaw2            Low Moderate  High
  Same/easier     66.1     59.3  43.3
  More difficult  33.9     40.7  56.7
  Total          100.0    100.0 100.0
  Count          330.0    221.0 300.0

poliscidata documentation built on July 8, 2020, 6:23 p.m.