This function allows you to estimate total variable at universe level.

get_estimation_total(
  data = ech::toy_ech_2018,
  variable = NULL,
  by.x = NULL,
  by.y = NULL,
  domain = NULL,
  level = NULL,
  ids = NULL,
  numero = "numero",
  estrato = NULL,
  pesoano = "pesoano",
  name = "estimacion"
)

Arguments

data

data frame with ECH microdata

variable

data frame column to estimate

by.x

data frame column

by.y

data frame column

domain

subpopulation reference setted as character expresion of logical evaluation

level

is household ("h") or individual ("i").

ids

ids

numero

household id

estrato

strata

pesoano

weights

name

name for the estimation new column

Value

table

Details

Disclaimer: This script is not an official INE product. Aviso: El script no es un producto oficial de INE.

Examples

# \donttest{
get_estimation_total(variable = "pobre06", by.x = "dpto", level = "h")
#> These confidence intervals are only an approximation of the correct confidence intervals 
#>   that arise from fully defining the sample design
#> # A tibble: 26 x 5
#> # Groups:   dpto [19]
#>    dpto        pobre06  estimacion estimacion_low estimacion_upp
#>    <fct>       <fct>         <dbl>          <dbl>          <dbl>
#>  1 Montevideo  No pobre       5892         5207.           6577.
#>  2 Montevideo  Pobre           379          145.            613.
#>  3 Artigas     No pobre        244           90.9           397.
#>  4 Artigas     Pobre            86          -12.0           184.
#>  5 Canelones   No pobre       2287         1774.           2800.
#>  6 Cerro Largo No pobre        245           84.1           406.
#>  7 Colonia     No pobre        380          172.            588.
#>  8 Durazno     No pobre        163           39.3           287.
#>  9 Durazno     Pobre            61          -23.9           146.
#> 10 Flores      No pobre         42          -16.4           100.
#> # ... with 16 more rows
# }