act_ns: A creates a dataframe with unweighted n/N observation counts...

View source: R/act_ns.R

act_nsR Documentation

A creates a dataframe with unweighted n/N observation counts for value of interest of selected variable within a svydesign (categorical). Best used in conjunction with Rtesunate::act_rows(). (See act_svyciprop family of functions which combines the two)

Description

A creates a dataframe with unweighted n/N observation counts for value of interest of selected variable within a svydesign (categorical). Best used in conjunction with Rtesunate::act_rows(). (See act_svyciprop family of functions which combines the two)

Usage

act_ns(x, cond, design)

Arguments

x

variable of interest (in quotes)

cond

the value for which estimates are desired (in quotes)

design

svydesign object containing the variable/value

Value

A dataframe providing the counts as n/N character variable (N is all non-NA values)

Examples

using api data from survey package
data(api)
design <- svydesign(id=~1,strata=~stype, weights=~pw, data=apistrat, fpc=~fpc)
act_ns("cname", "Los Angeles", design)

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