0% found this document useful (0 votes)
19 views35 pages

Sae Methodology

This document describes the methodology behind functions in the R package sae, which estimates characteristics of small domains in a population using sample survey data. It discusses direct estimation of domain means using sample data from each domain. Estimators are design-unbiased and depend on whether sampling was with or without replacement. It also provides formulas for variance estimation under different sampling designs.

Uploaded by

essentialstat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views35 pages

Sae Methodology

This document describes the methodology behind functions in the R package sae, which estimates characteristics of small domains in a population using sample survey data. It discusses direct estimation of domain means using sample data from each domain. Estimators are design-unbiased and depend on whether sampling was with or without replacement. It also provides formulas for variance estimation under different sampling designs.

Uploaded by

essentialstat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

R package sae: Methodology

Isabel Molina*, Yolanda Marhuenda


March, 2015

Contents
1 Introduction 3

2 Function direct 3
2.1 Sampling without replacement . . . . . . . . . . . . . . . . . . . . 3
2.2 Sampling with replacement . . . . . . . . . . . . . . . . . . . . . . 5

3 Function pssynt 5

4 Function ssd 6

5 Function eblupFH 7
5.1 FH fitting method . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.2 ML fitting method . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5.3 REML fitting method . . . . . . . . . . . . . . . . . . . . . . . . . 11

6 Function mseFH 12
6.1 FH fitting method . . . . . . . . . . . . . . . . . . . . . . . . . . 13
6.2 ML fitting method . . . . . . . . . . . . . . . . . . . . . . . . . . 14
6.3 REML fitting method . . . . . . . . . . . . . . . . . . . . . . . . . 14

7 Function eblupSFH 14
7.1 ML fitting method . . . . . . . . . . . . . . . . . . . . . . . . . . 16
7.2 REML fitting method . . . . . . . . . . . . . . . . . . . . . . . . . 17

8 Function mseSFH 18
8.1 REML fitting method . . . . . . . . . . . . . . . . . . . . . . . . . 19
8.2 ML fitting method . . . . . . . . . . . . . . . . . . . . . . . . . . 19
* Department of Statistics, Universidad Carlos III de Madrid. Address: C/Madrid 126,
28903 Getafe (Madrid), Spain, Tf: +34 916249887, Fax: +34 916249849, E-mail: is-
[email protected]

1
9 Function pbmseSFH 20

10 Function npbmseSFH 21

11 Function eblupSTFH 23
11.1 REML fitting method . . . . . . . . . . . . . . . . . . . . . . . . . 26

12 Function pbmseSTFH 27

13 Function eblupBHF 28

14 Function pbmseBHF 30

15 Function ebBHF 31

16 Function pbmseebBHF 32

References 33

2
1 Introduction
The R package sae estimates characteristics of the domains of a population, when
a sample is available from the whole population, but not all the target domains
have a sufficiently large sample size. This document describes the methodology
behind the functions of the package, giving the exact formulas and procedures
implemented in each function.
The following notation will be used through all this document. U denotes the
target population, assumed to be partitioned into D subsets U1 , . . . , UD called
indistinctly domains or areas, of respective sizes N1 , . . . , ND . The measurement
of the variable of interest for j-th individual within d-th area is denoted Ydj and
yd = (Yd1 , . . . , YdNd )0 is the vector with the measurements for d-th area. The
target domain parameters have the form δd = hd (yd ), d = 1, . . . , D, for known
real measurable functions hd (). Particular cases of δd are the domain means
Nd
X
δd = Ȳd = Nd−1 Ydj , d = 1, . . . , D.
j=1

These parameters are estimated using the information coming from a random
sample s of size n drawn fromP U . Here, sd is the subsample of size nd from domain
Ud , d = 1, . . . , D, where n = Dd=1 nd , and rd = Ud −sd is the sample complement
from domain d, of size Nd − nd , d = 1, . . . , D.

2 Function direct
Function direct estimates the area means Ȳd , d = 1, . . . , D, where, for each area
d, the estimator of Ȳd is calculated using only the sample data sd from that same
domain d. The obtained estimators are unbiased with respect to the sampling
design (design-unbiased). The call to the function is
direct(y, dom, sweight, domsize, data, replace = FALSE)

The particular estimator calculated by the function depends on the specified


arguments replace and sweight, related to the sampling design. If replace
is TRUE, the sampling design is assumed to be with replacement and otherwise
without replacement. The sampling weights should be introduced through the
argument sweight, but when this argument is dropped, the function assumes
simple random sampling (SRS). Under SRS, the sizes of the domains Nd , d =
1, . . . , D (domsize) are unnecessary.

2.1 Sampling without replacement


Consider that the sample sd is drawn without replacement within domain Ud , d =
1, . . . , D. Let πdj be the inclusion probability of j-th unit from d-th domain in the
−1
corresponding domain sample sd and let wdj = πdj be the corresponding sampling

3
weight. The unbiased estimator of Ȳd is the Horvitz-Thompson estimator, given
by
X Ydj
ȲˆdDIR = Nd−1
X
= Nd−1 wdj Ydj .
j∈s
πdj j∈s
d d

Now let πd,jk be the inclusion probability of the pair of units j and k from d-th
domain in the sample sd . The sampling variance is given by
 
Nd Nd XNd
Ydj2
 
ˆ DIR 1 X X Ydj Ydk 
Vπ (Ȳd ) = 2 (1 − πdj ) + 2 (πd,jk − πdj πdk ) .
Nd  j=1 πdj π π
j=1 k=1 dj dk


k>j

If πd,jk > 0, ∀(j, k), an unbiased estimator of this variance is given by


 

X Ydj 2 
X X Ydj Ydk (πd,jk − πdj πdk ) 
ˆ DIR 1 
V̂π (Ȳd ) = 2 2
(1 − πdj ) + 2 . (1)
Nd  j∈s πdj j∈s k∈s
πdj πdk πd,jk 

d d d
k>j

This estimator requires the second order inclusion probabilities, but many times
these are not available. Then, it is common to find an approximation of (1).
A simple approximation is obtained by considering πd,jk ≈ πdj πdk , which holds
exactly in the case of Poisson sampling. This approximation makes the second
sum in (1) equal to zero and leads to the estimator
1 X 1 − πdj 2
V̂π (ȲˆdDIR ) = 2 2
Ydj .
Nd j∈s πdj
d

Writing the approximate unbiased estimator of the variance in terms of the sam-
pling weights wdj (sweight), we get the expression provided by function direct
when the argument sweight is specified,
1 X
V̂π (ȲˆdDIR ) = 2 wdj (wdj − 1)Ydj2 .
Nd j∈s
d

Under SRS without replacement, the result of the previous estimator does not
coincide with the usual unbiased estimator. Thus, when the argument sweight
is dropped, the function direct assumes SRS without replacement and returns
the usual unbiased estimators under this design
2
S
Ȳˆd = ȳd = n−1 V̂π (ȲˆdDIR ) = (1 − fd ) d ,
X
d Ydj ,
j∈sd
nd

domain sampling fraction and Sd2 is the domain quasi-


where fd = nd /Nd is the P
variance Sd2 = (nd − 1)−1 j∈sd (Ydj − ȳd )2 .

4
2.2 Sampling with replacement
Now consider the case in which sd is drawn with replacement within domain Ud ,
d = 1, . . . , D, with initial selection probabilities Pdj , j = 1, . . . , Nd . In this case,
the unbiased estimator of the domain mean is given by
X Ydj
ȲˆdDIR = Nd−1 .
j∈s
n d P dj
d

To obtain this estimator, the argument sweight must contain the vector of
weights calculated as wdj = (nd Pdj )−1 , j ∈ sd , d = 1, . . . , D. Using these
weights, the unbiased estimator of Ȳd calculated by the function direct with
replace=TRUE has exactly the same shape as that one in Section 2.1, i.e.

ȲˆdDIR = Nd−1
X
wdj Ydj .
j∈sd

The sampling variance of this estimator is given by


Nd  2
ˆ DIR 1 X Ydj
Vπ (Ȳd ) = − Ȳd Pdj .
nd j=1 Nd Pdj

and using again wdj = (nd Pdj )−1 , we obtain the unbiased variance estimator
calculated by the function direct,
 2
ˆ 1 X Ydj ˆ 1 X 2
DIR
V̂π (Ȳd ) = − ȲdDIR
= fd wdj Ydj − Ȳˆd .
nd j∈s Nd Pdj nd j∈s
d d

Under SRS with replacement, the population sizes Nd (domsize) are not needed.
Thus, when the argument domsize is dropped, the function assumes SRS and
calculates the classical unbiased estimators

ȲˆdDIR = ȳd = n−1 Ydj , V̂π (ȲˆdDIR ) = n−1


X
2
d d Sd .
j∈sd

3 Function pssynt
Indirect estimators“borrow strength”from other domains by making assumptions
establishing some homogeneity relationship among domains. The post-stratified
synthetic estimator is a basic indirect estimator. It assumes that data are dis-
tributed into K groups (called post-strata) that cut across the domains, and such
that the within group mean is constant across domains. The groups are assumed
to have sufficient sample sizes to allow obtaining accurate direct estimates of the
group means. These assumptions allow us to estimate a domain mean using a
weighted combination of the (reliable) estimates of the group means. The func-
tion pssynt calculates post-stratified synthetic estimates of the domain means
Ȳd , d = 1, . . . , D. The call to this function is

5
pssynt(y, sweight, ps, domsizebyps, data)
More specifically, the post-stratified synthetic estimator considers that there
is a grouping variable (ps) which divides the data into K post-strata. The
population count in the crossing between post-stratum k and domain PKd, Ndk
(domsizebyps), is assumed to be known for all k and d with Nd = k=1 Ndk .
Then, the mean of domain d can be calculated as a weighted combination of the
means in the crossings of domain d with each post-strata Ȳdk , k = 1, . . . , K, as
follows
K
1 X
Ȳd = Ndk Ȳdk . (2)
Nd k=1
Under the assumption of constant mean across domains within each post-stratum,

Ȳdk = Ȳ+k , k = 1, . . . , K,

