get_estimation_ratio.Rd
This function allows you to estimate ratio variables at universe level.
get_estimation_ratio(
data = ech::toy_ech_2018,
variable.x = NULL,
variable.y = 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 to estimate
data frame column
data frame column
subpopulation reference setted as character expresion of logical evaluation
is household ("h") or individual ("i")
Variable name of cluster
Variable name of household id
Variable name of strata
Variable name of 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_mean()
,
get_estimation_median()
,
get_estimation_qsr()
,
get_estimation_total()
,
set_design()
# \donttest{
toy_ech_2018 <- employment(data = ech::toy_ech_2018, pobpcoac = "pobpcoac")
#> Variables have been created:
#> pea (Poblacion economicamente activa);
#> pet (Poblacion en edad de trabajar);
#> po (Poblacion ocupada) &
#> pd (Poblacion desocupada)
get_estimation_ratio(data = toy_ech_2018, variable.x = "po", variable.y = "pea", level = "i")
#> These confidence intervals are only an approximation of the correct confidence intervals
#> that arise from fully defining the sample design
#> # A tibble: 1 x 3
#> estimacion estimacion_low estimacion_upp
#> <dbl> <dbl> <dbl>
#> 1 0.925 0.902 0.948
# }