moe_crosstab_3way: Make a 3-way crosstab of a variable

Description Usage Arguments Details Value Examples

View source: R/moeCrosstab3Way.R

Description

moe_crosstab_3way returns a data.frame of a crosstab of two variables by a 3rd variable along with margins of error

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
moe_crosstab_3way(
  mulaw,
  x,
  y,
  z,
  weight = zwave_weight,
  remove = c(""),
  n = TRUE,
  pct_type = "row",
  format = "long",
  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

z

The third 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 add a row total column

pct_type

one of "row" or "cell"

format

one of "wide" or "long

zscore

defaults to 1.96, consistent with a 95% confidence interval

...

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

Details

This is a wrapper around pollster::moe_crosstab_3way

Value

A tibble

Examples

1
moe_crosstab_3way(integ, zpid3, g40, ac7)

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