# \donttest{
# Loading data - population and sample data
data("eusilcA_pop")
data("eusilcA_smp")
# Generate emdi object with two additional indicators; here via function
# ebp()
emdi_model <- ebp(
fixed = eqIncome ~ gender + eqsize + cash +
self_empl + unempl_ben + age_ben + surv_ben + sick_ben + dis_ben + rent +
fam_allow + house_allow + cap_inv + tax_adj, pop_data = eusilcA_pop,
pop_domains = "district", smp_data = eusilcA_smp, smp_domains = "district",
threshold = function(y) {
0.6 * median(y)
}, L = 50, MSE = TRUE, B = 50,
custom_indicator = list(
my_max = function(y) {
max(y)
},
my_min = function(y) {
min(y)
}
), na.rm = TRUE, cpus = 1
)
# Example 1: Export estimates for all indicators and uncertainty measures
# and diagnostics to Excel
write.excel(emdi_model, indicator = "all", MSE = TRUE, CV = TRUE)
# Example 2: Single Excel sheets for point, MSE and CV estimates
write.excel(emdi_model, indicator = "all", MSE = TRUE, CV = TRUE,
split = TRUE)
# Example 3: Same as example 1 but for an ODS output, skipped due to lack of zip app
# write.ods(emdi_model, indicator = "all", MSE = TRUE, CV = TRUE)
# }
Run the code above in your browser using DataLab