where Ȳ+k denotes the mean of post-stratum k, an estimator of Ȳd can be obtained
by replacing Ȳ+k = Ȳdk in (2) by some direct estimate of Ȳ+k , k = 1, . . . , K.
Thus, we estimate the domain mean Ȳd using all the observations from the post-
strata that cut across that domain. To estimate Ȳ+k , we consider the ratio HT
estimator, given by
DIR
ˆ Ŷ+k
Ȳ+k = DIR , (3)
N̂+k
DIR DIR
where Ŷ+k is the direct estimator of the total Y+k in post-stratum k and
DIR
N̂+k is the direct estimator of the population count in the same post-stratum,
N+k , calculated using the sampling weights wdj (sweight) of the units in that
post-stratum. Replacing (3) for Ȳdk in (2), we obtain the post-stratified synthetic
estimate returned by the function pssynt,
K
1 X
ȲˆdSY N = Ndk Ȳˆ+k .
Nd k=1

4 Function ssd
The direct estimator of Ȳd is inefficient for a domain d with a small sample size.
On the other hand, the post-stratified synthetic estimator is biased when the
means across domains within a post-stratum are not constant, which is likely to
occur in practice. To balance the bias of a synthetic estimator and the insta-
bility of a direct estimator, Drew, Singh & Choudhry (1982) proposed to take a
weighted combination (or composition) of the two, with weight depending on the
sample size of the domain. Thus, the function ssd estimates the domain means
Ȳd , d = 1, . . . , D by a kind of composite estimators called sample-size dependent
estimators. The call to this function is
ssd(dom, sweight, domsize, direct, synthetic, delta = 1, data)

6
As mentioned above, the sample-size dependent estimator is obtained by com-
position of a direct estimator (direct) and a synthetic estimator (synthetic),
both specified by the user, that is,

ȲˆdC = φd ȲˆdDIR + (1 − φd )ȲˆdSY N .

The composition weight φd is obtained as



1, N̂dDIR ≥ δNd ;
φd =
N̂dDIR /(δNd ), N̂dDIR < δNd ,

for Nd known (domsize) and for a given constant δ > 0 (delta). Thus, for a
domain with sample size large enough so that the estimated count N̂dDIR is greater
than δNd , the sample size dependent estimator becomes the direct estimator
ȲˆdDIR . Otherwise, it becomes the composition of the direct and the synthetic
estimator ȲˆdSY N . The constant δ (delta) controls how much strength to borrow
from other domains by attaching more or less weight to the synthetic estimator,
with a large value of δ meaning to borrow more strength.

5 Function eblupFH
Fay-Herriot (FH) models were introduced by Fay & Herriot (1979) to obtain
small area estimators of median income in small places in the U.S. These models
are well known in the literature of small area estimation (SAE) and are the basic
tool when only aggregated auxiliary data at the area level are available. The
function eblupFH estimates domain characteristics δd = hd (yd ), d = 1, . . . , D,
based on the mentioned FH model, and the call to this function is

eblupFH(formula, vardir, method = "REML", MAXITER = 100,


PRECISION= 0.0001, data)

The basic FH model is defined in two stages. First, since true values δd are
not observable, our data will be the direct estimates δ̂dDIR (left hand side of
formula). These estimates have an error and this error might be different for
each area because samples sizes in the areas are generally different. Thus, in
the first stage, we assume the following model representing the error of direct
estimates,
ind
δ̂dDIR = δd + ed , ed ∼ N (0, ψd ), d = 1, . . . , D, (4)
and referred to as sampling model, where ψd is the sampling variance (vardir)
of direct estimator δ̂dDIR given δd , assumed to be known for all d.
In a second stage, true values δd are assumed to be linearly related with a
vector of auxiliary variables (right hand side of formula),
iid
δd = x0d β + vd , vd ∼ N (0, A), d = 1, . . . , D, (5)

7
where vd is independent of ed , d = 1, . . . , D. This is called the linking model
because it links all the areas through the common model parameter β. Replacing
(5) in (4), we obtain
iid ind
δ̂dDIR = x0d β + vd + ed , vd ∼ N (0, A), ed ∼ N (0, ψd ), d = 1, . . . , D,

or equivalently,
ind
δ̂dDIR ∼ N (x0d β, ψd + A), d = 1, . . . , D. (6)

In matrix notation, (6) may be written as y ∼ N {Xβ, Σ(A)}, where y =


DIR 0
X = (x1 , . . . , xD )0 and Σ(A) = diag(A + ψ1 , . . . , A + ψD ). The
(δ̂1DIR , . . . , δ̂D ),
best linear unbiased predictor (BLUP) of δd is given by

ψd n DIR o
δ̃d = δ̂dDIR − δ̂d − x0d β̃(A)
A + ψd
= {1 − Bd (A)}δ̂dDIR + Bd (A) x0d β̃(A), (7)

where Bd (A) = ψd /(A+ψd ) and β̃(A) is the maximum likelihood (ML) estimator
of β obtained from (6) and also the weighted least squares (WLS) estimator of
β without normality assumption, given by

β̃(A) = {X0 Σ−1 (A)X}−1 X0 Σ−1 (A)y


( D )−1 D
X X
= (A + ψd )−1 xd x0d (A + ψd )−1 xd δ̂dDIR . (8)
d=1 d=1

Expression (7) shows that δ̃d is obtained by composition of the direct esti-
mator δ̂dDIR and the regression synthetic estimator x0d β̃(A), with more weight
attached to the direct estimator when ψd is small relative to the total variance
A + ψd , which means that the direct estimator is reliable, and more weight at-
tached to the regression synthetic estimator x0d β when the direct estimator is
not reliable enough and then more strength is required to borrow from the other
domains.
Since A is unknown, in practice it is replaced by a consistent estimator Â.
Several estimation methods (method) for A are considered including a moment
estimator called Fay-Herriot (FH) method, maximum likelihood (ML) and re-
stricted (or residual) ML (REML), see the next subsections. Substituting the
obtained estimator  for A in the BLUP (7), we get the final empirical BLUP
(EBLUP) returned by eblupFH, and given by

δ̂d = δ̃d (Â) = {1 − Bd (Â)}δ̂dDIR + Bd (Â)x0d β̂, (9)

where β̂ = β̃(Â).
Function eblupFH delivers, together with the estimated model coefficients,
i.e. the components of β̂, their asymptotic standard errors given by the diagonal

8
elements of the Fisher information depending on the specified estimation method
(method), the Z statistics obtained by dividing the estimates by their standard
errors, and the p-values of the significance tests. Since for large D, the three
possible estimators satisfy

β̂ ∼ N β, I −1 (β) ,


where I(β) is the Fisher information, then the Z statistic for a coefficient βj is

Zj = β̂j / vjj , j = 1, . . . , p,

where vjj is the estimated asymptotic variance of β̂j , given by the j-th element
in the diagonal of I −1 (β̂). Finally, for the test

H0 : βj = 0 versus H1 : βj 6= 0,

p-values are obtained as

p-value = 2 P (Z > |Zj |),

where Z is a standard normal random variable.


Three different goodness of fit measures are also delivered by function eblupFH.
The first one is the estimated log-likelihood `(Â, β̂; y), obtained by replacing the
obtained estimates  and β̂ in (12). The second criteria is the Akaike Information
Criteria (AIC), given in this case by

AIC = −2 `(Â, β̂; y) + 2(p + 1).

Finally, the Bayesian Information Criteria (BIC) is obtained as

BIC = −2 `(Â, β̂; y) + (p + 1) log(D).

5.1 FH fitting method


FH method gives an estimator of A based on a moments method originally
proposed by Fay & Herriot (1979). The FH estimator is given by ÂF H =
max(0, A∗F H ) with A∗F H obtained iteratively as the solution of the following non-
linear equation in A,
D
X
(A + ψd )−1 {δ̂dDIR − x0d β̃(A)}2 = D − p. (10)
d=1

This equation is solved using an iterative method such as the Fisher-scoring


algorithm. For this, let us define
D
X
SF H (A) = (A + ψd )−1 {δ̂dDIR − x0d β̃(A)}2 − D − p.
d=1

9
By a first order Taylor expansion of SF H (AF H ) around the true A, we get

∂SF H (A) ∗
0 = SF H (AF H ) ≈ SF H (A) + (AF H − A). (11)
∂A
The Fisher-scoring algorithm replaces in this equation, the derivative ∂SF H (A)/∂A
by its expectation E{−∂SF H (A)/∂A}, which in this case is equal to
  X D
∂SF H (A)
E − = (A + ψd )−1 .
∂A d=1

Then, solving for AF H in (11), we get


  −1
∂SF H (A)
AF H =A+ E − SF H (A).
∂A
(0)
This algorithm is started taking A = AF H , and then in each iteration it updates
the estimate of A with the updating equation
"   #−1
(k+1) (k) ∂S FH (A) (k)
AF H = AF H + E − SF H (AF H ).
∂A A=A
(k)
FH

(0)
In the function eblupFH, the starting value is set to AF H = median(ψd ). It
stops either when the number of iterations k > MAXITER where MAXITER
can be chosen by the user, or when
(k+1) (k)
AF H − AF H
(k)
< PRECISION.
AF H

Convergence of the iteration is generally rapid.

5.2 ML fitting method


The model parameters A and β can be estimated by ML or REML procedures
based on the normal likelihood (6). In fact, under regularity conditions, the
estimators derived from these two methods (and using the Normal likelihood)
remain consistent at order Op (D−1/2 ) even without the Normality assumption, for
details see Jiang (1996). ML estimators of A and β are obtained by maximizing
the log-likelihood, given by
1 1
`(A, β; y) = c − log |Σ(A)| − (y − Xβ)0 Σ−1 (A)(y − Xβ), (12)
2 2
where c denotes a constant. Taking derivative of ` with respect to β and equating
to zero, we obtain the equation that gives the ML (or WLS) estimator (8). The

10
ML equation for A is obtained taking derivative of ` with respect to A and
equating to zero, and is given by
D
X D
X
−2 0
DIR 2
(A + ψd ) {δ̂d − xd β̃(A)} = (A + ψd )−1 . (13)
d=1 d=1

Again, Fisher-scoring algorithm is used to solve this equation. The score is


