Assess the quality of mean estimations
assess.Rd
assess
evaluates the quality of mean estimations using the
methodology created by INE Chile, which considers sample size, degrees of freedom, and
coefficient of variation.
Usage
assess(
table,
publish = FALSE,
scheme = c("chile", "eclac_2020", "eclac_2023", "chile_economics"),
domain_info = FALSE,
low_df_justified = FALSE,
table_n_obj = NULL,
ratio_between_0_1 = TRUE,
...
)
Arguments
- table
dataframe
created bycrear_insumos_media
.- publish
boolean
indicating if the evaluation of the complete table must be added. IfTRUE
, the function adds a new column to thedataframe
.- scheme
character
variable indicating the evaluation protocol to use. Options are "chile", "eclac_2020", "eclac_2023", "chile_economics".- domain_info
Logical. If
TRUE
, indicates that the study domain information is available and will be used for assessment. This affects how the evaluation is conducted, leveraging specific domain-level data to refine the assessment results. WhenFALSE
, domain-specific adjustments are omitted, and a generalized assessment is performed.- low_df_justified
Logical. If
TRUE
the low degrees of freedom are justified and will be used for assessment. By defaultFALSE
.- table_n_obj
Default
NULL
. Dataframe with the target sample size columnn_obj
and columns with the domains to evaluate. Its important check the domain columns type with table.- ratio_between_0_1
boolean
. IfTRUE
, indicates that the estimator is a ratio between 0 and 1.- ...
additional parameters for the evaluation. The complete list of parameters is: 1. General Parameters
df
degrees of freedom. Default: 9.n
sample size. Default for chile scheme: 60. Default for CEPAL schemes: 100. Default for chile economic standard scheme: 30.
2. chile Parameters
cv_lower_ine
lower limit for CV. Default: 0.15.cv_upper_ine
upper limit for CV. Default: 0.3.
3. CEPAL 2020 Parameters
cv_cepal
limit for CV. Default: 0.2.ess
effective sample size. Default: 140.unweighted
unweighted count. Default: 50.log_cv
logarithmic coefficient of variation. Default: 0.175.
4. CEPAL 2023 Parameters
cv_lower_cepal
lower limit for CV. Default: 0.2.cv_upper_cepal
upper limit for CV. Default: 0.3.ess
effective sample size. Default: 60.cvlog_max
maximum logarithmic coefficient of variation. Default: 0.175.CCNP_b
unweighted count before adjustment. Default: 50.CCNP_a
unweighted count after adjustment. Default: 30.
5. Chile Economic Survey Standard Parameters
cv_lower_econ
lower limit for CV. Default: 0.2.cv_upper_econ
upper limit for CV. Default: 0.3.
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
dc <- survey::svydesign(ids = ~varunit, strata = ~varstrat, data = epf_personas, weights = ~fe)
assess(create_mean("gastot_hd", domains = "zona+sexo", design = dc))
#> zona sexo stat se df n cv eval_n
#> 1 1 1 1378016 69421.07 127 12300 0.05037756 sufficient sample size
#> 2 2 1 1082227 36324.22 121 10393 0.03356434 sufficient sample size
#> 3 1 2 1325015 68510.58 127 13729 0.05170551 sufficient sample size
#> 4 2 2 1088658 35343.76 121 11886 0.03246545 sufficient sample size
#> eval_df eval_cv label
#> 1 sufficient df cv <= 0.15 reliable
#> 2 sufficient df cv <= 0.15 reliable
#> 3 sufficient df cv <= 0.15 reliable
#> 4 sufficient df cv <= 0.15 reliable