act_svyciprop: A creates a one line dataframe with weighted mean,...

View source: R/act_svyciprop.R

act_svycipropR Documentation

A creates a one line dataframe with weighted mean, cluster-adjusted 95% CI, and unweighted n/N observation counts for value of interest for selected variable within a svydesign.

Description

A creates a one line dataframe with weighted mean, cluster-adjusted 95% CI, and unweighted n/N observation counts for value of interest for selected variable within a svydesign.

Usage

act_svyciprop(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

...

arguments passed to svyciprop

Value

A dataframe providing the variable name, weighted mean proportion of observations taking value of interest, cluster-adjusted 95% CI, and 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_svyciprop("cname", "Los Angeles", design)

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