defined as SM L (A) = ∂`(A, β; y)/∂A and is given by
D
X D
X
−2
SM L (A) = (A + ψd ) {δ̂dDIR − x0d β̃(A)}2 − (A + ψd )−1 .
d=1 d=1

The Fisher information for A is obtained by taking expectation of the negative


derivative of SM L (A), and is given by
  D
∂SM L (A) 1X
IM L (A) = E − = (A + ψd )−2 . (14)
∂A 2 d=1

Finally, the updating equation for the ML estimator of A is


n o−1
(k+1) (k) (k) (k)
AM L = AM L + IM L (AM L ) SM L (AM L ).

(0)
Starting value AM L and stopping criterion are the same as in the FH method
described above. If A∗M L is the estimate obtained in the last iteration of the algo-
rithm, then the final ML estimate returned by eblupFH is ÂM L = max(0, A∗M L ).

5.3 REML fitting method


The REML estimator of A is obtained by maximizing the so called restricted
likelihood, which is the joint p.d.f. of a vector of D − p independent contrasts
F0 y of the data y, where F is an D × (D − p) full column rank matrix satisfying
F0 F = ID−p and F0 X = 0(D−p)×p . The restricted likelihood of F0 y does not
depend on β, and the log-restricted likelihood is
1 1 −1
`R (A; y) = c − log |F0 Σ(A)F| − y0 F {F0 Σ(A)F} F0 y.
2 2
It holds that
−1
F {F0 Σ(A)F} F0 = P(A),
where
−1
P(A) = Σ−1 (A) − Σ−1 (A)X X0 Σ−1 (A)X X0 Σ−1 (A).


Using this relation, we obtain


1 1
`R (A; y) = c − log |F0 Σ(A)F| − y0 P(A)y.
2 2
11
The score is defined as SR (A) = ∂`R (A; y)/∂A, and is given by
1 1
SR (A) = − trace{P(A)} + y0 P2 (A)y
2 2
D h i
−1
X
= − (A + ψd ) − trace X0 Σ−1 (A)X
−1 0 −2
X Σ (A)X
d=1
1
+ {y − Xβ̃(A)}0 Σ−2 (A){y − Xβ̃(A)}
2
nP o−1
0 D −1 0
XD D
X d x k=1 (A + ψk ) x x
k k xd
−1
= (A + ψd ) −
d=1 d=1
(A + ψd )2
D
X {δ̂ DIR − x0 β̃(A)}2
d d
− .
d=1
(A + ψd )2

The REML estimator of A is obtained by solving the non-linear equation SR (A) =


