create_tot: Create the inputs to make quality evaluation for total...

Description Usage Arguments Value Examples

View source: R/creacion_insumos.R

Description

create_tot generates a dataframe with the following elements: sum, degrees of freedom, sample size and coefficient of variation. The function allows grouping in several domains.

Usage

1
2
3
4
5
6
7
8
9
create_tot(
  var,
  dominios = NULL,
  subpop = NULL,
  disenio,
  ci = F,
  ajuste_ene = F,
  standard_eval = F
)

Arguments

var

numeric variable within the dataframe. When the domain parameter is not used, it is possible to include more than one variable using the + separator. When a value is introduced in the domain parameter, the estimation variable must be a dummy variable.

dominios

domains to be estimated separated by the + character.

subpop

integer dummy variable to filter the dataframe

disenio

complex design created by survey package

ci

boolean indicating if the confidence intervals must be calculated

ajuste_ene

boolean indicating if an adjustment for the sampling-frame transition period must be used

standard_eval

boolean Indicating if the function is wrapped inside a function, if TRUE avoid lazy eval errors

Value

dataframe that contains the inputs and all domains to be evaluated

Examples

1
2
dc <- survey::svydesign(ids = ~varunit, strata = ~varstrat, data = epf_personas, weights = ~fe)
create_tot(ocupado, zona+sexo, disenio = dc)

Klauslehmann/calidad documentation built on May 1, 2021, 6:35 a.m.