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

View source: R/act_svyciquant.R

act_svyciquantR Documentation

A creates a one line dataframe with weighted mean, cluster-adjusted 95% CI, and observation counts for selected variable within a svydesign.

Description

A creates a one line dataframe with weighted mean, cluster-adjusted 95% CI, and observation counts for selected variable within a svydesign.

Usage

act_svyciquant(x, design, ...)

Arguments

x

variable of interest (in quotes)

design

svydesign object containing the variable/value

...

arguments passed to stats::confint

Value

A dataframe providing the variable name, weighted mean of a quantitative variable of interest, cluster-adjusted 95% CI, and counts as character variable (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_svyciquant("api00", design)
act_svyciquant("api00", design, level = 0.75)

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