
Classify Estimate Reliability and Apply Confidentiality Masking
Source:R/fso_mask_flag.R
fso_flag_mask.Rd
fso_flag_mask
applies Swiss Federal Statistical Office (FSO) reliability rules for survey estimates,
based on the number of observations (occ
). It flags low reliability estimates and masks them when sample size is too small
(occ <= 4
).
Usage
fso_flag_mask(data, lang = c("de", "fr", "it", "en"))
Value
A tibble containing the original data with masked estimates when occ <= 4
and one additional column:
- obs_status
character column classifying reliability of estimates.
Details
FSO estimate reliability criteria:
occ <= 4:
No estimate (confidential).
occ <= 49:
Estimate of low reliability.
occ > 49:
Reliable estimate.
Examples
df <- data.frame(occ = c(3, 10, 60), mean_income = c(4000, 4200, 4500))
fso_flag_mask(df)
#> occ mean_income obs_status
#> 1 NA NA Kein Schätzwert (vertraulich)
#> 2 10 4200 Schätzwert bedingt verlässlich
#> 3 60 4500 Schätzwert verlässlich