SummarySurvey: Summary statistics for sample surveys

Description Usage Arguments Details Value References Examples

View source: R/SummarySurvey.R

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. Possible types: total, mean, and prop (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. The error (column "Error (

References

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

Baquero, O. S., Marconcin, S., Rocha, A., & Garcia, R. D. C. M. (2018). Companion animal demography and population management in Pinhais, Brazil. Preventive Veterinary Medicine.

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"))

capm documentation built on Oct. 30, 2019, 9:52 a.m.