act_xtab: Creates crosstabs showing weighted proportion and CIs for two...

View source: R/act_xtab.R

act_xtabR Documentation

Creates crosstabs showing weighted proportion and CIs for two categorical variables of interest

Description

Creates crosstabs showing weighted proportion and CIs for two categorical variables of interest

Usage

act_xtab(x, y, design, hundo = "row", print = FALSE, ...)

Arguments

x

variable of interest in svydesign object

y

variable of interest in svydesign object

design

svydesign object

hundo

string variable indicating how estimates add to 100%. Current options are "diagonal" or "row" (the default)

print

Boolean variable; determines if output is tidy/friendly for additional manipulation or in 2x2 format for print/human reading. Defaults to FALSE

Value

Crosstab of weighted proportions/CIs for two categorical variables

Examples

library(survey)
data(api)
dclus1 <- svydesign(id=~dnum, weights=~pw, data=apiclus1, fpc=~fpc)

act_xtab("sch.wide", "comp.imp", dclus1, print = TRUE, method = "li")

deansayre/Rtesunate documentation built on July 25, 2024, 7:22 p.m.