moe_crosstab: Make a crosstab of a variable

Description Usage Arguments Details Value Examples

View source: R/moeCrosstab.R

Description

moe_crosstab returns a data.frame a crosstab of two variables along with margins of error

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
moe_crosstab(
  mulaw,
  x,
  y,
  weight = zwave_weight,
  remove = "",
  n = TRUE,
  pct_type = "row",
  format = "wide",
  zscore = 1.96,
  ...
)

Arguments

mulaw

The data.frame containing the version of the integrated file you wish to use

x

The independent variable

y

The dependent variable

weight

The weighting variable, defaults to zwave_weight

remove

An optional character vector of values to remove from final table (e.g. DK/Ref). This will not affect any calculations made. The vector is not case-sensitive.

n

logical, if TRUE a column of row totals is included

pct_type

Controls the kind of percentage values returned. One of "row" or "cell." Column percents are not supported.

format

one of "long" or "wide"

zscore

defaults to 1.96, consistent with a 95% confidence interval

...

further arguments passed to pollster::moe_crosstab, such as unwt_n

Details

this is a wrapper around pollster::moe_crosstab

Value

A tibble

Examples

1
moe_crosstab(integ, zpid3, g40)

jdjohn215/MLSPTools documentation built on Sept. 2, 2020, 1:16 a.m.