stats | R Documentation |
Calculates stats (mean, median, total and quantiles) and its variance from ELSOC considering complex survey design
stats( .data, x, by = NULL, stat = c("mean", "median", "total", "quantile"), vartype = c("se", "ci", "var", "cv"), quantiles = NULL, na.rm = FALSE )
.data |
Data frame or tbl_svy survey object object |
x |
Variable or variable name to calculate estimates |
by |
Vector of variables to group estimates |
stat |
Type of estimate to calculate. One of: 'mean', 'median', 'total' or 'quantile' |
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.rmA |
logical value to indicate whether missing values of x should be dropped |
elsoc_example %>% stat(m0_sexo, by = ola, stat = 'mean') elsoc_example %>% stat(c01, by = c(ola, m0_sexo), stat = 'median')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.