0. Again, application of Fisher-scoring algorithm requires also the Fisher infor-
mation for A associated with `R (A; y), which is given by
 
∂SR (A) 1
IR (A) = E − = trace{P2 (A)}
∂A 2
1
trace{Σ(A)−2 } − trace {X0 Σ−1 (A)X}−1 X0 Σ−3 (A)X
 
=
2
1  2 
+ trace {X0 Σ−1 (A)X}−1 X0 Σ−3 (A)X .
2
Finally, the updating equation is
n o−1
(k+1) (k) (k) (k)
AREM L = AREM L + IR (AREM L ) SR (AREM L ).

(0)
Starting value AREM L and stopping criterion are the same as in FH and ML
methods. Again, if A∗REM L is the value obtained in the last iteration, then the
REML estimate is finally ÂREM L = max(0, A∗REM L ).

6 Function mseFH
The accuracy of an EBLUP δ̂d is usually assessed by the estimated MSE. Function
mseFH accompanies the EBLUPs with their corresponding estimated MSEs. The
call to this function is

mseFH(formula, vardir, method = "REML", MAXITER = 100,


PRECISION = 0.0001, data)

where the arguments are exactly those of function eblupFH.

12
Under model (4)–(5), the MSE of the BLUP for A known is given by
MSE(δ̃d ) = E(δ̃d − δd )2 = g1d (A) + g2d (A),
where
g1d (A) = ψd {1 − Bd (A)}, (15)
( D )−1
X
2 0 −1 0
g2d (A) = {Bd (A)} xd (A + ψd ) xd xd xd , (16)
d=1

where g1d (A) is due to the prediction of the random effect vd and is O(1) for large
D, and g2d (A) is due to the estimation of β and is O(D−1 ). This means that, for
large D, a large reduction in MSE over M SE(δ̂dDIR ) = ψd can be obtained when
1 − Bd (A) = A/(A + ψd ) is small.
Under normality of random effects and errors, the MSE of the EBLUP satisfies
MSE(δ̂d ) = MSE(δ̂d ) + E(δ̂d − δ̃d )2
(17)
= [g1d (A) + g2d (A)] + g3d (A) + o(D−1 ),
where g3d (A) is the uncertainty arising from the estimation of A, given by
g3d (A) = {Bd (A)}2 (A + ψd )−1 V̄ (Â), (18)
where V̄ (Â) is the asymptotic variance (as D → ∞) of the estimator  of A.
Thus, g3d (A) depends on the choice of estimator  but for the three available
fitting methods FH, ML and REML, this term is O(D−1 ) (Prasad & Rao, 1990).
The MSE of the EBLUP depends on the true variance A, which is unknown.
If we want to have an unbiased estimator of the MSE up to o(D−1 ) terms (or
second order unbiased), the MSE estimator depends on the method used to find Â
in the EBLUP (method). The following subsections describe the MSE estimates
returned by mseFH for each selected fitting method.

6.1 FH fitting method


When using the FH estimator ÂF H , a second order unbiased estimator of MSE(δ̂d )
using ÂF H is given by
mseF H (δ̂d ) = g1d (ÂF H ) + g2d (ÂF H ) + 2 g3d (ÂF H ) − bF H (ÂF H ){Bd (ÂF H )}2 , (19)
where, in g3d (ÂF H ), the asymptotic variance is
2D
V̄ (ÂF H ) = nP o2 (20)
D
d=1 (A + ψd )−1
and  nP o2 
PD −2 D −1
2 D d=1 (A + ψd ) − d=1 (A + ψd )
bF H (A) = nP o3 , (21)
D −1
d=1 (A + ψd )

see Datta, Rao & Smith (2005).

13
6.2 ML fitting method
When using the ML estimator ÂM L of A, a second order unbiased estimator of
MSE(δ̂d ) was obtained by Datta & Lahiri (2000) and is given by

mseM L (δ̂d ) = g1d (ÂM L ) + g2d (ÂM L ) + 2g3d (ÂM L ) − bM L (ÂM L ) 5 g1d (ÂM L ), (22)

where the asymptotic variance involved in g3d (A) is equal to the inverse of the
Fisher information given in (14),

−1 2
V̄ (ÂM L ) = IM L (A) = PD , (23)
−2
d=1 (A + ψd )
n o−1 nP o
PD −1 D
trace `=1 (A + ψ` ) x` x0` `=1 (A + ψ` ) −2
x` x0`
bM L (A) = − PD
`=1 (A + ψ` )−2
and  2
∂g1d (A) ψd
5g1d (A) = = .
∂A A + ψd

6.3 REML fitting method


When using the REML estimator ÂREM L , a second order unbiased estimator of
MSE(δ̂d ) is given by

mseREM L (δ̂d ) = g1d (ÂREM L ) + g2d (ÂREM L ) + 2g3d (ÂREM L ), (24)

where V̄ (ÂREM L ) = V̄ (ÂM L ) is given in (23), see Datta & Lahiri (2000).

7 Function eblupSFH
Function eblupSFH estimates domain parameters δd = hd (yd ), d = 1, . . . , D,
based on a FH model with spatially correlated area effects. The call to the
function is
eblupSFH(formula, vardir, proxmat, method = "REML", MAXITER = 100,
PRECISION = 0.0001, data)
The model considered by this function is, in matrix notation,

y = Xβ + v + e, (25)
DIR 0
where y = (δ̂1DIR , . . . , δ̂D ) is the vector of direct estimates for the D small areas
(left hand side of formula), X = (x1 , . . . , xD )0 is a D × p matrix containing in its
columns the values of p explanatory variables for the D areas (right hand side of
formula), v = (v1 , . . . , vD )0 is the vector of area effects and e = (e1 , . . . , eD )0 is
the vector of independent sampling errors, independent of v, with e ∼ N (0D , Ψ),

14
where the covariance matrix Ψ = diag(ψ1 , . . . , ψD ) is known (vardir contains
the diagonal elements). The vector δ = Xβ +v = (δ1 , . . . , δD )0 collects the target
domain parameters.
The vector v follows an simultaneously autoregressive (SAR) process with
unknown autoregression parameter ρ ∈ (−1, 1) and proximity matrix W, i.e.,
v = ρWv + u, (26)
see Anselin (1988) and Cressie (1993). Model (25)–(26) will be called hereafter
spatial FH (SFH) model. We assume that the matrix (ID − ρW) is non-singular,
where ID denotes the D × D identity matrix. Then v can be expressed as
v = (ID − ρW)−1 u, (27)
where u = (u1 , . . . , uD )0 satisfies u ∼ N (0D , A ID ) for A unknown.
The matrix W (proxmat) is obtained from an original proximity matrix W0 ,
whose diagonal elements area equal to zero and the remaining entries are equal to
1 when the two areas corresponding to the row and the column indices are consid-
ered as neighbor and zero otherwise. Then W is obtained by row-standardization
of W0 , obtained by dividing each entry of W0 by the sum of elements in the
same row, see Anselin (1988), Cressie (1993) and Banerjee, Carlin & Gelfand
(2004) for more details on the SAR(1) process with the above parametrization.
When W is defined in this fashion, ρ is called spatial autocorrelation parameter
(Banerjee, Carlin & Gelfand, 2004). Hereafter, the vector of variance compo-
nents will be denoted θ = (θ1 , θ2 )0 = (A, ρ)0 . Equation (27) implies that v has
mean vector 0 and covariance matrix equal to
−1
G(θ) = A {(ID − ρW)0 (ID − ρW)} . (28)
Since e is independent of v, the covariance matrix of y is equal to
Σ(θ) = G(θ) + Ψ.
Combining (25) and (27), the model is
y = Xβ + (ID − ρW)−1 u + e (29)
The BLUP of δd = x0d β + vd under model (29) is called Spatial BLUP (Petrucci
& Salvati, 2006) and is given by
δ̃d (θ) = x0d β̃(θ) + b0d G(θ)Σ−1 (θ){y − Xβ̃(θ)}, (30)
where β̃(θ) = {X0 Σ−1 (θ)X}−1 X0 Σ−1 (θ)y is the WLS estimator of β and b0d is
the 1 × d vector (0, . . . , 0, 1, 0, . . . , 0) with 1 in the d-th position. The Spatial
BLUPs δ̃d (θ), d = 1, . . . , D, depend on the unknown vector of variance compo-
nents θ = (A, ρ)0 . Replacing a consistent estimator θ̂ = (Â, ρ̂)0 for θ in (30),
we obtain the Spatial EBLUPs δ̂d = δ̃d (θ̂), d = 1, . . . , D, returned by function
eblupSFH. The following subsections describe the two fitting methods (method)
for the SFH model (25)–(26) supported by eblupSFH.

15
7.1 ML fitting method
The ML estimator of θ = (A, ρ)0 is obtained by maximizing the log-likelihood of
θ given the data vector y,
1 1
`(θ; y) = c − log |Σ(θ)| − (y − Xβ)0 Σ−1 (θ)(y − Xβ),
2 2
where c denotes a constant. The Fisher-scoring iterative algorithm is applied
to maximize this log-likelihood. Let S(θ) = (SA (θ), Sρ (θ))0 be the scores or
derivatives of the log-likelihood with respect to A and ρ, and let I(θ) be the
Fisher information matrix obtained from `(θ; y), with elements
 
IA,A (θ) IA,ρ (θ)
I(θ) = . (31)
Iρ,A (θ) Iρ,ρ (θ)
2(0)
The Fisher-scoring algorithm starts with an initial estimate θ (0) = (σu , ρ(0) )0
and then at each iteration k, this estimate is updated with the equation

θ (k+1) = θ (k) + I −1 (θ (k) )S(θ (k) ).

The ML equation for β yields


−1
β̃(θ) = X0 Σ−1 (θ)X X0 Σ−1 (θ)y.

(32)

Let us denote
C(ρ) = (ID − ρW)0 (ID − ρW)
and
−1
P(θ) = Σ−1 (θ) − Σ−1 (θ)X X0 Σ−1 (θ)X X0 Σ−1 (θ).

(33)
Then the derivative of C(ρ) with respect to ρ is

∂C(ρ)
= −W − W0 + 2ρW0 W
∂ρ

and the derivatives of Σ(θ) with respect to A and ρ are respectively given by

∂Σ(θ) ∂Σ(θ) ∂C(ρ) −1


= C−1 (ρ), = −A C−1 (ρ) C (ρ) , R(θ).
∂A ∂ρ ∂ρ

The scores associated to A and ρ, after replacing (32), are given by


1 1
SA (θ) = − trace Σ−1 (θ)C−1 (ρ) + y0 P(θ)C−1 (ρ)P(θ)y,

2 2
1 1
Sρ (θ) = − trace Σ (θ)R−1 (θ) + y0 P(θ)R(θ)P(θ)y.
 −1
2 2

16
The elements of the Fisher information matrix are
1
trace Σ−1 (θ)C−1 (ρ)Σ−1 (θ)C−1 (ρ) ,

IA,A (θ) = (34)
2
1
IA,ρ (θ) = Iρ,A = trace Σ−1 (θ)R(θ)Σ−1 (θ)C−1 (ρ) ,

(35)
2
1
Iρ,ρ (θ) = trace Σ (θ)R(θ)Σ−1 (θ)R(θ) .
 −1
(36)
2
In the function eblupSFH, the starting value of A is set to A(0) = median(ψd ). For
ρ, we take ρ(0) = 0.5. The algorithm stops either when the number of iterations
k > MAXITER where MAXITER can be chosen by the user, or when
( )
2(k+1) 2(k) (k+1) (k)
σu − σu ρ −ρ
max 2(k)
, (k)
< PRECISION.
σu ρ

7.2 REML fitting method


The REML estimator of θ is obtained by maximizing the restricted likelihood
defined as in Section 5.3. Under the SFH model, the restricted log-likelihood is
given by
1 1
`R (θ; y) = c − log |F0 Σ(θ)F| − y0 P(θ)y,
2 2
where P(θ) is defined in (33). Using the following properties of the matrix P(θ),

∂P(θ) ∂Σ(θ)
P(θ)Σ(θ)P(θ) = P(θ), = −P(θ) P(θ),
∂θr ∂θr
we obtain the scores or derivatives of `R (θ; y) with respect to each element of θ,
1 1
SAR (θ) = − trace P(θ)C−1 (ρ) + y0 P(θ)C−1 (ρ)P(θ)y,

2 2
1 1
SρR (θ) = − trace {P(θ)R(θ)} + y0 P(θ)R(θ)P(θ)y,
2 2
Finally, the elements of the Fisher information obtained from `R (θ; y) are
1
R
IA,A (θ) = tr{P(θ)C−1 (ρ)P(θ)C−1 (ρ)},
2
1
R R
IA,ρ (θ) = Iρ,A = tr{P(θ)R(θ)P(θ)C−1 (ρ)},
2
R 1
Iρ,ρ (θ) = tr{P(θ)R(θ)P(θ)R(θ)}.
2
The updating equation of the Fisher-scoring algorithm is then
−1
θ (k+1) = θ (k) + I R (θ (k) ) SR (θ (k) ),


17
where SR (θ) = (SAR (θ), SρR (θ))0 is the scores vector and
 R R

R IA,A (θ) IA,ρ (θ)
I (θ) = R R . (37)
Iρ,A (θ) Iρ,ρ (θ)
is the Fisher information matrix. Starting values and stopping criterion are set
the same as in the case of ML estimates.

8 Function mseSFH
Function mseSFH gives estimated MSEs of the Spatial EBLUPs under the SFH
model (25)–(26). The call to the function is
mseSFH(formula, vardir, proxmat, method = "REML", MAXITER = 100,
PRECISION = 0.0001, data)
which has the same arguments as function eblupSFH.
Similarly as in Section 6, under normality of random effects and errors, the
MSE of the Spatial EBLUP can be decomposed as

MSE{δ̃d (θ̂)} = MSE{δ̃d (θ)} + E{δ̃d (θ̂) − δ̃d (θ)}2


(38)
= [g1d (θ) + g2d (θ)] + g3d (θ),
where the first two terms on the right hand side are easily calculated due to the
linearity of the Spatial BLUP δ̃d (θ) in the data vector y. They are given by

g1d (θ) = b0d G(θ) − G(θ)Σ−1 (θ)G(θ) bd ,



(39)
0 −1 0 −1 −1 0

g2d (θ) = bd ID − G(θ)Σ (θ) X(X Σ (θ)X) X
× ID − Σ−1 (θ)G(θ) bd .

(40)

However, for the last term g3d (θ) = E{δ̃d (θ̂)− δ̃d (θ)}2 , an exact analytical expres-
sion does not exist due to the non-linearity of the EBLUP δ̃d (θ̂) in y. Under the
basic FH model (4)-(5) with independent random effects vd (diagonal covariance
matrix Σ), Prasad & Rao (1990) obtained an approximation up to o(D−1 ) terms
of g3d (θ) through Taylor linearization, see Section 6. Their formula can be taken
as a naive approximation of the true g3d (θ) under the SFH model (25)–(26).
Straightforward application of this formula to model (25)–(26) yields
PR
(θ) = trace Ld (θ)Σ(θ)L0d (θ)I −1 (θ) ,

g3d (41)

where I(θ) is the Fisher information defined in (31) with elements (34)–(36) and
 0
bd {C−1 (ρ)Σ−1 (θ) − AC−1 (ρ)Σ−1 (θ)C−1 (ρ)Σ−1 (θ)}

Ld (θ) = .
b0d {R(θ)Σ−1 (θ) − AC−1 (ρ)Σ−1 (θ)R(θ)Σ−1 (θ)}
Then the full MSE can be approximated by

MSEP R {δ̃d (θ̂)} = g1d (θ) + g2d (θ) + g3d


PR
(θ). (42)

18
Singh, Shukla & Kundu (2005) arrived to the same formula (42) for the true
MSE under a SFH model. However, this formula is not accounting for the extra
uncertainty due to estimation of the spatial autocorrelation parameter ρ. Next
subsections describe the MSE estimates returned by function mseSFH, depending
on the specified fitting method.

8.1 REML fitting method


Let θ̂REM L be the estimator of θ̂ when REML fitting method is specified in
mseSFH. In that case, the function mseSFH returns the MSE estimator derived by
Singh, Shukla & Kundu (2005) and given by
mseSSK [δ̃d (θ̂REM L )] = g1d (θ̂REM L ) + g2d (θ̂REM L ) + 2g3d
PR
(θ̂REM L ) − g4d (θ̂REM L ),
(43)
PR
where g1d , g2d and g3d are given respectively in (39), (40) and (41), and g4d (θ)
reads
2 2
1 XX 0 ∂ 2 Σ(θ) −1
g4d (θ) = bd Ψ Σ−1 (θ) Σ (θ)Ψ vrs (θ) bd ,
2 r=1 s=1 ∂θr ∂θs
where vrs (θ) denotes the element (r, s) of I(θ)−1 , for the Fisher information
matrix I(θ) defined in (31) with elements (34)–(36). The second order derivatives
of Σ(θ) are given by
∂ 2 Σ(θ)
= 0D×D ,
∂A2
∂ 2 Σ(θ) ∂ 2 Σ(θ) ∂C(ρ) −1
= = −C−1 (θ) C (θ),
∂A∂ρ ∂A∂ρ ∂ρ
∂ 2 Σ(θ) −1 ∂C(ρ) −1 ∂C(ρ) −1
= 2AC (θ) C (θ) C (θ) − 2AC−1 (θ)W0 WC−1 (θ).
∂∂ρ2 ∂ρ ∂ρ

8.2 ML fitting method


Let θ̂M L be the estimator of θ̂ when ML fitting method is specified. In that case,
the estimate returned by mseSFH reads
mseSSK PR
M L {δ̃d (θ̂)} = g1d (θ̂M L ) + g2d (θ̂M L ) + 2g3d (θ̂M L ) − g4d (θ̂M L )
−b0M L (θ̂M L )∇g1d (θ̂M L ).
PR
In this expression, g1d , g2d and g3d are defined respectively in (39), (40) and (41),
∇g1d (θ) = (∂g1d (θ)/∂A, ∂g1d (θ)/∂ρ)0 is the gradient of g1d (θ) with derivatives
∂g1d (θ)
= b0d C−1 (ρ) − 2 A C−1 (ρ)Σ−1 (θ)C−1 (ρ)

∂A
+ A2 C−1 (ρ)Σ−1 (θ)C−1 (ρ)Σ−1 (θ)C−1 (ρ) bd ,
∂g1d (θ)
= b0d R(θ) − 2 A C−1 (ρ)Σ−1 (θ)R(θ)

∂ρ
A2 C−1 (ρ)Σ−1 (θ)R(θ)Σ−1 (θ)C−1 (ρ) bd ,

19
and finally, bM L (θ̂M L ) is the bias of the ML estimator θ̂M L up to o(D−1 ) terms,
given by bM L (θ̂) = I −1 (θ̂M L )h(θ̂M L )/2 with h(θ̂M L ) = (h1 (θ̂M L ), h2 (θ̂M L ))0 and
h i
−1
h1 (θ) = −trace X0 Σ−1 (θ)X X0 Σ−1 (θ)C−1 (ρ)Σ−1 (θ)X ,
h i
−1
h2 (θ) = −trace X0 Σ−1 (θ)X X0 Σ−1 (θ)R(θ)Σ−1 (θ)X .

9 Function pbmseSFH
Function pbmseSFH gives parametric bootstrap estimates of the MSEs of the
Spatial EBLUPs under the SFH model (25)–(26) using an extension of González-
Manteiga et al. (2008b). The MSE estimators obtained by this procedure are
expected to be consistent if the model parameter estimates are consistent. The
call to the function is
pbmseSFH(formula, vardir, proxmat, B = 100, method = "REML",
MAXITER = 100, PRECISION = 0.0001, data)
where the arguments are those of function eblupSFH, and additionally the number
of bootstrap replicates B. The bootstrap procedure proceeds as follows:
DIR 0
1) Fit the SFH model (25)–(26) to the initial data y = (δ̂1DIR , . . . , δ̂D ),
0
obtaining model parameter estimates θ̂ = (Â, ρ̂) and β̂ = β̃(θ̂).
2) Generate a vector t∗1 whose elements are D independent copies of a N (0, 1).
Construct bootstrap vectors u∗ = Â1/2 t∗1 and v∗ = (ID − ρ̂W)−1 u∗ , and
calculate the bootstrap quantity of interest δ ∗ = Xβ̂ + v∗ , by regarding β̂
and θ̂ as the true values of the model parameters.
3) Generate a vector t∗2 with D independent copies of a N (0, 1), independently
of the generation of t∗1 , and construct the vector of bootstrap random errors
e∗ = Ψ1/2 t∗2 .
4) Obtain bootstrap data applying the model y∗ = δ ∗ + e∗ = Xβ̂ + v∗ + e∗ .
5) Regarding β̂ and θ̂ as the true values of β and θ, fit the SFH model (25)–
(26) to bootstrap data y∗ , obtaining estimates of the “true” β̂ and θ̂ based
on y∗ . For this, first calculate the estimator of β̂ evaluated at the “true”
value θ̂, n o −1
β̃ ∗ (θ̂) = X0 Σ−1 (θ̂)X X0 Σ−1 (θ̂)y∗ ;

