SummarySurvey: Summary statistics for sample surveys

Description Usage Arguments Details Value References Examples

Description

Wraps functions for summary statistics from survey package.

Usage

1
2
SummarySurvey(design = NULL, variables = NULL, conf.level = 0.95,
  rnd = 3)

Arguments

design

an output form DesignSurvey function.

variables

character vector with the type of estimate for each variable contained in design (see details).

conf.level

the confidence level required.

rnd

the number of decimal places (round) or significant digits (signif) to be used. If NA, scientific notation is used.

Details

The length of variables must be equal to the length of names(design$variables) (see examples).

Value

Matrix with survey summaries.

References

Lumley, T. (2011). Complex surveys: A guide to analysis using R (Vol. 565). Wiley.

Baquero, O. S., Akamine, L. A., Amaku, M., & Ferreira, F. (2016). Defining priorities for dog population management through mathematical modeling. Preventive veterinary medicine, 123, 121-127.

http://oswaldosantos.github.io/capm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
data("cluster_sample")
data("psu_ssu")

## Calibrated two-stage cluster design
cs <- cluster_sample[ , c("interview_id",
                          "census_tract_id",
                          "number_of_persons",
                          "number_of_dogs",
                          "number_of_cats")]

design <- DesignSurvey(na.omit(cs),
                       psu.ssu = psu_ssu,
                       psu.col = "census_tract_id",
                       ssu.col = "interview_id",
                       cal.col = "number_of_persons",
                       cal.N = 129445)

SummarySurvey(design, c("total", "total", "total"))

oswaldosantos/capm documentation built on May 24, 2019, 5:02 p.m.