summary: Weighted Five-Number Summary of a Variable

svysummaryR Documentation

Weighted Five-Number Summary of a Variable

Description

Weighted five-number summary used for survey.design and survey.design2 objects (similar to base::summary for [numeric vectors]).

Usage

svysummary(object, design, na.rm = FALSE, ...)

Arguments

object

one-sided [formula] for which a summary is desired, e.g., ~payroll.

design

an object of class survey.design; see svydesign.

na.rm

[logical] indicating whether NA values should be removed before the computation proceeds (default: FALSE).

...

additional arguments.

Value

A weighted five-number summary (numeric variable) or a frequency table (factor variable).

Examples

data(workplace)

library(survey)
# Survey design for simple random sampling without replacement
dn <- svydesign(ids = ~ID, strata = ~strat, fpc = ~fpc, weights = ~weight,
    data = workplace)

svysummary(~payroll, dn)

robsurvey documentation built on Jan. 6, 2023, 5:09 p.m.