evaluate_prop: Evaluate the quality of ratio estimations

Description Usage Arguments Details Value Examples

Description

evaluate_prop evaluates the quality ratio estimations using the methodology created by INE Chile, which considers sample size, degrees of freedom, standard error and the coefficient of variation.

Usage

1
evaluate_prop(tabulado, condicion = NULL, publicar = FALSE)

Arguments

tabulado

dataframe created by create_ratio

condicion

character with the complete condition to filter the dataframe

publicar

boolean indicating if the evaluation of the complete table must be added to the output. If it is TRUE, the function adds a new column to the dataframe

Details

It is evaluated according to the standard error or the coefficient of variation, based on the value of the estimation that its receives as inputs. For estimations < 1 evaluates by standar error & for estimations > 1 evaluates by coefficient of variation. Evaluates each estimation per row independently

Value

dataframe with all the columns included in the input table, plus a new column containing a label indicating the evaluation of each estimation: reliable, bit reliable or unreliable

Examples

1
2
3
4
5
6
7
library(survey)
library(dplyr)
epf <-   mutate(epf_personas, gasto_zona1 = dplyr::if_else(zona == 1, gastot_hd, 0)) %>%
group_by(folio) %>%
slice(1)
dc <- svydesign(ids = ~varunit, strata = ~varstrat, data = epf, weights = ~fe)
evaluate_prop(create_prop(var = gasto_zona1, denominador = gastot_hd, dominios = zona+sexo, disenio = dc))

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