mseFH: Mean squared error estimator of the EBLUP under a Fay-Herriot...

Description Usage Arguments Details Value References See Also Examples

View source: R/mseFH.R

Description

Calculates the mean squared error estimator of the EBLUP under a Fay-Herriot model. The EBLUP might have been obtained by either ML, REML or by FH fitting methods.

Usage

1
2
mseFH(formula, vardir, method = "REML", MAXITER = 100, PRECISION = 0.0001, B = 0, 
      data)

Arguments

formula

an object of class formula (or one that can be coerced to that class): a symbolic description of the model to be fitted. The variables included in formula must have a length equal to the number of domains D. Details of model specification are given under Details.

vardir

vector containing the D sampling variances of direct estimators for each domain. The values must be sorted as the variables in formula.

method

method used to fit the Fay-Herriot model, which can be either "ML", "REML" or "FH" methods. Default is "REML" method.

MAXITER

maximum number of iterations allowed in the Fisher-scoring algorithm. Default is 100 iterations.

PRECISION

convergence tolerance limit for the Fisher-scoring algorithm. Default value is 0.0001.

B

number of bootstrap replicates to calculate the goodness-of-fit measures proposed by Marhuenda et al. (2014). Default value is 0 indicating that these measures are not calculated.

data

optional data frame containing the variables named in formula and vardir. By default the variables are taken from the environment from which mseFH is called.

Details

A typical model has the form response ~ terms where response is the (numeric) response vector and terms is a series of terms which specifies a linear predictor for response. A terms specification of the form first + second indicates all the terms in first together with all the terms in second with duplicates removed.

A formula has an implied intercept term. To remove this use either y ~ x - 1 or y ~ 0 + x. See formula for more details of allowed formulae

Value

The function returns a list with the following objects:

est

a list with the results of the estimation process: eblup and fit. For the description of these objects, see Value of eblupFH function.

mse

a vector with the estimated mean squared errors of the EBLUPs for the small domains.

In case that formula or vardir contain NA values a message is printed and no action is done.

References

- Datta, G.S. and Lahiri, P. (2000). A unified measure of uncertainty of estimated best linear unbiased predictors in small area estimation problems. Statistica Sinica 10, 613-627.

- Datta, G.S., Rao, J.N.K. and Smith D.D. (2005). On measuring the variability of small area estimators under a basic area level model. Biometrika 92, 183-196.

- Fay, R.E. and Herriot, R.A. (1979). Estimation of income from small places: An application of James-Stein procedures to census data. Journal of the American Statistical Association 74, 269-277.

- Jiang, J. (1996). REML estimation: asymptotic behavior and related topics. Annals of Statistics 24, 255-286.

- Marhuenda, Y., Morales, D. and Pardo, M.C. (2014). Information criteria for Fay-Herriot model selection. Computational Statistics and Data Analysis 70, 268-280.

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

See Also

eblupFH

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# Load data set  
data(milk)   
attach(milk)

# Fit Fay-Herriot model using ML method with indicators 
# of 4 Major Areas as explanatory variables and compute
# estimated MSEs of EB estimators
resultML <- mseFH(yi ~ as.factor(MajorArea), SD^2, method="ML")
resultML

# Fit Fay-Herriot model using REML method and compute 
# estimated MSEs of EB estimators
resultREML <- mseFH(yi ~ as.factor(MajorArea), SD^2)
resultREML

# Fit Fay-Herriot model using FH method and compute 
# estimated MSEs of EB estimators
resultFH <- mseFH(yi ~ as.factor(MajorArea), SD^2, method="FH")
resultFH

detach(milk)

Example output

Loading required package: nlme
Loading required package: MASS
$est
$est$eblup
        [,1]
1  1.0161733
2  1.0436968
3  1.0628168
4  0.7753489
5  0.8554903
6  0.9735857
7  1.0474786
8  1.0953436
9  1.2054092
10 1.1812565
11 0.8033701
12 1.1967756
13 1.1961592
14 0.9914053
15 1.1868829
16 1.1590363
17 1.2232369
18 1.2755188
19 1.2322850
20 1.2304422
21 1.0985768
22 1.1921598
23 1.1279920
24 1.2196285
25 1.1936256
26 0.7590651
27 0.7611232
28 0.7315647
29 0.7662730
30 0.6191454
31 0.7629389
32 0.7863747
33 0.7679782
34 0.6141348
35 0.7013109
36 0.7557564
37 0.5406643
38 0.7411316
39 0.7524506
40 0.7662423
41 0.7465360
42 0.7971405
43 0.6840976

$est$fit
$est$fit$method
[1] "ML"

$est$fit$convergence
[1] TRUE

$est$fit$iterations
[1] 4

$est$fit$estcoef
                             beta  std.error    tvalue       pvalue
X(Intercept)            0.9677986 0.06590747 14.684203 8.138516e-49
Xas.factor(MajorArea)2  0.1278756 0.09840939  1.299425 1.937982e-01
Xas.factor(MajorArea)3  0.2266909 0.08813973  2.571949 1.011278e-02
Xas.factor(MajorArea)4 -0.2425804 0.07753875 -3.128505 1.756978e-03

$est$fit$refvar
[1] 0.01551755

$est$fit$goodness
   loglike        AIC        BIC        KIC       AICc      AICb1      AICb2 
 12.771174 -15.542349  -6.736348 -10.542349         NA         NA         NA 
      KICc      KICb1      KICb2 nBootstrap 
        NA         NA         NA   0.000000 



$mse
 [1] 0.013579953 0.005512868 0.005850584 0.008735454 0.009774528 0.011840745
 [7] 0.015934511 0.010821811 0.014345961 0.015036089 0.007911095 0.016404523
