An object of class SAEforest always includes point estimates of regionally disaggregated economic
and inequality indicators and a MERFmodel element including information on the model fit for fixed
effects as well as random effects. Optionally an SAEforestObject includes corresponding MSE estimates.
In the case of mean estimates and aggregated covariate information, the SAEforestObject additionally
includes an element, capturing the number of variables used in the weighting process from aggregated
covariate information. For an object of class SAEforestObject, the following generic functions are applicable:
print, plot, summary and summarize_indicators.
Additionally selected generic functions of lme4 (fixef, getData, ranef, residuals, sigma, VarCorr) are
directly applicable to an object of class SAEforest.
Value
Four components are always included in an SAEforest object. MSE_estimates and AdjustedSD are
NULL except MSE results are requested. An element of NrCovar only exists for SAEforest objects
produced by SAEforest_model with option aggData = TRUE.
MERFmodelThe included
MERFmodelobject comprises information on the model fit, details on the performed MERF algorithm as well as details on variance components. See below for an exact description of components.IndicatorsA data frame where the first column is the area-level identifier and additional columns are the indicators of interest. Note that objects from
SAEforest_modelonly report the "Mean".MSE_estimatesOnly if MSE results requested. A data frame where the first column is the area-level identifier and additional columns are the MSE estimates for indicators of interest. Note that objects from
SAEforest_modelonly report MSE values for the "Mean".NrCovarOnly if means under aggregated covariate information are estimated, i.e.
SAEforest_modelwith optionaggData = TRUE. A list containing variable names of covariates used for the calculation of needed calibration weights for point estimates. See Krennmair et al. (2022a) for methodological details an explanations.
Details on object of MERFmodel:
ForestA random forest of class ranger modelling fixed effects of the model.
EffectModelA model of random effects of class
merModcapturing structural components of MERFs and modeling random components.RandomEffectsList element containing the values of random intercepts from
EffectModel.RanEffSDNumeric value of standard deviation of random intercepts.
ErrorSDNumeric value of standard deviation of unit-level errors.
VarianceCovarianceVarCorr matrix from
EffectModel.LogLikVector with numerical entries showing the loglikelihood of the MERF algorithm.
IterationsUsedNumeric number of iterations used until convergence of the MERF algorithm.
OOBresidualsVector of OOB-residuals.
RandomCharacter specifying the random intercept in the random effects model.
ErrorToleranceNumerical value to monitor the MERF algorithm's convergence.
initialRandomEffectsNumeric value or vector of initial specification of random effects.
MaxIterationsNumeric value specifying the maximal amount of iterations for the MERF algorithm.
callThe summarized function call producing the object.
data_specsData characteristics such as domain-specific sample sizes or number of out-of-sample areas.
dataProcessed survey sample data.
Details
Note that the MERFmodel object is a composition of elements from a random forest of class
ranger and a random effects model of class merMod. Thus, all generic functions are
applicable to corresponding objects. For further details on generic functions see ranger
and lmer as well as the examples below.
References
Krennmair, P., & Schmid, T. (2022). Flexible Domain Prediction Using Mixed Effects Random Forests. Journal of Royal Statistical Society: Series C (Applied Statistics) (forthcoming).
Krennmair, P., & Würz, N. & Schmid, T. (2022a). Analysing Opportunity Cost of Care Work using Mixed Effects Random Forests under Aggregated Census Data.
Krennmair, P., & Schmid, T & Tzavidis, Nikos. (2022b). The Estimation of Poverty Indicators Using Mixed Effects Random Forests. Working Paper.
Examples
# \donttest{
# Loading data
data("eusilcA_pop")
data("eusilcA_smp")
income <- eusilcA_smp$eqIncome
X_covar <- eusilcA_smp[,-c(1,16,17,18)]
# Example 1:
# Calculating point estimates and discussing basic generic functions
model1 <- SAEforest_model(Y = income, X = X_covar, dName = "district",
smp_data = eusilcA_smp, pop_data = eusilcA_pop,
num.trees=50, mtry = 3)
#> Error in initializePtr(): function 'cholmod_factor_ldetA' not provided by package 'Matrix'
#SAEforest generics:
summary(model1)
#> Error in eval(expr, envir, enclos): object 'model1' not found
summarize_indicators(model1)
#> Error in eval(expr, envir, enclos): object 'model1' not found
residuals(model1)
#> Error in eval(expr, envir, enclos): object 'model1' not found
sigma(model1)
#> Error in eval(expr, envir, enclos): object 'model1' not found
# }