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
.
MERFmodel
The included
MERFmodel
object 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.Indicators
A data frame where the first column is the area-level identifier and additional columns are the indicators of interest. Note that objects from
SAEforest_model
only report the "Mean".MSE_estimates
Only 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_model
only report MSE values for the "Mean".NrCovar
Only if means under aggregated covariate information are estimated, i.e.
SAEforest_model
with 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
:
Forest
A random forest of class ranger modelling fixed effects of the model.
EffectModel
A model of random effects of class
merMod
capturing structural components of MERFs and modeling random components.RandomEffects
List element containing the values of random intercepts from
EffectModel
.RanEffSD
Numeric value of standard deviation of random intercepts.
ErrorSD
Numeric value of standard deviation of unit-level errors.
VarianceCovariance
VarCorr matrix from
EffectModel
.LogLik
Vector with numerical entries showing the loglikelihood of the MERF algorithm.
IterationsUsed
Numeric number of iterations used until convergence of the MERF algorithm.
OOBresiduals
Vector of OOB-residuals.
Random
Character specifying the random intercept in the random effects model.
ErrorTolerance
Numerical value to monitor the MERF algorithm's convergence.
initialRandomEffects
Numeric value or vector of initial specification of random effects.
MaxIterations
Numeric value specifying the maximal amount of iterations for the MERF algorithm.
call
The summarized function call producing the object.
data_specs
Data characteristics such as domain-specific sample sizes or number of out-of-sample areas.
data
Processed 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
# }