next, obtain the estimator θ̂ ∗ of θ̂ based on y∗ and, finally, the estimator


of β̂ evaluated at θ̂ ∗ , that is, β̃ ∗ (θ̂ ∗ ).
6) Calculate the bootstrap Spatial BLUP from bootstrap data y∗ and regard-
ing θ̂ as the true value of θ,
n o
∗ 0 ∗ 0 −1 ∗ ∗
δ̃d (θ̂) = xd β̃ (θ̂) + bd G(θ̂)Σ(θ̂) y − Xβ̃ (θ̂) .

20
Calculate also the bootstrap Spatial EBLUP replacing θ̂ ∗ for the “true” θ̂,

δ̃d∗ (θ̂ ∗ ) = x0d β̃ ∗ (θ̂ ∗ ) + b0d G(θ̂ ∗ )Σ−1 (θ̂ ∗ )[y∗ − Xβ̃ ∗ (θ̂ ∗ )].

∗(b)
7) Repeat steps 2)–6) B times. In b-th bootstrap replication, let δd be the
∗(b)
quantity of interest for d-th area, θ̂ ∗(b) the bootstrap estimate of θ, δ̃d (θ̂)
∗(b)
the bootstrap Spatial BLUP and δ̃d (θ̂ ∗(b) ) the bootstrap Spatial EBLUP
for d-th area.

8) A parametric bootstrap estimator of g3d (θ) is


B n o2
∗(b) ∗(b)
X
−1
PB
g3d (θ̂) =B δ̃d (θ̂ ∗(b) ) − δ̃d (θ̂) .
b=1

Function pbmseSFH returns the naive parametric bootstrap estimator of the


full MSE, given by
B n o2
∗(b) ∗(b)
X
−1
mse naP B
{δ̃d (θ̂)} = B δ̃d (θ̂ ∗(b) ) − δd . (44)
b=1

Function pbmseSFH also returns a bias-corrected MSE estimate obtained as


in Pfeffermann and Tiller (2005), and given by
n o
bcP B PB
mse {δ̃d (θ̂)} = 2 g1d (θ̂) + g2d (θ̂) + g3d (θ̂)
B n
X o
−1
−B g1d (θ̂ ∗(b) ) + g2d (θ̂ ∗(b) ) . (45)
b=1

10 Function npbmseSFH
Function npbmseSFH gives MSE estimates for the Spatial EBLUPs under the
SFH model (25)–(26), using the nonparametric bootstrap approach of Molina,
Salvati & Pratesi (2009). The call to the function is
npbmseSFH(formula, vardir, proxmat, B = 100, method = "REML",
MAXITER = 100,PRECISION = 0.0001, data)
where the arguments are the same as in pbmseSFH. The function resamples ran-
dom effects {u∗1 , . . . , u∗D } and errors {e∗1 , . . . , e∗D } from the respective empirical
distribution of predicted random effects {û1 , . . . , ûD } and residuals {r̂1 , . . . , r̂D },
where rd = δ̂dDIR − δ̃d (θ̂), d = 1, . . . , D, all previously standardized. This method
avoids the need for distributional assumptions of ud and ed ; therefore, it is ex-
pected to be more robust to non-normality of the random model components.
Under model (25)–(26), the BLUPs of u and v are respectively given by

ṽ(θ) = G(θ)Σ−1 (θ){y − Xβ̃(θ)}, ũ(θ) = (I − ρW)ṽ(θ),

21
and the covariance matrix of ũ(θ) is
Σu (θ) = (I − ρW)G(θ)P(θ)G(θ)(I − ρW0 ).
Let us define the vector of residuals obtained from the BLUP
r̃(θ) = y − Xβ̃(θ) − ṽ(θ) = (δ̂1DIR − δ̃1 (θ), . . . , δ̂D
DIR
− δ̃d (θ))0 .
It is easy to see that the covariance matrix of r̃(θ) is
Σr (θ) = Ψ P(θ)Ψ,
for P(θ) defined in (33). The covariance matrices Σu (θ) and Σr (θ) are not
diagonal; hence, the elements of the vectors ũ(θ) and r̃(θ) are correlated. Indeed,
both ũ(θ) and r̃(θ) lie in a subspace of dimension D − p. Since the methods that
resample from the empirical distribution work well under an ideally iid setup,
before resampling a previous standardization step is crucial. Here û = ũ(θ̂) and
r̂ = r̃(θ̂) are transformed to achieve vectors that are as close as possible to be
uncorrelated and with unit variance elements. We describe the standardization
method only for û, since for r̂ the process is analogous. Let us consider the
estimated covariance matrix Σ̂u = Σu (θ̂). The spectral decomposition of Σ̂u is
Σ̂u = Qu ∆u Q0u ,
where ∆u is a diagonal matrix with the D − p non-zero eigenvalues of Σ̂u and
Qu is the matrix with the corresponding eigenvectors in the columns. Take
−1/2 −1/2
the square root matrix Σ̂u = Qu ∆u Q0u . Squaring this matrix gives a
generalized inverse of Σ̂u . With the obtained square root, we transform û as
ûS = Σ̂−1/2
u û.
The covariance matrix of ûS is then V (ûS ) = Qu Q0u , which is close to an identity
matrix. Observe that in the transformation
ûS = Qu ∆−1/2
u Q0u û,
the vector Q0u û contains the coordinates of û in its principal components, which
−1/2
are uncorrelated and with covariance matrix ∆u . Then multiplying by ∆u ,
these coordinates are standardized to have unit variance. Finally, this standard-
ized vector in the space of the principal components is returned to the original
space by multiplying by Qu . Thus, the transformed vector ûS contains the coor-
−1/2
dinates of the vector ∆u Q0u û, with standard elements, in the original space.
The eigenvalues, which are the variances of the uncorrelated principal compo-
nents, collect better the variability than the diagonals of Σ̂u . Indeed, simulations

were indicated that taking simply ûSd = ûd / vdd , where vdd is the d-th diagonal
element of Σ̂u , does not work well.
The final nonparametric bootstrap procedure is obtained by replacing steps
2) and 3) in the parametric bootstrap 1)–8) of Section 9 by the new steps 2’)
and 3’) given below:

22
2’) With the estimates θ̂ = (Â, ρ̂)0 and β̂ = β̃(θ̂) obtained in step 1), calculate
predictors of v and u as follows

v̂ = G(θ̂)Σ(θ̂)−1 (y − Xβ̂), û = (I − ρ̂W)v̂ = (û1 , . . . , ûm )0 .


