act_fullmonty: A dataframe with weighted mean, cluster-adjusted 95% CI, and...

View source: R/act_fullmonty.R

act_fullmontyR Documentation

A dataframe with weighted mean, cluster-adjusted 95% CI, and unweighted n/N observation counts for every variable within a svydesign. A blunt tool for quick exploration lacking some of the capabilities/finesse of act_svyciprop and act_svyciquant.

Description

A dataframe with weighted mean, cluster-adjusted 95% CI, and unweighted n/N observation counts for every variable within a svydesign. A blunt tool for quick exploration lacking some of the capabilities/finesse of act_svyciprop and act_svyciquant.

Usage

act_fullmonty(design, drop = NULL, level = 0.95, method = "logit")

Arguments

design

svydesign object containing the variable/value

drop

vector of variables to drop from output dataframe

level

confidence level for CIs passed to both categorical and quantitative variables expressed as a fraction, i.e., '0.xx'

method

method used for categorical CIs. Options: "logit" (default), "likelihood", "asin", "beta", "mean", "xlogit". See svyciprop documentation for more details.

Value

A dataframe providing the variable name, value, weighted mean proportion of all observations, 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_fullmonty(design)
act_fullmonty(design, level = 0.99, method = "mean")

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