[13] 0.012771021 0.012334611 0.012192499 0.011877067 0.011041285 0.013805155
[19] 0.011213853 0.013213712 0.010138289 0.017193729 0.011467631 0.013741841
[25] 0.008251436 0.009344874 0.009344874 0.016390149 0.007941642 0.006222263
[31] 0.015404327 0.014655741 0.009165440 0.003946977 0.007941642 0.009782385
[37] 0.006532467 0.010285994 0.007347143 0.008612538 0.005597690 0.009344874
[43] 0.010037140

$est
$est$eblup
        [,1]
1  1.0219703
2  1.0476018
3  1.0679513
4  0.7608170
5  0.8461574
6  0.9743727
7  1.0584523
8  1.0977762
9  1.2215449
10 1.1951455
11 0.7852155
12 1.2139456
13 1.2096593
14 0.9834967
15 1.1864247
16 1.1556982
17 1.2263411
18 1.2856486
19 1.2363247
20 1.2349600
21 1.0903019
22 1.1923057
23 1.1216470
24 1.2230296
25 1.1938054
26 0.7627195
27 0.7649550
28 0.7338443
29 0.7699294
30 0.6134418
31 0.7695558
32 0.7958250
33 0.7723187
34 0.6102302
35 0.7001782
36 0.7592787
37 0.5298867
38 0.7434466
39 0.7548996
40 0.7701918
41 0.7481164
42 0.8040773
43 0.6810870

$est$fit
$est$fit$method
[1] "REML"

$est$fit$convergence
[1] TRUE

$est$fit$iterations
[1] 4

$est$fit$estcoef
                             beta  std.error    tvalue       pvalue
X(Intercept)            0.9681890 0.06936208 13.958476 2.793443e-44
Xas.factor(MajorArea)2  0.1327801 0.10300072  1.289119 1.973569e-01
Xas.factor(MajorArea)3  0.2269462 0.09232981  2.457995 1.397151e-02
Xas.factor(MajorArea)4 -0.2413011 0.08161707 -2.956503 3.111496e-03

$est$fit$refvar
[1] 0.01855022

$est$fit$goodness
   loglike        AIC        BIC        KIC       AICc      AICb1      AICb2 
 12.677478 -15.354956  -6.548956 -10.354956         NA         NA         NA 
      KICc      KICb1      KICb2 nBootstrap 
        NA         NA         NA   0.000000 



$mse
 [1] 0.013460220 0.005372876 0.005701990 0.008541740 0.009579594 0.011670632
 [7] 0.015926137 0.010586518 0.014184043 0.014901472 0.007694262 0.016336469
[13] 0.012562726 0.012117378 0.012031229 0.011709147 0.010859780 0.013690860
[19] 0.011034674 0.013079686 0.009948636 0.017243977 0.011292325 0.013625297
[25] 0.008065787 0.009205133 0.009205133 0.016476912 0.007800626 0.006098668
[31] 0.015441564 0.014657866 0.009024699 0.003870786 0.007800626 0.009646139
[37] 0.006404335 0.010155645 0.007209937 0.008470277 0.005484860 0.009205133
[43] 0.009903626

$est
$est$eblup
        [,1]
1  1.0179759
2  1.0449639
3  1.0644808
4  0.7706920
5  0.8525124
6  0.9738262
7  1.0508569
8  1.0961652
9  1.2105053
10 1.1856404
11 0.7975687
12 1.2021499
13 1.2004587
14 0.9889713
15 1.1867450
16 1.1579920
17 1.2242232
18 1.2786804
19 1.2335659
20 1.2318601
21 1.0959551
22 1.1922126
23 1.1259973
24 1.2206948
25 1.1936875
26 0.7602435
27 0.7623581
28 0.7322880
29 0.7674591
30 0.6173102
31 0.7649969
32 0.7893148
33 0.7693760
34 0.6128615
35 0.7009616
36 0.7568908
37 0.5371932
38 0.7418816
39 0.7532513
40 0.7675187
41 0.7470595
42 0.7993630
43 0.6831609

$est$fit
$est$fit$method
[1] "FH"

$est$fit$convergence
[1] TRUE

$est$fit$iterations
[1] 3

$est$fit$estcoef
                             beta  std.error    tvalue       pvalue
X(Intercept)            0.9679012 0.06695896 14.455139 2.326581e-47
Xas.factor(MajorArea)2  0.1294502 0.09980334  1.297053 1.946131e-01
Xas.factor(MajorArea)3  0.2267910 0.08941191  2.536474 1.119750e-02
Xas.factor(MajorArea)4 -0.2421518 0.07877987 -3.073778 2.113670e-03

$est$fit$refvar
[1] 0.01642027

$est$fit$goodness
   loglike        AIC        BIC        KIC       AICc      AICb1      AICb2 
  12.76205  -15.52410   -6.71810  -10.52410         NA         NA         NA 
      KICc      KICb1      KICb2 nBootstrap 
        NA         NA         NA    0.00000 



$mse
 [1] 0.012757016 0.005314467 0.005632201 0.008323471 0.009283520 0.011178151
 [7] 0.014867662 0.010252709 0.013470878 0.014094867 0.007558331 0.015325274
[13] 0.012038944 0.011640323 0.011466958 0.011181888 0.010423673 0.012914353
[19] 0.010580561 0.012385544 0.009599980 0.015890240 0.010810966 0.012857861
[25] 0.007864537 0.008855177 0.008855177 0.015041526 0.007569376 0.005975211
[31] 0.014211800 0.013571949 0.008691547 0.003833361 0.007569376 0.009253153
[37] 0.006264329 0.009709450 0.007020470 0.008185874 0.005391055 0.008855177
[43] 0.009484220

sae documentation built on March 26, 2020, 7:52 p.m.