SummarySurvey {capm}R Documentation

Summary statistics for sample surveys

Description

Wraps functions for summary statistics from survey package.

Usage

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

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


[Package capm version 0.14.0 Index]