create_median: Create the inputs to make quality evaluation for median...

Description Usage Arguments Value Examples

View source: R/creacion_insumos.R

Description

create_median uses a non parametric method to generate 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
10
create_median(
  var,
  dominios = NULL,
  subpop = NULL,
  disenio,
  ci = F,
  replicas = 10,
  ajuste_ene = F,
  standard_eval = F
)

Arguments

var

numeric variable within the dataframe

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

replicas

integer indicating the number of replicates to be used

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
3
dc <- survey::svydesign(ids = ~varunit, strata = ~varstrat, data = epf_personas, weights = ~fe)
dc_rep <-  survey::as.svrepdesign(dc , type = "subbootstrap", replicates=10)
create_median(gastot_hd, zona+sexo, disenio = dc)

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