get_estimation_ratio.RdThis 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 | data frame with ECH microdata |
|---|---|
| variable.x | data frame column to estimate |
| variable.y | 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 |
table
Disclaimer: This script is not an official INE product. Aviso: El script no es un producto oficial de INE.
#> #> #> #> #>get_estimation_ratio(data = toy_ech_2018, variable.x = "po", variable.y = "pea", level = "i")#> #>#> # A tibble: 1 x 3 #> estimacion estimacion_low estimacion_upp #> <dbl> <dbl> <dbl> #> 1 0.925 0.902 0.948# }