Description Usage Arguments Details Value Author(s) References See Also Examples
Calculates nonparametric bootstrap mean squared error estimates of the spatial EBLUPs obtained by fitting a spatial Fay-Herriot model, in which area effects follow a Simultaneously Autorregressive (SAR) process.
1 2 |
formula |
an object of class |
vardir |
vector containing the |
proxmat |
|
B |
number of bootstrap replicates. Default value is |
method |
type of fitting method. Currently only |
MAXITER |
maximum number of iterations allowed for the Fisher-scoring algorithm. Default value is |
PRECISION |
convergence tolerance limit for the Fisher-scoring algorithm. Default value is |
data |
optional data frame containing the variables named in |
This function uses random number generation. To fix the seed, use set.seed
.
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 terms specification of the form first + second indicates all the terms in first together with all the terms in second with any 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.
The function returns a list with the following objects:
est |
a list with the results of the estimation process: |
mse |
data frame containing the naive nonparametric bootstrap mean squared error estimates of the spatial EBLUPs ( |
In case that formula
, vardir
or proxmat
contain NA values a message is printed and no action is done.
Isabel Molina, Monica Pratesi and Nicola Salvati.
- Small Area Methods for Poverty and Living Conditions Estimates (SAMPLE), funded by European Commission, Collaborative Project 217565, Call identifier FP7-SSH-2007-1.
- Molina, I., Salvati, N. and Pratesi, M. (2009). Bootstrap for estimating the MSE of the Spatial EBLUP. Computational Statistics 24, 441-458.
1 2 3 4 5 6 7 8 | data(grapes) # Load data set
data(grapesprox) # Load proximity matrix
# Obtain the naive and bias-corrected non parametric bootstrap MSE
# estimates using REML
set.seed(123)
result <- npbmseSFH(grapehect ~ area + workdays - 1, var, grapesprox, B=2, data=grapes)
result
|
Loading required package: MASS
Loading required package: lme4
Loading required package: Matrix
Bootstrap procedure with B = 2 iterations starts.
b = 1
b = 2
$est
$est$eblup
[,1]
1 31.2473574
2 71.7091179
3 73.8818783
4 62.3119391
5 39.5331862
6 78.5372343
7 50.1179508
8 41.2215285
9 109.4147029
10 10.2332370
11 80.0601239
12 78.4564549
13 60.5230608
14 52.7016378
15 59.4096364
16 69.0928112
17 103.0588057
18 43.0519058
19 34.9766345
20 73.0541907
21 71.6304269
22 84.3444241
23 59.9903091
24 66.7118986
25 70.9238814
26 58.7022975
27 75.1170882
28 15.8075814
29 2.0184115
30 130.1856472
31 36.2229314
32 22.4439174
33 15.5070131
34 63.6980686
35 60.9591184
36 90.2772340
37 54.2759008
38 41.7050918
39 83.2384378
40 58.7763103
41 0.6296496
42 98.3732451
43 76.5099460
44 38.8980894
45 17.1595737
46 138.7936677
47 48.4546593
48 52.3064698
49 28.7510665
50 77.6802874
51 64.1364943
52 38.0073916
53 58.9717040
54 39.8908532
55 19.6398611
56 94.9963280
57 74.4423215
58 58.8579486
59 57.5260939
60 41.5551500
61 96.3268999
62 66.6611015
63 81.7867520
64 52.9305981
65 38.4023021
66 63.8288160
67 46.3570692
68 43.6399537
69 44.5249631
70 50.1819752
71 78.5692175
72 62.5305710
73 35.7362787
74 73.8062057
75 52.5933467
76 86.1573787
77 103.2219022
78 52.5712512
79 46.6804467
80 34.5747116
81 144.5602785
82 78.3065162
83 90.2131325
84 73.8694984
85 52.7152760
86 50.0417446
87 24.2862729
88 57.6560481
89 36.2432837
90 26.7900529
91 30.7297622
92 40.4096826
93 161.7055453
94 32.1926932
95 49.1407259
96 97.1633974
97 46.7796556
98 47.6425546
99 68.4741555
100 72.5824824
101 72.8469544
102 50.4263793
103 106.6669401
104 61.2470009
105 36.8935562
106 54.7449782
107 30.3188084
108 47.6734216
109 49.4521361
110 85.4316873
111 29.6023981
112 99.6132590
113 94.8995528
114 76.2335943
115 81.9153663
116 66.2122503
117 67.1170202
118 61.8854625
119 51.6299238
120 66.8980289
121 39.4326384
122 36.0839576
123 72.5438949
124 61.9240457
125 53.0018941
126 44.4072469
127 27.7115606
128 64.0778863
129 116.1888414
130 56.8317880
131 118.8112966
132 58.3909477
133 62.7837687
134 128.4414941
135 38.9784976
136 47.8681853
137 56.5552263
138 52.6330415
139 63.6887630
140 54.5192809
141 153.9813108
142 67.3042478
143 71.6443692
144 48.0480754
145 70.5613875
146 19.6409531
147 74.0130735
148 36.6854652
149 82.2199326
150 25.2402524
151 57.1759865
152 73.9204808
153 71.9698205
154 79.2150558
155 39.7829481
156 73.0716676
157 34.8621573
158 112.1769920
159 45.2198814
160 79.6475715
161 59.9084573
162 67.8699683
163 89.4026635
164 143.5744398
165 141.0363210
166 59.6556119
167 31.2103381
168 57.9933141
169 74.8360370
170 108.6727570
171 78.1318329
172 72.0583145
173 216.2827762
174 121.4483874
175 19.6583014
176 51.5111084
177 64.4297571
178 34.9282768
179 34.1413486
180 52.2789295
181 55.2791448
182 51.3956234
183 88.9436840
184 60.5301515
185 72.0956385
186 68.0334461
187 167.7150411
188 79.5236227
189 88.7663169
190 107.0139596
191 84.8582289
192 23.6324440
193 28.5023365
194 48.9339783
195 68.4684320
196 68.6961935
197 17.7674981
198 55.6132378
199 84.3077505
200 102.9240691
201 37.7408894
202 27.6968677
203 53.1509077
204 89.0877447
205 55.6892779
206 26.2918268
207 51.0226949
208 46.3019214
209 96.9827547
210 58.9711892
211 75.1042635
212 52.2981673
213 70.4331390
214 120.2950007
215 53.9998798
216 30.2496818
217 38.1692378
218 54.4569331
219 95.2668932
220 100.5901469
221 49.6676537
222 53.7248883
223 39.9167562
224 96.3776627
225 75.3164597
226 118.1879058
227 57.7844432
228 220.6942183
229 82.2507653
230 90.9046856
231 91.5620846
232 61.0939697
233 49.0669026
234 69.1646421
235 45.0162202
236 110.0200061
237 55.7036153
238 52.4814887
239 85.6748799
240 75.7926795
241 50.3440447
242 57.0144100
243 35.5475187
244 28.9814123
245 33.0722825
246 54.0833885
247 32.0369082
248 63.8488595
249 16.1143170
250 44.1173087
251 40.8426739
252 87.6827647
253 46.4316880
254 62.7415613
255 114.3592705
256 168.1576484
257 59.1927970
258 107.1126999
259 91.5921246
260 43.8730244
261 93.2190909
262 65.9403041
263 81.4435792
264 43.9471543
265 53.5850714
266 158.6539096
267 121.2368263
268 123.8153749
269 111.5639690
270 46.4971916
271 54.2536820
272 88.5520554
273 89.0878716
274 24.2952980
$est$fit
$est$fit$method
[1] "REML"
$est$fit$convergence
[1] TRUE
$est$fit$iterations
[1] 6
$est$fit$estcoef
beta std.error tvalue pvalue
Xarea -0.01236461 0.002071297 -5.969498 2.37984e-09
Xworkdays 0.49978791 0.012429599 40.209495 0.00000e+00
$est$fit$refvar
[1] 69.74899
$est$fit$spatialcorr
[1] 0.6142697
$est$fit$goodness
loglike AIC BIC
-1210.200 2428.401 2442.853
$mse
mse msebc
1 2.844238e+00 1.807201e+01
2 8.800699e+00 6.069726e+01
3 2.474689e+00 2.754275e+00
4 9.438131e+00 1.812360e+01
5 2.281206e+01 3.506248e+01
6 7.685988e-03 1.627209e-01
7 1.097733e+01 1.282820e+01
8 3.360854e+00 1.591006e+01
9 6.176639e+01 5.877915e+01
10 1.762970e-02 6.658914e-03
11 6.605941e+00 1.167246e+01
12 6.727606e-03 2.231945e-02
13 6.161220e+00 5.955939e+00
14 5.356085e+01 1.506960e+01
15 4.526996e-01 6.452923e+00
16 6.823213e+00 1.410135e+01
17 1.638396e+01 1.024351e+01
18 5.897747e+00 6.508188e+01
19 8.602682e-01 6.635427e+00
20 2.454415e+01 9.389101e+00
21 1.528276e-02 1.370361e-01
22 6.014655e+00 2.355674e+01
23 1.640543e+01 9.055060e+00
24 1.178919e+01 2.522913e+01
25 5.286386e-01 3.506217e+01
26 2.419695e+01 2.024772e+01
27 3.123807e+01 3.068998e+01
28 4.406146e-02 4.092485e-02
29 1.873665e-03 2.813572e-03
30 2.651187e+01 6.390556e+00
31 1.905714e+01 3.862499e+01
32 8.185089e-01 8.896927e+00
33 7.656899e+01 2.250584e+01
34 1.256392e+01 3.155140e+01
35 1.642581e+01 7.299335e+01
36 7.812320e+01 6.272354e+01
37 7.993465e+01 3.925356e+01
38 1.455731e+00 1.484915e+00
39 1.220283e+01 4.296947e+01
40 4.664761e+00 2.144000e+01
41 5.628490e-04 2.620461e-03
42 1.942804e+01 4.182098e+01
43 7.126419e+01 6.146300e+01
44 8.264587e+00 7.413805e+00
45 2.742931e+00 1.063957e+01
46 1.567247e+01 8.337179e+01
47 1.017787e+01 1.967813e+01
48 7.133694e+01 3.951692e+01
49 1.030236e+01 1.625637e+01
50 1.080590e+01 9.032307e+00
51 4.444627e+01 9.336274e+01
52 1.385056e-01 8.611019e-01
53 1.362405e+02 7.520027e+01
54 7.414340e+01 7.246528e+01
55 9.222917e-02 5.967715e-02
56 1.160430e+00 1.779371e+01
57 1.916001e+00 4.687253e+01
58 1.234595e+01 1.707042e+01
59 4.440458e+01 5.926912e+00
60 1.078267e+00 9.689663e-01
61 6.771573e-01 1.232341e+00
62 7.683710e+00 3.316174e+00
63 1.574994e+01 7.422946e+01
64 2.929495e+01 3.999337e+01
65 4.380462e-01 7.034512e+00
66 2.137397e+01 8.461126e+01
67 1.242887e+01 2.713075e+01
68 2.237057e+02 6.246472e+01
69 1.708187e+01 1.841394e+01
70 6.511511e+00 5.437092e+01
71 1.929726e+00 2.156752e+01
72 4.390391e+00 4.909459e+00
73 2.569953e+01 1.090671e+01
74 7.329543e+00 1.315167e+01
75 9.185835e+00 6.682365e+01
76 1.835839e+01 3.988252e+01
77 5.639893e+01 1.056353e+02
78 3.471939e+00 8.313701e-01
79 4.822350e+01 9.149723e+01
80 1.674400e+00 3.985192e+01
81 2.453428e+01 1.521076e+01
82 5.971237e-01 4.635193e+01
83 2.492398e+01 8.832011e+01
84 4.226109e+01 9.925547e+01
85 2.260911e+01 8.959254e+01
86 1.261184e+02 6.607128e+01
87 5.687925e+00 4.589815e+01
88 1.781234e-01 1.199047e+01
89 7.726696e-01 2.857526e-01
90 6.765903e-02 6.460250e-01
91 8.513618e+01 8.679383e+01
92 1.480656e+01 8.656880e+01
93 9.335327e+00 2.516102e+01
94 1.842290e+02 5.618518e+01
95 2.509903e+01 1.066297e+02
96 2.396146e+02 7.366126e+01
97 1.753762e+00 9.326167e+01
98 9.958243e+00 3.340365e+01
99 1.844023e+01 4.370840e+01
100 8.286587e+01 1.008155e+02
101 3.816230e+01 1.135130e+02
102 2.666282e+00 7.264786e+00
103 3.017338e+00 2.785707e+00
104 5.600334e+01 9.527796e+01
105 2.963183e+01 8.209910e+01
106 1.888929e+01 2.349849e+01
107 3.836853e+00 1.389562e+01
108 4.090990e+00 4.943079e+01
109 6.918774e+01 1.037099e+02
110 1.370244e+02 1.089537e+02
111 4.518399e+01 1.122759e+01
112 1.282532e+01 1.063033e+02
113 2.000290e-02 2.528132e-01
114 1.985213e+00 2.473018e+01
115 5.421406e+01 1.228083e+02
116 1.876273e+00 1.112362e+02
117 1.081383e+02 9.268128e+01
118 1.666866e+02 1.177563e+02
119 1.269281e+01 2.146168e+01
120 1.413861e+01 2.664806e+01
121 3.346471e+00 2.187876e+01
122 2.044116e+00 2.775334e+00
123 1.443961e+01 5.291424e+01
124 4.076156e+01 1.136877e+02
125 8.631867e+01 9.364169e+01
126 5.586544e+00 2.258486e+01
127 4.153962e+01 5.954150e+01
128 8.794299e+00 3.490433e+01
129 2.169999e+01 1.202234e+02
130 3.375661e+00 3.495355e+00
131 2.846367e+01 1.201911e+02
132 1.150049e+01 1.134231e+02
133 3.562210e+01 6.691224e+01
134 7.523274e+00 1.191118e+02
135 2.274927e+01 4.428869e+01
136 1.090605e+02 9.385948e+01
137 7.261194e+01 3.785423e+01
138 2.255961e+01 7.244402e+01
139 5.134763e+01 1.088007e+02
140 2.208877e+01 8.862506e+01
141 6.440607e+01 6.255063e+01
142 2.449735e+01 9.199012e+01
143 4.668287e+01 1.099780e+02
144 1.705455e+00 7.712671e+01
145 1.000542e+02 1.033565e+02
146 3.984902e+00 1.023679e+01
147 3.803170e+01 1.014204e+02
148 3.640148e+01 9.873622e+01
149 3.951261e+01 3.986529e+01
150 4.524620e+00 8.094953e+01
151 1.047833e+01 8.200769e+01
152 3.338688e+01 7.728065e+01
153 6.960629e+01 1.046910e+02
154 1.387164e+01 9.293096e+01
155 4.983955e+01 1.067162e+02
156 7.878486e+01 9.332569e+01
157 8.230213e+01 9.500421e+01
158 2.097617e+02 1.197650e+02
159 3.288551e+01 8.037833e+01
160 4.886174e+02 1.138699e+02
161 2.009535e+01 1.010686e+02
162 1.014398e+01 1.001565e+02
163 1.371024e+02 1.101065e+02
164 1.715191e+02 1.245973e+02
165 5.245282e+01 4.203068e+01
166 9.368296e+01 9.660520e+01
167 1.002593e+02 8.245034e+01
168 1.675785e+00 9.491759e+01
169 4.324119e+01 1.037578e+02
170 9.494099e+01 2.795544e+01
171 1.312745e+01 1.170367e+02
172 1.689534e+02 9.665428e+01
173 5.961278e+01 1.357960e+02
174 1.173439e+02 1.157999e+02
175 4.187409e+01 1.067192e+02
176 4.329595e+01 4.655017e+01
177 2.003554e+02 1.178367e+02
178 1.422334e+02 1.108815e+02
179 6.297065e+00 6.366563e+01
180 4.650046e+00 8.560110e+01
181 8.754703e+01 7.230136e+01
182 1.923976e+01 4.683058e+01
183 3.191497e+01 2.185364e+01
184 1.655131e+01 2.378066e+01
185 3.941782e+01 1.946291e+01
186 1.341291e+02 1.084094e+02
187 4.974861e+01 1.242895e+02
188 3.056247e+01 7.969594e+01
189 1.271724e+01 7.351013e+01
190 5.563915e+01 1.186961e+02
191 3.992556e+02 1.031952e+02
192 3.649901e+02 7.167827e+01
193 2.074578e+00 9.704195e+01
194 1.948569e+02 1.027817e+02
195 3.073214e+02 8.240134e+01
196 6.017191e+00 1.122915e+02
197 4.897455e+02 9.113382e+01
198 1.042830e+02 1.054219e+02
199 6.754067e+01 9.177453e+01
200 1.025618e+02 6.387538e+01
201 2.062701e+01 1.017571e+02
202 8.118874e+00 7.400454e+01
203 3.767399e+01 6.667168e+01
204 9.947957e+01 1.022335e+02
205 3.701973e-01 4.040454e+01
206 7.607157e+01 8.289840e+01
207 6.951148e+00 4.681793e+01
208 2.770910e+02 1.036154e+02
209 1.671790e+01 7.031797e+01
210 3.687087e+01 7.088021e+01
211 3.928451e+01 1.002834e+02
212 4.404038e+01 3.192711e+01
213 1.532869e+02 7.728656e+01
214 9.480547e+01 1.035902e+02
215 4.866695e+01 9.731365e+01
216 3.837845e+00 1.379907e+01
217 1.603071e+02 8.401553e+01
218 1.940686e+02 8.204736e+01
219 1.103791e+02 8.705914e+01
220 2.154147e+01 1.128965e+02
221 1.861443e-01 8.983751e-01
222 1.483038e+01 8.058742e+01
223 9.305056e-02 4.252516e+00
224 7.307422e+01 5.452116e+01
225 4.356412e+01 7.183890e+01
226 9.254653e+01 8.959995e+01
227 2.180211e+01 9.063692e+01
228 2.869768e+01 1.159177e+02
229 7.508227e+01 8.694538e+01
230 7.034346e+01 9.222587e+01
231 1.550219e+01 9.547445e+01
232 2.839995e+01 8.919922e+01
233 1.391411e+01 8.215737e+01
234 7.510585e+00 1.130359e+02
235 4.246832e+01 8.721148e+01
236 3.262099e+01 7.663753e+01
237 1.648175e+01 2.918480e+01
238 4.256748e+01 7.157838e+01
239 3.391757e+01 2.122222e+01
240 7.917061e-01 5.843838e+01
241 1.162235e+01 1.102576e+02
242 7.184492e-02 7.480708e+01
243 1.385129e+00 3.787028e+01
244 1.201057e+01 2.922489e+01
245 9.940636e+00 1.758418e+01
246 1.766695e+02 9.176761e+01
247 2.258749e+00 7.648793e+01
248 4.934740e+01 6.717024e+01
249 3.224925e+00 2.692114e+00
250 1.257372e+02 9.470325e+01
251 1.146453e+01 9.513691e+00
252 7.395359e+00 7.974851e+01
253 4.775407e-02 6.220270e-01
254 1.014996e+01 8.152800e+01
255 9.909320e-01 8.827454e+00
256 7.168054e+01 1.173648e+02
257 8.063912e+01 7.053317e+01
258 1.600090e+01 6.282916e+01
259 7.389092e+01 9.130526e+01
260 2.316570e+00 1.211530e+01
261 8.084814e+01 8.183284e+01
262 1.060750e+02 5.314631e+01
263 1.072955e+01 2.970787e+01
264 8.930232e+00 9.376231e+01
265 1.230129e+01 8.180402e+00
266 2.390635e+01 1.077076e+02
267 4.276344e+01 1.140934e+02
268 2.594037e+01 1.049751e+02
269 3.083763e+01 1.104526e+02
270 6.839496e+00 8.983408e+01
271 1.285533e+01 1.151219e+02
272 8.703782e+00 9.308393e+01
273 2.272167e-01 9.342947e+01
274 6.103082e+01 4.897062e+01
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.