1
2R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out"
3Copyright (C) 2020 The R Foundation for Statistical Computing
4Platform: x86_64-w64-mingw32/x64 (64-bit)
5
6R is free software and comes with ABSOLUTELY NO WARRANTY.
7You are welcome to redistribute it under certain conditions.
8Type 'license()' or 'licence()' for distribution details.
9
10R is a collaborative project with many contributors.
11Type 'contributors()' for more information and
12'citation()' on how to cite R or R packages in publications.
13
14Type 'demo()' for some demos, 'help()' for on-line help, or
15'help.start()' for an HTML browser interface to help.
16Type 'q()' to quit R.
17
18> library(plm)
19> data("Produc", package = "plm")
20> pProduc <- pdata.frame(Produc, index = c("state", "year", "region"))
21> form  <- log(gsp) ~ log(pc) + log(emp) + log(hwy) + log(water) + log(util) + unemp
22> summary(plm(form, data = pProduc, model = "random", effect = "nested"))
23Nested effects Random Effect Model
24   (Swamy-Arora's transformation)
25
26Call:
27plm(formula = form, data = pProduc, effect = "nested", model = "random")
28
29Balanced Panel: n = 48, T = 17, N = 816
30
31Effects:
32                   var  std.dev share
33idiosyncratic 0.001352 0.036765 0.191
34individual    0.004278 0.065410 0.604
35group         0.001455 0.038148 0.205
36theta:
37            Min.   1st Qu.     Median       Mean    3rd Qu.       Max.
38id    0.86492676 0.8649268 0.86492676 0.86492676 0.86492676 0.86492676
39group 0.03960556 0.0466931 0.05713605 0.05577645 0.06458029 0.06458029
40
41Residuals:
42     Min.   1st Qu.    Median      Mean   3rd Qu.      Max.
43-0.106171 -0.024805 -0.001816 -0.000054  0.019795  0.182810
44
45Coefficients:
46               Estimate  Std. Error z-value  Pr(>|z|)
47(Intercept)  2.08921088  0.14570204 14.3389 < 2.2e-16 ***
48log(pc)      0.27412419  0.02054440 13.3430 < 2.2e-16 ***
49log(emp)     0.73983766  0.02575046 28.7311 < 2.2e-16 ***
50log(hwy)     0.07273624  0.02202509  3.3024 0.0009585 ***
51log(water)   0.07645327  0.01385767  5.5170 3.448e-08 ***
52log(util)   -0.09437398  0.01677289 -5.6266 1.838e-08 ***
53unemp       -0.00616304  0.00090331 -6.8227 8.933e-12 ***
54---
55Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
56
57Total Sum of Squares:    43.035
58Residual Sum of Squares: 1.1245
59R-Squared:      0.97387
60Adj. R-Squared: 0.97368
61Chisq: 20213.5 on 6 DF, p-value: < 2.22e-16
62> summary(plm(form, data = pProduc, model = "random", effect = "nested", random.method = "walhus"))
63Nested effects Random Effect Model
64   (Wallace-Hussain's transformation)
65
66Call:
67plm(formula = form, data = pProduc, effect = "nested", model = "random",
68    random.method = "walhus")
69
70Balanced Panel: n = 48, T = 17, N = 816
71
72Effects:
73                   var  std.dev share
74idiosyncratic 0.001415 0.037617 0.163
75individual    0.004507 0.067131 0.520
76group         0.002744 0.052387 0.317
77theta:
78            Min.    1st Qu.     Median       Mean    3rd Qu.       Max.
79id    0.86533240 0.86533240 0.86533240 0.86533240 0.86533240 0.86533240
80group 0.05409908 0.06154491 0.07179372 0.07023704 0.07867007 0.07867007
81
82Residuals:
83     Min.   1st Qu.    Median      Mean   3rd Qu.      Max.
84-0.105014 -0.024736 -0.001879 -0.000056  0.019944  0.182082
85
86Coefficients:
87               Estimate  Std. Error z-value  Pr(>|z|)
88(Intercept)  2.08165186  0.15034855 13.8455 < 2.2e-16 ***
89log(pc)      0.27256322  0.02093384 13.0202 < 2.2e-16 ***
90log(emp)     0.74164483  0.02607167 28.4464 < 2.2e-16 ***
91log(hwy)     0.07493204  0.02234932  3.3528 0.0008001 ***
92log(water)   0.07639159  0.01386702  5.5089 3.611e-08 ***
93log(util)   -0.09523031  0.01677247 -5.6778 1.365e-08 ***
94unemp       -0.00614840  0.00090786 -6.7724 1.267e-11 ***
95---
96Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
97
98Total Sum of Squares:    40.423
99Residual Sum of Squares: 1.1195
100R-Squared:      0.97231
101Adj. R-Squared: 0.9721
102Chisq: 19579.7 on 6 DF, p-value: < 2.22e-16
103> summary(plm(form, data = pProduc, model = "random", effect = "nested", random.method = "amemiya"))
104Nested effects Random Effect Model
105   (Amemiya's transformation)
106
107Call:
108plm(formula = form, data = pProduc, effect = "nested", model = "random",
109    random.method = "amemiya")
110
111Balanced Panel: n = 48, T = 17, N = 816
112
113Effects:
114                   var  std.dev share
115idiosyncratic 0.001352 0.036765 0.130
116individual    0.006899 0.083058 0.662
117group         0.002170 0.046589 0.208
118theta:
119            Min.    1st Qu.     Median       Mean    3rd Qu.       Max.
120id    0.89325689 0.89325689 0.89325689 0.89325689 0.89325689 0.89325689
121group 0.02996995 0.03548869 0.04369353 0.04264991 0.04959127 0.04959127
122
123Residuals:
124     Min.   1st Qu.    Median      Mean   3rd Qu.      Max.
125-0.104625 -0.024323 -0.002264 -0.000038  0.019351  0.178975
126
127Coefficients:
128               Estimate  Std. Error z-value  Pr(>|z|)
129(Intercept)  2.13133109  0.16013819 13.3093 < 2.2e-16 ***
130log(pc)      0.26447567  0.02176030 12.1540 < 2.2e-16 ***
131log(emp)     0.75811017  0.02660794 28.4919 < 2.2e-16 ***
132log(hwy)     0.07211418  0.02362627  3.0523  0.002271 **
133log(water)   0.07616495  0.01401879  5.4331 5.539e-08 ***
134log(util)   -0.10150953  0.01705158 -5.9531 2.631e-09 ***
135unemp       -0.00583842  0.00091107 -6.4083 1.471e-10 ***
136---
137Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
138
139Total Sum of Squares:    34.089
140Residual Sum of Squares: 1.0911
141R-Squared:      0.96799
142Adj. R-Squared: 0.96776
143Chisq: 18055 on 6 DF, p-value: < 2.22e-16
144>
145> pProduc_unbal <- pProduc[-c(2, 20:45, 75, 83:85, 500:510, 632:688, 700, 750), ]
146> summary(plm(form, data = pProduc_unbal, model = "random", effect = "nested"))
147Nested effects Random Effect Model
148   (Swamy-Arora's transformation)
149
150Call:
151plm(formula = form, data = pProduc_unbal, effect = "nested",
152    model = "random")
153
154Unbalanced Panel: n = 46, T = 2-17, N = 715
155
156Effects:
157                   var  std.dev share
158idiosyncratic 0.001419 0.037675 0.168
159individual    0.004411 0.066412 0.522
160group         0.002621 0.051199 0.310
161theta:
162           Min.    1st Qu.     Median       Mean   3rd Qu.      Max.
163id    0.6276977 0.86369441 0.86369441 0.85962816 0.8636944 0.8636944
164group 0.0541083 0.06164602 0.06742969 0.07072604 0.0758478 0.2904928
165
166Residuals:
167     Min.   1st Qu.    Median      Mean   3rd Qu.      Max.
168-0.106934 -0.024858 -0.002859 -0.000148  0.019879  0.181828
169
170Coefficients:
171              Estimate Std. Error z-value  Pr(>|z|)
172(Intercept)  2.0321973  0.1577280 12.8842 < 2.2e-16 ***
173log(pc)      0.2853607  0.0228505 12.4881 < 2.2e-16 ***
174log(emp)     0.7218179  0.0286988 25.1515 < 2.2e-16 ***
175log(hwy)     0.0767983  0.0237052  3.2397  0.001196 **
176log(water)   0.0757904  0.0164164  4.6168 3.898e-06 ***
177log(util)   -0.0899237  0.0182257 -4.9339 8.061e-07 ***
178unemp       -0.0070859  0.0010199 -6.9474 3.721e-12 ***
179---
180Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
181
182Total Sum of Squares:    33.485
183Residual Sum of Squares: 1.0325
184R-Squared:      0.96917
185Adj. R-Squared: 0.96891
186Chisq: 16047.9 on 6 DF, p-value: < 2.22e-16
187> summary(plm(form, data = pProduc_unbal, model = "random", effect = "nested", random.method = "walhus"))
188Nested effects Random Effect Model
189   (Wallace-Hussain's transformation)
190
191Call:
192plm(formula = form, data = pProduc_unbal, effect = "nested",
193    model = "random", random.method = "walhus")
194
195Unbalanced Panel: n = 46, T = 2-17, N = 715
196
197Effects:
198                   var  std.dev share
199idiosyncratic 0.001507 0.038816 0.169
200individual    0.004534 0.067336 0.508
201group         0.002881 0.053677 0.323
202theta:
203            Min.   1st Qu.     Median       Mean    3rd Qu.      Max.
204id    0.62253879 0.8615362 0.86153617 0.85741272 0.86153617 0.8615362
205group 0.05672819 0.0643782 0.07021705 0.07356107 0.07867239 0.2969478
206
207Residuals:
208     Min.   1st Qu.    Median      Mean   3rd Qu.      Max.
209-0.107045 -0.024879 -0.002859 -0.000151  0.019814  0.181937
210
211Coefficients:
212              Estimate Std. Error z-value  Pr(>|z|)
213(Intercept)  2.0281839  0.1571527 12.9058 < 2.2e-16 ***
214log(pc)      0.2858283  0.0228012 12.5357 < 2.2e-16 ***
215log(emp)     0.7206212  0.0286704 25.1347 < 2.2e-16 ***
216log(hwy)     0.0770974  0.0236227  3.2637    0.0011 **
217log(water)   0.0758658  0.0164032  4.6251 3.745e-06 ***
218log(util)   -0.0894263  0.0182002 -4.9135 8.947e-07 ***
219unemp       -0.0071093  0.0010199 -6.9702 3.164e-12 ***
220---
221Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
222
223Total Sum of Squares:    33.762
224Residual Sum of Squares: 1.0348
225R-Squared:      0.96936
226Adj. R-Squared: 0.9691
227Chisq: 16143.7 on 6 DF, p-value: < 2.22e-16
228> summary(plm(form, data = pProduc_unbal, model = "random", effect = "nested", random.method = "amemiya"))
229Nested effects Random Effect Model
230   (Amemiya's transformation)
231
232Call:
233plm(formula = form, data = pProduc_unbal, effect = "nested",
234    model = "random", random.method = "amemiya")
235
236Unbalanced Panel: n = 46, T = 2-17, N = 715
237
238Effects:
239                   var  std.dev share
240idiosyncratic 0.001419 0.037675 0.139
241individual    0.006713 0.081933 0.659
242group         0.002056 0.045342 0.202
243theta:
244            Min.    1st Qu.     Median       Mean    3rd Qu.      Max.
245id    0.69078564 0.88916192 0.88916192 0.88579289 0.88916192 0.8891619
246group 0.03058569 0.03628007 0.04091226 0.04361291 0.04806296 0.2186737
247
248Residuals:
249     Min.   1st Qu.    Median      Mean   3rd Qu.      Max.
250-0.105106 -0.024277 -0.002881 -0.000097  0.019620  0.179820
251
252Coefficients:
253              Estimate Std. Error z-value  Pr(>|z|)
254(Intercept)  2.0757687  0.1665550 12.4630 < 2.2e-16 ***
255log(pc)      0.2794706  0.0236526 11.8157 < 2.2e-16 ***
256log(emp)     0.7358457  0.0291822 25.2156 < 2.2e-16 ***
257log(hwy)     0.0739908  0.0248387  2.9789  0.002893 **
258log(water)   0.0749155  0.0165758  4.5196 6.196e-06 ***
259log(util)   -0.0956244  0.0185165 -5.1643 2.413e-07 ***
260unemp       -0.0068164  0.0010224 -6.6674 2.604e-11 ***
261---
262Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
263
264Total Sum of Squares:    28.79
265Residual Sum of Squares: 1.0065
266R-Squared:      0.96504
267Adj. R-Squared: 0.96475
268Chisq: 14790.8 on 6 DF, p-value: < 2.22e-16
269>
270> proc.time()
271   user  system elapsed
272   1.23    0.26    1.39
273