Assess the quality of mean estimations
assess.Rdassess 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
dataframecreated bycrear_insumos_media.- publish
booleanindicating if the evaluation of the complete table must be added. IfTRUE, the function adds a new column to thedataframe.- scheme
charactervariable 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
TRUEthe 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_objand 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
dfdegrees of freedom. Default: 9.nsample size. Default for chile scheme: 60. Default for CEPAL schemes: 100. Default for chile economic standard scheme: 30.
2. chile Parameters
cv_lower_inelower limit for CV. Default: 0.15.cv_upper_ineupper limit for CV. Default: 0.3.
3. CEPAL 2020 Parameters
cv_cepallimit for CV. Default: 0.2.esseffective sample size. Default: 140.unweightedunweighted count. Default: 50.log_cvlogarithmic coefficient of variation. Default: 0.175.
4. CEPAL 2023 Parameters
cv_lower_cepallower limit for CV. Default: 0.2.cv_upper_cepalupper limit for CV. Default: 0.3.esseffective sample size. Default: 60.cvlog_maxmaximum logarithmic coefficient of variation. Default: 0.175.CCNP_bunweighted count before adjustment. Default: 50.CCNP_aunweighted count after adjustment. Default: 30.
5. Chile Economic Survey Standard Parameters
cv_lower_econlower limit for CV. Default: 0.2.cv_upper_econupper 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