−1/2 1/2
Then take ûS = Σ̂u û = (ûS1 , . . . , ûSD )0 , where Σ̂u is the square root of
the generalized inverse of Σ̂u obtained by the spectral decomposition. It
is convenient to re-scale the elements ûSd so that they have sample mean
exactly equal to zero and sample variance Â. This is achieved by the
transformation

Â(ûSd − D−1 D S
P
SS `=1 û` )
ûd = q PD PD S 2 , d = 1, . . . , D.
−1 S −1
D d=1 (ûd − D `=1 û` )

Construct the vector u∗ = (u∗1 , . . . , u∗D )0 , whose elements are obtained by


extracting a simple random sample with replacement of size D from the set
∗ −1 ∗
{ûSS SS
1 , . . . , ûD }. Then obtain v = (I − ρ̂W) u and calculate the vector
of bootstrap target parameters δ ∗ = Xβ̂ + v∗ = (δ1∗ , . . . , δd∗ )0

3’) Compute the vector of residuals r̂ = y − Xβ̂ − v̂ = (r̂1 , . . . , r̂D )0 . Standard-


−1/2 S 0
ize these residuals as r̂S = Σ̂r r̂ = (r̂1S , . . . , r̂D ) , where Σ̂r = Ψ P(θ̂)Ψ
−1/2
is the estimated covariance matrix and Σ̂r is a square root of the gen-
eralized inverse derived from the spectral decomposition of Σ̂r . Again,
re-standardize these values

r̂dS − m−1 D S
P
SS `=1 r̂`
r̂d = q PD S 2 , d = 1, . . . , D.
D−1 D S
P −1
(r̂
d=1 d − D `=1 r̂` )

Construct r∗ = (r1∗ , . . . , rD
∗ 0
) by extracting a simple random sample with re-
placement of size D from the set {r̂1SS , . . . , r̂D
SS
}. Then take e∗ = (e∗1 , . . . , e∗D )0 ,
1/2
where e∗d = ψd rd∗ , d = 1, . . . , D.

The function npbmseSFH yields naive and bias-corrected nonparametric bootstrap


estimators msenaN P B {δ̃d (θ̂)} and msebcN P B {δ̃d (θ̂)} analogous to (44) and (45)
respectively.

11 Function eblupSTFH
Function eblupSTFH gives small area estimators of δd = hd (yd ), d = 1, . . . , D,
under an extension of the FH model that takes into account the spatial correlation
between neighbor areas and also incorporates historical data (Marhuenda, Molina
& Morales, 2013). The area parameter for domain d at current time instant T is
estimated borrowing strength from the T time instants and from the D domains.
The call to the function is

23
eblupSTFH(formula, D, T, vardir, proxmat, model = "ST",
MAXITER = 100, PRECISION = 0.0001, data)

Let θdt be the target area characteristic for area d and time instant t, for d =
DIR
1, . . . , D and t = 1, . . . , T . Let δ̂dt be a direct estimator of δdt (left hand
side of formula) and xdt a column vector containing the aggregated values of p
auxiliary variables related linearly with δdt (right hand side of formula). The
spatio-temporal FH (STFH) model is stated as follows. In the first stage, we
assume
DIR
δ̂dt = δdt + edt , d = 1, . . . , D, t = 1, . . . , T, (46)
where, given δdt , sampling errors edt are assumed to be independent and normally
distributed with variances ψdt known for all d and t (vardir). In the second
stage, the target parameters for all domains and time points are linked through
the model

δdt = x0dt β + u1d + u2dt , d = 1, . . . , D, t = 1, . . . , T. (47)

Here, the vectors of area-time random effects (u2d1 , . . . , u2dT )0 are i.i.d. for each
area d, following an AR(1) process with autocorrelation parameter ρ2 , that is,
iid
u2dt = ρ2 u2d,t−1 + 2dt , |ρ2 | < 1, 2dt ∼ N (0, σ22 ). (48)

