makedata {rsae} | R Documentation |
Synthetic Data Generation for the Basic Unit-Level SAE Model
Description
This function generates synthetic data (possibly contaminated by outliers) for the basic unit-level SAE model.
Usage
makedata(seed = 1024, intercept = 1, beta = 1, n = 4, g = 20, areaID = NULL,
ve = 1, ve.contam = 41, ve.epsilon = 0, vu = 1, vu.contam = 41,
vu.epsilon = 0)
Arguments
seed |
|
intercept |
|
beta |
|
n |
|
g |
|
areaID |
|
ve |
|
ve.contam |
|
ve.epsilon |
|
vu |
|
vu.contam |
|
vu.epsilon |
|
Details
Let denote an area-specific
-vector of
the response variable for the areas
. Define a
-matrix
of realizations
from the std. normal distribution,
, and let
denote a
-vector of regression coefficients. Now, the
are drawn using the law
with
and
the variances of the model error and random-effect
variance, respectively, and
and
denoting
the identity matrix and matrix of ones, respectively.
In addition, we allow the distribution of the model/residual and
area-level random effect to be contaminated (cf. Stahel and Welsh, 1997).
Notably, the laws of and
are replaced
by the Tukey-Huber contamination mixture:
where and
regulate the degree of contamination;
and
define the variance of the contamination part of the mixture distribution.
Four different contamination setups are possible:
no contamination (i.e.,
ve.epsilon = vu.epsilon = 0
),contaminated model error (i.e.,
ve.epsilon != 0
andvu.epsilon = 0
),contaminated random effect (i.e.,
ve.epsilon = 0
andvu.epsilon != 0
),both are conaminated (i.e.,
ve.epsilon != 0
andvu.epsilon != 0
).
Value
An instance of the class saemodel
.
References
Schoch, T. (2012). Robust Unit-Level Small Area Estimation: A Fast Algorithm for Large Datasets. Austrian Journal of Statistics 41, 243–265. doi:10.17713/ajs.v41i4.1548
Stahel, W. A. and A. Welsh (1997). Approaches to robust estimation in the simplest variance components model. Journal of Statistical Planning and Inference 57, 295–319. doi:10.1016/S0378-3758(96)00050-X
See Also
Examples
# generate a model with synthetic data
model <- makedata()
model
# summary of the model
summary(model)