get_estimation_mean.Rd
This function allows you to estimate mean variable at universe level.
get_estimation_mean(
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"
)
data frame with ECH microdata
data frame column to estimate
data frame column
data frame column
subpopulation reference setted as character expresion of logical evaluation
is household ("h") or individual ("i").
ids
household id
strata
weights
name for the estimation new column
table
Disclaimer: This script is not an official INE product. Aviso: El script no es un producto oficial de INE.
Other estimation:
get_estimation_gini()
,
get_estimation_gpg()
,
get_estimation_median()
,
get_estimation_qsr()
,
get_estimation_ratio()
,
get_estimation_total()
,
set_design()
# \donttest{
get_estimation_mean(data = ech::toy_ech_2018, 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 0.940 0.903 0.976
#> 2 Montevideo Pobre 0.0604 0.0241 0.0968
#> 3 Artigas No pobre 0.739 0.488 0.991
#> 4 Artigas Pobre 0.261 0.00873 0.512
#> 5 Canelones No pobre 1 1 1
#> 6 Cerro Largo No pobre 1 1 1
#> 7 Colonia No pobre 1 1 1
#> 8 Durazno No pobre 0.728 0.412 1.04
#> 9 Durazno Pobre 0.272 -0.0429 0.588
#> 10 Flores No pobre 1 1 1
#> # ... with 16 more rows
# }