The vector of area effects (u11 , . . . , u1D )0 follows a SAR(1) process with variance
parameter σ12 , spatial autocorrelation ρ1 and row-standardized proximity matrix
W = (wd,` ) defined as in Section 7 (proxmat), that is,
iid
X
u1d = ρ1 wd,` u1` + 1d , |ρ1 | < 1, 1d ∼ N (0, σ12 ), d = 1, . . . , D. (49)
`6=d

Let us define the following vectors and matrices obtained by stacking the
elements of the model in columns
DIR
y = col ( col (δ̂dt )), X = col ( col (x0dt )),
1≤d≤D 1≤t≤T 1≤d≤D 1≤t≤T
e = col ( col (edt )), u1 = col (u1d ) and u2 = col ( col (u2dt ).
1≤d≤D 1≤t≤T 1≤d≤D 1≤d≤D 1≤t≤T
N
Defining additionally Z1 = ID T where ID is the D × D identity matrix, 1T
1N
is a vector of ones of size T and is the Kronecker product, Z2 = In , where
n = DT is the total number of observations, u = (u01 , u02 )0 and Z = (Z1 , Z2 ), the
model can be expressed as a general linear mixed model in the form

y = Xβ + Zu + e.

Let θ = (σ12 , ρ1 , σ22 , ρ2 )0 be the vector of unknown parameters involved in the


covariance matrix of y. Observe that here e ∼ N (0n , Ψ), where 0n denotes a vec-
tor of zeros of size n and Ψ is the diagonal matrix Ψ = diag1≤d≤D (diag1≤t≤T (ψdt )).

24
Moreover, u ∼ N {0n , G(θ)}, where the covariance matrix is the block diagonal
matrix G(θ) = diag{σ12 Ω1 (ρ1 ), σ22 Ω2 (ρ2 )}, with
−1
Ω1 (ρ1 ) = (ID − ρ1 W)0 (ID − ρ1 W)

, (50)
Ω2 (ρ2 ) = diag1≤d≤D {Ω2d (ρ2 )},
ρ2 . . . ρT2 −2 ρT2 −1
 
1
...
 ρ2 1 ρT2 −2
 

1  .  ... .. .. .. 
Ω2d (ρ2 ) = .. . . .  , d = 1, . . . , D. (51)
1 − ρ22  
 T −2 . .

 ρ2 . 1 ρ2 
T −1 T −2
ρ2 ρ2 . . . ρ2 1 T ×T

Thus, the covariance matrix of y is given by

Σ(θ) = ZG(θ)Z0 + Ψ.

The WLS estimator of β and the (componentwise) BLUP of u obtained by


Henderson (1975) are given by
−1
β̃(θ) = X0 Σ−1 (θ)X X0 Σ−1 (θ)y,


ũ(θ) = G(θ)Z0 Σ−1 (θ){y − Xβ̃(θ)}. (52)

Since u = (u01 , u02 )0 , the second identity leads to the BLUPs of u1 and u2 , respec-
tively given by

ũ1 (θ) = σ12 Ω1 (ρ1 )Z01 Σ−1 (θ){y − Xβ̃(θ)},


ũ2 (θ) = σ22 Ω2 (ρ2 )Σ−1 (θ){y − Xβ̃(θ)}.

Replacing an estimator θ̂ for θ in previous formulas we obtain β̂ = β̃(θ̂) and


the EBLUPs of u1 and u2 respectively,

û1 = ũ1 (θ̂) = (û11 , . . . , û1D )0 and û2 = ũ2 (θ̂) = (û211 , . . . , û2DT )0 .

Finally, the EBLUP of the area characteristic δdt under the STFH model
(46)–(49) returned by function eblupSTFH is given by

δ̂dt = x0dt β̂ + û1d + û2dt , d = 1, . . . , D, t = 1, . . . , T.

The following subsection describes the REML model fitting procedure applied
by function eblupSTFH to estimate θ and β.

Remark 1. Computation of the inverse of the n × n matrix Σ(θ) involved in


(52) can be too time consuming for large n. This is replaced by the inversion of
two smaller matrices as follows. Observe that Σ(θ) can be expressed as

Σ(θ) = σ12 Z1 Ω1 (ρ1 )Z01 + Γ(θ),

25
where Γ(θ) = diag1≤d≤D {Γd (θ)} and Γd (θ) = σ22 Ω2d (ρ2 ) + diag1≤t≤T (ψdt ), d =
1, . . . , D. Applying the inversion formula

(A + CBD)−1 = A−1 − A−1 C(B −1 + DA−1 C)−1 DA−1 (53)

with A = Γ(θ), B = σ12 Ω1 (ρ1 ), C = Z1 and D = Z01 , we obtain


−1 0 −1
Σ−1 (θ) = Γ−1 (θ) − Γ−1 (θ)Z1 σ1−2 Ω−1 0 −1

1 (ρ1 ) + Z1 Γ (θ)Z1 Z1 Γ (θ),

where Γ−1 (θ) = diag1≤d≤D {Γ−1 d (θ)}. Here, Γd (θ) is inverted using again (53).
This procedure only requires inversion of the T × T matrix Ω2d (ρ2 ) given in (51),
which is constant for all d, and the D × D matrix Ω1 (ρ1 ) given in (50).

11.1 REML fitting method


REML fitting method maximizes the restricted likelihood, which is the joint p.d.f.
of a vector of n − p linearly independent contrasts F0 y, where F is an n × (n − p)
full column rank matrix satisfying F0 F = In−p and F0 X = 0n−p . It holds that
F0 y is independent of β̂ given in (52). Consequently, the p.d.f. of F0 y does not
depend on β and is given by
 
−(n−p)/2 0 1/2 −1/2 0 −1 −1/2 1 0
fR (θ; y) = (2π) |X X| |Σ(θ)| |X Σ (θ)X| exp − y P(θ)y ,
2
where
−1
P(θ) = Σ−1 (θ) − Σ−1 (θ)X X0 Σ−1 (θ)X X0 Σ−1 (θ).


Observe that P(θ) satisfies P(θ)Σ(θ)P(θ) = P(θ) and P(θ)X = 0n .


The REML estimator of θ = (θ1 , . . . , θ4 )0 = (σ12 , ρ1 , σ22 , ρ2 )0 is the maximizer
of `R (θ; y) = log fR (θ; y). This maximum is computed using the Fisher-scoring
algorithm. Let SR (θ) = ∂`R (θ; y)/∂θ = (S1R (θ), . . . , S4R (θ))0 be the scores vector
and IR (θ) = −E{∂ 2 `R (θ; y)/∂θ∂θ 0 } = (Irs R
(θ)) the Fisher information matrix
associated with θ. Using the fact that
∂P(θ) ∂Σ(θ)
= −P(θ) P(θ), r = 1, . . . , 4,
∂θr ∂θr
the first order partial derivative of `R (θ; y) with respect to θr is
 
1 ∂Σ(θ) 1 ∂Σ(θ)
R
Sr (θ) = − tr P(θ) + y0 P(θ) P(θ)y, r = 1, . . . , 4.
2 ∂θr 2 ∂θr

The element (r, s) of the Fisher information matrix is the expected value of the
negative second order partial derivative of `R (θ; y) with respect to θr and θs ,
which yields
 
R 1 ∂Σ(θ) ∂Σ(θ)
Irs (θ) = tr P(θ) P(θ) , r, s = 1, . . . , 4.
2 ∂θr ∂θs

26
Then, if θ (k) is the value of the estimator at iteration k, the updating formula of
the Fisher-scoring algorithm is given by

θ (k+1) = θ (k) + IR−1 (θ (k) )SR (θ (k) ).

Finally, the partial derivatives of Σ(θ) with respect to the components of θ,


involved in SR (θ) and IR (θ), are given by

∂Σ(θ) 0 ∂Σ(θ) ∂Ω−1 (ρ1 )


2
= Z1 Ω1 (ρ1 )Z1 , = −σ1 Z1 Ω1 (ρ1 ) 1
2
Ω1 (ρ1 )Z01 ,
∂σ1 ∂ρ1  ∂ρ1
∂Σ(θ) ∂Σ(θ) 2 ∂Ω2d (ρ2 )
= diag {Ω2d (ρ2 )} , = σ2 diag ,
∂σ22 1≤d≤D ∂ρ2 1≤d≤D ∂ρ2

where
∂Ω−1
1 (ρ1 )
= −W − W0 + 2ρ1 W0 W
∂ρ1
and
. . . . . . (T − 1)ρT2 −2
 
0 1
..
1 0 . (T − 2)ρT2 −3
 
 
∂Ω2d (ρ2 ) 1  .. .. .. .. ..  2ρ2 Ω2d (ρ2 )
= 
2  . . . . . + .
∂ρ2 1 − ρ2   1 − ρ22
 (T − 2)ρ2T −3 .. 
. 0 1 
(T − 1)ρT2 −2 ... ... 1 0

12 Function pbmseSTFH
Function pbmseSTFH gives parametric bootstrap MSE estimates for the EBLUPs
of the domain parameters under the STFH model (46)–(49) as in Marhuenda,
Molina & Morales (2013). The call to the function is
pbmseSTFH(formula, D, T, vardir, proxmat, B = 100, model = "ST",
MAXITER = 100, PRECISION = 0.0001, data)
where the arguments are the same as in eblupSTFH, together with the number of
bootstrap replicates B. The parametric bootstrap procedure is described below:
DIR
(1) Using the available data {(δ̂dt , xdt ), t = 1, . . . , T, d = 1, . . . , D}, fit the
STFH model (46)–(49) and obtain model parameter estimates β̂, σ̂12 , ρ̂1 ,
σ̂22 and ρ̂2 .
∗(b)
(2) Generate bootstrap area effects {u1d , d = 1, . . . , D}, from the SAR(1)
process given in (49), using (σ̂12 , ρ̂1 ) as true values of parameters (σ12 , ρ1 ).
∗(b)
(3) Independently of {u1d } and independently for each d, generate bootstrap
∗(b)
time effects {u2dt , t = 1, . . . , T }, from the AR(1) process given in (48),
with (σ̂22 , ρ̂2 ) acting as true values of parameters (σ22 , ρ2 ).

27
(4) Calculate true bootstrap quantities,
∗(b) ∗(b) ∗(b)
δdt = x0dt β̂ + u1d + u2dt , t = 1, . . . , T, d = 1, . . . , D.

∗(b) ind.
(5) Generate errors edt ∼ N (0, ψdt ) and obtain bootstrap data from the
sampling model,
DIR∗(b) ∗(b) ∗(b)
δ̂dt = δdt + edt , t = 1, . . . , T, d = 1, . . . , D.

DIR∗(b)
(6) Using the new bootstrap data {(δ̂dt , xdt ), t = 1, . . . , T, d = 1, . . . , D},
fit the STFH model (46)–(49) and obtain the bootstrap EBLUPs,
∗(b) ∗(b) ∗(b)
δ̂dt = x0dt β̂ ∗(b) + û1d + û2dt , t = 1, . . . , T, d = 1, . . . , D.

(7) Repeat steps (1)-(6) for b = 1, . . . , B, where B is a large number.


(8) The parametric bootstrap MSE estimates returned by function pbmseSTFH
are given by
B
1 X  ∗(b) ∗(b)
2
mse(δ̂dt ) = δ̂dt − δdt , t = 1, . . . , T, d = 1, . . . , D. (54)
B b=1

13 Function eblupBHF
Function eblupBHF estimates the area means Ȳd , d = 1, . . . , D, under the unit
level model introduced by Battese, Harter & Fuller (1988) (BHF model). The
call to the function is
eblupBHF(formula, dom, selectdom, meanxpop, popnsize,
method = "REML", data)
The function allows to select a subset of domains for estimation through the
argument selectdom, but dropping this argument it estimates in all domains.
Let Ydj be the value of the target variable for unit j in domain d (left hand side
of formula). The BHF model assumes

Ydj = x0dj β + ud + edj , j = 1, . . . , Nd , d = 1, . . . , D,


iid iid
ud ∼ N (0, σu2 ), edj ∼ N (0, σe2 ), (55)

where xdj is a vector containing the values of p explanatory variables for the
same unit (right hand side of formula), ud is the area random effect and edj is
the individual error, where area effects ud and errors edj are independent. Let
us define vectors and matrices obtained by stacking in columns the elements for
domain d

yd = col (Ydj ), Xd = col (xdj ), ed = col (edj ).


1≤j≤Nd 1≤j≤Nd 1≤j≤Nd

28
Then, the domain vectors yd are independent and follow the model

yd = Xd β + ud 1Nd + ed , ed ∼ ind N (0, σe2 INd ), d = 1, . . . , D,

where ud is independent of ed . Under this model, the mean vector and the
covariance matrix of yd are given by

µd = Xd β and Vd = σu2 1Nd 10Nd + σe2 INd .

Consider the decomposition of yd into sample and out-of-sample elements


0 0 0
yd = (ydr , yds ) , and the corresponding decomposition of Xd and Vd as
   
Xds Vds Vdsr
Xd = , Vd = .
Xdr Vdrs Vdr

If σu2 and σe2 are known, the BLUP of the small area mean Ȳd is given by
!
1
Ȳ˜d =
X X
Ydj + Ỹdj , (56)
Nd j∈s j∈rd d

where Ỹdj = x0dj β̃ + ũd is the BLUP of Ydj . Here, β̃ is the WLS estimator of β
and ũd is the BLUP of ud , given respectively by
D
!−1 D
X X
−1 0 −1
β̃ = Xd Vds Xd Xd Vds yd , (57)
d=1 d=1

ũd = γd (ȳds − x̄0ds β̃), (58)

where ȳds = n−1 −1 2 2 2


P P
d j∈sd Ydj , x̄ds = nd j∈sd xdj and γd = σu /(σu + σe /nd ),
d = 1, . . . , D.
Let σ̂u2 and σ̂e2 be consistent estimators of σu2 and σe2 respectively, such as
those obtained by ML or REML. The EBLUP is
!
1
Ȳˆd =
X X
Ydj + Ŷdj , (59)
Nd j∈s j∈r
d d

where Ŷdj = x0dj β̂ + ûd is the EBLUP of Ydj , β̂ and ûd are given respectively by

D
!−1 D
X X
−1 0 −1
β̂ = Xd V̂ds Xd Xd V̂ds yd (60)
d=1 d=1

ûd = γ̂d (ȳds − x̄0ds β̂), (61)

with γ̂d = σ̂u2 /(σ̂u2 + σ̂e2 /nd ) and V̂ds = σ̂u2 1nd 10nd + σ̂e2 In , d = 1, . . . , D. Replacing
(60) and (61) in (59), we obtain the expression for the EBLUP of Ȳd returned by
function eblupBHF ,
0
Ȳˆd = fd ȳds + X̄d − fd x̄ds β̂ + (1 − fd )ûd ,

29
where fd = nd /Nd is the sampling fraction. Note that the EBLUP requires the
vector of population means of the auxiliary variables X̄d (meanxpop) and the
population sizes (popnsize) apart from the sample data (specified in formula),
but the individual values of the auxiliary variables for each population unit are
not needed.

14 Function pbmseBHF
Function pbmseBHF gives a parametric bootstrap MSE estimate for the EBLUP
under the BHF model (55). The call to the function is

pbmseBHF(formula, dom, selectdom, meanxpop, popnsize, B = 200,


method = "REML", data)

The function applies the parametric bootstrap procedure for finite populations
introduced by González-Manteiga et al. (2008a) particularized to the estimation
of means. The estimated MSEs are obtained as follows:
0 0
1) Fit the BHF model (55) to sample data ys = (y1s , . . . , yDs )0 and obtain
model parameter estimates β̂, σ̂u2 and σ̂e2 .
∗(b) iid
2) Generate bootstrap domain effects as ud ∼ N (0, σ̂u2 ), d = 1, . . . , D.
∗(b)
3) Generate, independently of the random effects ud , bootstrap errors for
∗(b) iid ∗(b) iid
sample elements edj ∼ N (0, σ̂e2 ), j ∈ sd , and error domain means Ēd ∼
N (0, σ̂e2 /Nd ), d = 1, . . . , D. ,

4) Compute the true domain means of this bootstrap population, given by


∗(b) ∗(b) ∗(b)
Ȳd = X̄0d β̂ + ud + Ēd , d = 1, . . . , D.
∗(b)
Observe that computation of Ȳd does not require the individual values
xdj , for each out-of-sample unit j ∈ rd .

5) Using the known sample vectors xdj , j ∈ sd , generate the model responses
for sample elements from the model
∗(b) ∗(b) ∗(b)
Ydj = x0dj β̂ + ud + edj , j ∈ sd , d = 1, . . . , D.
∗(b) ∗(b) ∗(b)
Let ys = ((y1s )0 , . . . , (yDs )0 )0 be the bootstrap sample data vector.
∗(b)
6) Fit the BHF model (55) to bootstrap data ys and obtain the bootstrap
EBLUPs Ȳˆd , d = 1, . . . , D.
∗(b)

30
∗(b)
7) Repeat steps 2)–7) for b = 1, . . . , B. Let Ȳd be the true mean and
ˆ ∗(b)
Ȳd the corresponding EBLUP of domain d for bootstrap replicate b. The
parametric bootstrap estimates of the MSEs of the EBLUPs Ȳˆd returned
by function pbmseBHF are given by
B
ˆ 1 X  ˆ ∗(b) ∗(b)
2
mse(Ȳd ) = Ȳd − Ȳd , d = 1, . . . , D. (62)
B b=1

15 Function ebBHF
Function ebBHF estimates non linear area parameters δd = hd (yd ), d = 1, . . . , D
under the BHF model (55), using the empirical best/Bayes (EB) method of
Molina & Rao (2010). The call to the function is

ebBHF(formula, dom, selectdom, Xnonsample, MC = 100, data,


transform = "BoxCox", lambda = 0, constant = 0, indicator)

where the function hd () is specified by the user (indicator). This function as-
sumes that model responses Ydj are obtained by a transformation of the values Edj
of a quantitative variable as Ydj = T (Edj ). The transformation T () (transform)
must be selected by the user between the Box-Cox family or the power family
of transformations, to achieve approximate normality of the Ydj values. Both
families contain two parameters, an additive constant m and a power λ. The
Box-Cox family is given by
 
(Edj + m)λ − 1 /λ, λ 6= 0;
T (Edj ) =
log(Edj + m), λ = 0,

and the power family is



(Edj + m)λ , λ 6= 0;
T (Edj ) =
log(Edj + m), λ = 0.

The parameters m (constant) and λ (lambda) must be specified by the user.


Note that setting m = 0 and λ = 1 means no transformation. Function ebBHF
assumes that the transformed variables Ydj = T (Edj ) follow the BHF model (55).
0 0 0
Let yd = (yds , ydr ) be the vector containing the values of the transformed
variables Ydj for the sample and out-of-sample units within domain d. The best
predictor of δd = hd (yd ) is given by
Z
δ̃d = Eydr [hd (yd )|yds ] = hd (yd )f (ydr |yds ) dydr , (63)

where f (ydr |yds ) is the joint density of ydr given the observed data vector yds .
The expectation in (63) is approximated by Monte Carlo. For this, function

31
(`)
ebBHF generates L replicates {ydr ; ` = 1, . . . , L} of ydr from the estimated con-
ditional distribution of ydr |yds , where L can be specified by the user (MC). The
(`)
elements of ydr or non-sample values Ydj are generated from the estimated model
(`)
Ydj = x0dj β̂ + ûd + vd + εdi , (64)
vd ∼ N (0, σ̂u2 (1 − γ̂d )), εdj ∼ N (0, σ̂e2 ), j ∈ rd , d = 1, . . . , D, (65)

where β̂, σ̂u2 and σ̂e2 are the estimated model parameters. Attaching the sample
(`)
values yds to the generated out-of-sample vector ydr , full population vectors
(`) (`)
yd = ((ydr )0 , yds
0 0
) are obtained. Then, function ebBHF returns the Monte Carlo
approximation to the EB predictor of δd ,
L
1X (`)
δ̂d = hd (yd ). (66)
L `=1

Examples of non linear area parameters are the members of the FGT family
of poverty indicators defined by Foster, Greer & Thorbecke (1984), which for
domain d are given by
Nd  α
1 X z − Edj
Fαd = I(Edj < z), α ≥ 0, (67)
Nd j=1 z

where Edj is in this case a welfare measure such as income or expenditure, z is the
poverty line defined for the population and I(condition) is the indicator function
with value 1 when condition is true and 0 otherwise. If a transformation T () is
specified through the arguments transform, lambda and constant, the function
ebBHF calculates the EB estimates (66) of the parameters
Nd  α
1 X z − T −1 (Ydj )
δd = hd (yd ) = I(T −1 (Ydj ) < z), d = 1, . . . , D.
Nd j=1 z

16 Function pbmseebBHF
Function pbmseEB gives parametric bootstrap MSE estimates for the EB estima-
tors (66) under the BHF model. The call to the function is

pbmseebBHF(formula, dom, selectdom, Xnonsample, B = 100, MC = 100,


data, transform = "BoxCox", lambda = 0, constant = 0, indicator)

where the arguments are as in ebBHF, together with the number of bootstrap
replicates B. The function uses the parametric bootstrap of González-Manteiga
et al. (2008a), which proceeds as follows:

1) Fit the BHF model (55), deriving estimates β̂, σ̂u2 and σ̂e2 .

32
2) Generate bootstrap domain effects as
∗(b) iid
ud ∼ N (0, σ̂u2 ), d = 1, . . . , D.

∗(b) ∗(b)
3) Generate, independently of u1 , . . . , uD , model errors
∗(b) iid
edj ∼ N (0, σ̂e2 ), j = 1, . . . , Nd , d = 1, . . . , D

