prop: prop

View source: R/prop.R

propR Documentation

prop

Description

Calculates proportions and its variance of a variable or condition from ELSOC, considering complex survey design

Usage

prop(.data, x, by, vartype, na.rm = FALSE, name.format = 1, ...)

Arguments

.data

Data frame or tbl_svy survey object object

x

Variable, variable name or logical vector to calculate proportions

by

Vector of variables to group estimates

vartype

Report variability as one or more of: standard error ('se', default), confidence interval ('ci'), variance ('var') or coefficient of variation ('cv'). vartype = NULL for no variability

na.rm

A logical value to indicate whether missing values of x should be dropped

name.format

Controls the output's name format (1 or 2). Useful for prop_list function

Examples

elsoc_example %>% prop(m0_sexo, by = ola)
elsoc_example %>% prop(c01 %in% c(4,5), by = c(ola, m0_sexo))


edgardo-cerda/elsoc documentation built on April 14, 2022, 5:36 p.m.