4) Generate a bootstrap population of Ydj values from the model


∗(b) ∗(b) ∗(b)
Ydj = x0dj β̂ + ud + edj , j = 1, . . . , Nd , d = 1, . . . , D.

∗(b) ∗(b) ∗(b)


5) Let us define the area vector yd = (Yd1 , . . . , YdNd )0 . Calculate target
area quantities for the bootstrap population
∗(b) ∗(b)
δd = hd (yd ), d = 1, . . . , D.

∗(b)
6) For the original sample s = s1 ∪· · ·∪sD , let ys be the vector containing the
bootstrap observations whose indices are in the sample, that is, containing
∗(b)
Ydj , j ∈ sd , =
. 1, . . . , D. Fit again the BHF model (55) to bootstrap sample
∗(b) 2∗(b) 2∗(b)
data ys and obtain bootstrap estimates σ̂u , σ̂e and β̂ ∗(b) .
∗(b)
7) Using the bootstrap sample data ys , obtain the bootstrap EB estimators
∗(b)
δ̂d , d = 1, . . . , D, through the Monte Carlo approximation (66).
∗(b)
8) Repeat 2)–7) for b = 1, . . . , B, obtaining true value δd and EB estimate
∗(b)
δ̂d for each area d = 1, . . . , D and bootstrap sample b = 1, . . . , B.

9) The bootstrap MSE estimates returned by function pbmseEB are given by


B  2
∗(b) ∗(b)
X
−1
mseB (δ̂d ) = B δ̂d − δd , d = 1, . . . , D.
b=1

References
Anselin, L. (1988).Spatial Econometrics. Methods and Models. Boston: Kluwer
Academic Publishers.

Banerjee, S., Carlin, B. & Gelfand, A.(2004). Hierarchical Modeling and


Analysis for Spatial Data. New York: Chapman and Hall.

Battese, G. E., Harter, R. M. & Fuller, W. A. (1988). An Error-


Components Model for Prediction of County Crop Areas Using Survey and
Satellite Data. Journal of the American Statistical Association 83, 28–36.

33
Cressie, N. (1993). Statistics for Spatial Data. New York: John Wiley & Sons.

Datta, G. S. & Lahiri, P. (2000). A unified measure of uncertainty of es-


timated best linear unbiased predictors in small area estimation problems.
Statistica Sinica 10, 613–627.

Datta, G. S. & Rao, J. N. K. & Smith D. D.(2005). On measuring the


variability of small area estimators under a basic area level model. Biometrika
92, 183–196.

Drew, D., Singh, M.P. & Choudhry, G.H. (1982). Evaluation of small
area estimation techniques for the Canadian Labour Force Survey. Survey
Methodology 8, 17–47.

Fay, R. & Herriot, R. (1979). Estimates of income for small places: an


application of James–Stein procedures to census data. Journal of the American
Statistical Association 74, 269–277.

Foster, J., Greer, J. & Thorbecke, E. (1984). A class of decomposable


poverty measures. Econometrica 52, 761–766.

González-Manteiga, W., Lombardı́a, M. J., Molina, I., Morales, D.


& Santamarı́a, L. (2008a). Bootstrap mean squared error of a small-area
EBLUP. Journal of Statistical Computation and Simulation 78, 443–462.

González-Manteiga, W., Lombardı́a, M., Molina, I., Morales, D. &


Santamarı́a, L. (2008b). Analytic and bootstrap approximations of predic-
tion errors under a multivariate Fay–Herriot model. Computational Statistics
and Data Analysis, 52, 5242–5252.

Henderson, C.R. (1975). Best linear unbiased estimation and prediction under
a selection model. Biometrics 31, 423-447.

Jiang, J. (1996). REML estimation: asymptotic behavior and related topics.


Annals of Statistics 24, 255-286.

Marhuenda, Y., Molina, I. & Morales, D. (2013). Small area estimation


with spatio-temporal Fay-Herriot models. Computational Statistics and Data
Analysis 58, 308-325.

Molina, I., Salvati, N. & Pratesi, M. (2009). Bootstrap for estimating the
MSE of the Spatial EBLUP. Computational Statistics 24, 441-458.

Molina, I. & Rao, J.N.K. (2010). Small area estimation of poverty indicators.
The Canadian Journal of Statistics 38, 369-385.

Prasad, N. & Rao, J.N.K. (1990). The estimation of the mean squared error
of small-area estimators. Journal of the American Statistical Association 85,
163–171.

34
Petrucci, A. & Salvati, N. (2006). Small area estimation for spatial correla-
tion in watershed erosion assessment. Journal of Agricultural, Biological and
Environmental Statistics 11, 169–182.

Singh, B., Shukla, G. & Kundu, D.(2005). Spatio-temporal models in small


area estimation. Survey Methodology 31, 183–195.

35

You might also like