assignment 2 -- solution · 2021. 4. 13. · assignment 2 -- solution. econ6002 panel data and...

27
Assignment 2 -- Solution ECON6002 Panel Data and Spatial Econometrics, Term II 2020-21 Due date: Friday Week 6, February 19, 2021, 5:00pm. Submission: Email your completed assignments in one pdf file to: [email protected], with file name: YourName_A2.pdf; and email Subject: ECON6002 Assignment 2 1. Download the “Spanish Dairy Farm Production” data from the website: http://people.stern.nyu.edu/wgreene/Econometrics/PanelDataEconometrics.htm (a) Write a paragraph to introduce the data, including the variables names, number of cross- sectional units and time periods, purpose of study, etc. (b) Using the data, demonstrate the applications of the Stata command xtreg with options (be, fe, re, mle), in fitting the one-way effects panel model. Explain your results briefly. (c) Extend your analysis by including the time-specific effects to fit (i) two-way fixed effects model and (ii) a mixed model with individual random effects and time-fixed effects. Explain your results briefly. (d) Using the Stata command xtmixed, fit a two-way random effects model to the data. Explain your results. Solution: (a) Spanish Dairy Farm Production, N = 247, T = 6. Variables in the file are: FARM: Farm ID YEAR: year, 93, 94, ..., 98 Input variables: COWS: number of cows LAND: land size in hectares LABOR: number of works FEED: amount of food fed X1, X2, X3, X4: log of input variables, deviations from means (in logs) X11, X22, X33, X44: squares of X1, X2, X3, X4 X12, X13, X14, X23, X24, X34: cross product of X1, X2, X3, X4 YEAR93, . . . , YEAR98 = year dummy variables Output MILK = milk production each farm in each year YIT = log of MILK production Purpose of Study Identify factors determining the Spanish dairy farm production YIT, and specify a ‘good’ panel data model for predicting the milk production. (b) The between estimator (be) of the one-way effects model, the Model (2.1) in Chapter 2 of lecture notes, is obtained by first averaging Model (2.1) over t to give = + +( + ̅ ),

Upload: others

Post on 21-Jul-2021

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Assignment 2 -- Solution · 2021. 4. 13. · Assignment 2 -- Solution. ECON6002 Panel Data and Spatial Econometrics, Term II 2020-21 . Due date: Friday Week 6, February 19, 2021,

Assignment 2 -- Solution

ECON6002 Panel Data and Spatial Econometrics, Term II 2020-21

Due date: Friday Week 6, February 19, 2021, 5:00pm. Submission: Email your completed assignments in one pdf file to: [email protected], with file name: YourName_A2.pdf; and email Subject: ECON6002 Assignment 2 1. Download the “Spanish Dairy Farm Production” data from the website: http://people.stern.nyu.edu/wgreene/Econometrics/PanelDataEconometrics.htm

(a) Write a paragraph to introduce the data, including the variables names, number of cross-sectional units and time periods, purpose of study, etc.

(b) Using the data, demonstrate the applications of the Stata command xtreg with options (be, fe, re, mle), in fitting the one-way effects panel model. Explain your results briefly.

(c) Extend your analysis by including the time-specific effects to fit (i) two-way fixed effects model and (ii) a mixed model with individual random effects and time-fixed effects. Explain your results briefly.

(d) Using the Stata command xtmixed, fit a two-way random effects model to the data. Explain your results.

Solution: (a) Spanish Dairy Farm Production, N = 247, T = 6. Variables in the file are:

FARM: Farm ID YEAR: year, 93, 94, ..., 98

Input variables: COWS: number of cows LAND: land size in hectares LABOR: number of works FEED: amount of food fed X1, X2, X3, X4: log of input variables, deviations from means (in logs) X11, X22, X33, X44: squares of X1, X2, X3, X4 X12, X13, X14, X23, X24, X34: cross product of X1, X2, X3, X4 YEAR93, . . . , YEAR98 = year dummy variables Output MILK = milk production each farm in each year YIT = log of MILK production Purpose of Study Identify factors determining the Spanish dairy farm production YIT, and specify a ‘good’ panel data model for predicting the milk production.

(b) The between estimator (be) of the one-way effects model, the Model (2.1) in Chapter 2

of lecture notes, is obtained by first averaging Model (2.1) over t to give 𝑦𝑦�𝑖𝑖∙ = 𝛼𝛼 + 𝑋𝑋�𝑖𝑖∙′ 𝛽𝛽 + (𝜇𝜇𝑖𝑖 + �̅�𝑣𝑖𝑖∙),

Page 2: Assignment 2 -- Solution · 2021. 4. 13. · Assignment 2 -- Solution. ECON6002 Panel Data and Spatial Econometrics, Term II 2020-21 . Due date: Friday Week 6, February 19, 2021,

and the performing an OLS regression of the averaged model. Consistency of the be estimator requires that the error term (𝜇𝜇𝑖𝑖 + �̅�𝑣𝑖𝑖∙) to be uncorrelated with 𝑋𝑋�𝑖𝑖∙, which is the case when 𝜇𝜇𝑖𝑖 is a random effect but not when 𝜇𝜇𝑖𝑖 is a fixed effect. The other three estimators are well described in Chapter 2 of lecture notes. The outputs for xtreg with (be, fe, re, mle): by regressing YIT on X1, X2, X3, X4: Table 1.1a. The between estimation . xtreg yit x1 x2 x3 x4, be

Between regression (regression on group means) Number of obs = 1,482

Group variable: farm Number of groups = 247

R-sq: Obs per group:

within = 0.8309 min = 6

between = 0.9634 avg = 6.0

overall = 0.9524 max = 6

F(4,242) = 1593.64

sd(u_i + avg(e_i.))= .1191294 Prob > F = 0.0000

------------------------------------------------------------------------------

yit | Coef. Std. Err. t P>|t| [95% Conf. Interval]

-------------+----------------------------------------------------------------

x1 | .5625965 .0475769 11.82 0.000 .4688788 .6563142

x2 | .0254032 .0260339 0.98 0.330 -.0258787 .0766851

x3 | .0154496 .0292668 0.53 0.598 -.0422006 .0730998

x4 | .4779786 .0265409 18.01 0.000 .425698 .5302591

_cons | 11.57749 .00758 1527.37 0.000 11.56256 11.59242

------------------------------------------------------------------------------

Table 1.1b. The fixed effects estimation . xtreg yit x1 x2 x3 x4, fe

Fixed-effects (within) regression Number of obs = 1,482

Group variable: farm Number of groups = 247

R-sq: Obs per group:

within = 0.8359 min = 6

between = 0.9615 avg = 6.0

overall = 0.9513 max = 6

F(4,1231) = 1568.11

corr(u_i, Xb) = 0.1089 Prob > F = 0.0000

------------------------------------------------------------------------------

yit | Coef. Std. Err. t P>|t| [95% Conf. Interval]

-------------+----------------------------------------------------------------

x1 | .6620012 .0246784 26.83 0.000 .6135847 .7104177

x2 | .0373524 .0161331 2.32 0.021 .005701 .0690038

x3 | .0303996 .0232078 1.31 0.190 -.0151316 .0759307

x4 | .3825104 .0120169 31.83 0.000 .3589345 .4060862

_cons | 11.57749 .0021151 5473.85 0.000 11.57334 11.58164

-------------+----------------------------------------------------------------

sigma_u | .12198441

sigma_e | .08142265

rho | .69178541 (fraction of variance due to u_i)

------------------------------------------------------------------------------

F test that all u_i=0: F(246, 1231) = 12.84 Prob > F = 0.0000

Page 3: Assignment 2 -- Solution · 2021. 4. 13. · Assignment 2 -- Solution. ECON6002 Panel Data and Spatial Econometrics, Term II 2020-21 . Due date: Friday Week 6, February 19, 2021,

Table 1.1c. The random effects estimation . xtreg yit x1 x2 x3 x4, re

Random-effects GLS regression Number of obs = 1,482

Group variable: farm Number of groups = 247

R-sq: Obs per group:

within = 0.8358 min = 6

between = 0.9621 avg = 6.0

overall = 0.9518 max = 6

Wald chi2(4) = 12563.20

corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000

------------------------------------------------------------------------------

yit | Coef. Std. Err. z P>|z| [95% Conf. Interval]

-------------+----------------------------------------------------------------

x1 | .6502721 .0208835 31.14 0.000 .6093412 .691203

x2 | .0300488 .0133827 2.25 0.025 .0038193 .0562784

x3 | .03507 .0173829 2.02 0.044 .0010002 .0691398

x4 | .3995279 .0108786 36.73 0.000 .3782062 .4208497

_cons | 11.57749 .0076015 1523.04 0.000 11.56259 11.59239

-------------+----------------------------------------------------------------

sigma_u | .11439792

sigma_e | .08142265

rho | .66375185 (fraction of variance due to u_i)

------------------------------------------------------------------------------

Table 1.1d. The maximum likelihood estimation . xtreg yit x1 x2 x3 x4, mle

Fitting constant-only model:

Iteration 0: log likelihood = -221.37283

Iteration 1: log likelihood = -221.35168

Fitting full model:

Iteration 0: log likelihood = 1284.8672

Iteration 1: log likelihood = 1297.033

Iteration 2: log likelihood = 1297.1861

Iteration 3: log likelihood = 1297.1861

Random-effects ML regression Number of obs = 1,482

Group variable: farm Number of groups = 247

Random effects u_i ~ Gaussian Obs per group:

min = 6

avg = 6.0

max = 6

LR chi2(4) = 3037.08

Log likelihood = 1297.1861 Prob > chi2 = 0.0000

------------------------------------------------------------------------------

yit | Coef. Std. Err. z P>|z| [95% Conf. Interval]

-------------+----------------------------------------------------------------

x1 | .6505191 .0208955 31.13 0.000 .6095647 .6914734

x2 | .0301504 .0133864 2.25 0.024 .0039136 .0563873

x3 | .0350755 .0173955 2.02 0.044 .0009809 .06917

x4 | .3992413 .0109443 36.48 0.000 .3777909 .4206918

_cons | 11.57749 .0076555 1512.32 0.000 11.56248 11.59249

Page 4: Assignment 2 -- Solution · 2021. 4. 13. · Assignment 2 -- Solution. ECON6002 Panel Data and Spatial Econometrics, Term II 2020-21 . Due date: Friday Week 6, February 19, 2021,

-------------+----------------------------------------------------------------

/sigma_u | .115638 .0056798 .1050248 .1273236

/sigma_e | .0813718 .0016398 .0782205 .08465

rho | .6688242 .0238522 .6208686 .7141585

------------------------------------------------------------------------------

LR test of sigma_u=0: chibar2(01) = 975.02 Prob >= chibar2 = 0.000

i) All four estimation methods show that X1 (COWS) and X4 (FEED) are highly

significant to the MILK production; ii) The X2 (LAND) and X3 (LABOR) are insignificant in be estimation, X2 (LAND) is

significant at 5% level in fe, re and mle estimation; and X3 (LABOR) is also significant in re and mle estimation but not in fe estimation at 5% level.

iii) The highly significance of X1 and X4 suggest that their squared terms and cross-product may be included in the model. Indeed, the re or fe estimation of such a model show that X11 and/or X44 should be added into the model.

iv) The re and mle estimation methods produce similar results.

(c) The outputs for xtreg (fe and re) on X1, X2, X3, X4, and time dummies: Table 1.2a. FE estimation with time dummies . xtreg yit x1 x2 x3 x4 i.year, fe

Fixed-effects (within) regression Number of obs = 1,482

Group variable: farm Number of groups = 247

R-sq: Obs per group:

within = 0.8517 min = 6

between = 0.9593 avg = 6.0

overall = 0.9493 max = 6

F(9,1226) = 782.05

corr(u_i, Xb) = 0.4929 Prob > F = 0.0000

------------------------------------------------------------------------------

yit | Coef. Std. Err. t P>|t| [95% Conf. Interval]

-------------+----------------------------------------------------------------

x1 | .6379655 .0237985 26.81 0.000 .5912751 .6846559

x2 | .0412755 .0154446 2.67 0.008 .0109747 .0715763

x3 | .0281924 .0221732 1.27 0.204 -.0153093 .071694

x4 | .3081603 .0132257 23.30 0.000 .2822127 .3341078

|

year |

94 | .0329188 .0071309 4.62 0.000 .0189286 .046909

95 | .0613667 .0074861 8.20 0.000 .0466797 .0760537

96 | .0719498 .0080094 8.98 0.000 .0562361 .0876635

97 | .0753031 .0084325 8.93 0.000 .0587594 .0918468

98 | .0940052 .0089244 10.53 0.000 .0764965 .111514

|

_cons | 11.52156 .0057982 1987.08 0.000 11.51019 11.53294

-------------+----------------------------------------------------------------

sigma_u | .14561471

sigma_e | .07758351

rho | .77889157 (fraction of variance due to u_i)

Page 5: Assignment 2 -- Solution · 2021. 4. 13. · Assignment 2 -- Solution. ECON6002 Panel Data and Spatial Econometrics, Term II 2020-21 . Due date: Friday Week 6, February 19, 2021,

------------------------------------------------------------------------------

F test that all u_i=0: F(246, 1226) = 14.54 Prob > F = 0.0000

Adding the time dummies to the fe estimation seems improve the overall model fitting. The X1 and X4 remain highly significant, X2 becomes more significant with p-value 0.008, and the time dummies are all highly significant. The X3 remains insignificant. Adding the time dummies to the re estimation also improves the overall model fitting. The X1 and X4 remain highly significant, X2 and X3 become more significant with p-values 0.004 and 0.001, respectively, and the time dummies are all highly significant.

Table 1.2a. RE estimation with time dummies . xtreg yit x1 x2 x3 x4 i.year, re

Random-effects GLS regression Number of obs = 1,482

Group variable: farm Number of groups = 247

R-sq: Obs per group:

within = 0.8498 min = 6

between = 0.9605 avg = 6.0

overall = 0.9510 max = 6

Wald chi2(9) = 12872.02

corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000

------------------------------------------------------------------------------

yit | Coef. Std. Err. z P>|z| [95% Conf. Interval]

-------------+----------------------------------------------------------------

x1 | .6622073 .0205154 32.28 0.000 .6219979 .7024166

x2 | .0376141 .0131975 2.85 0.004 .0117475 .0634808

x3 | .0551804 .0173129 3.19 0.001 .0212478 .089113

x4 | .353735 .0117757 30.04 0.000 .330655 .3768149

|

year |

94 | .0263511 .007207 3.66 0.000 .0122256 .0404765

95 | .0489399 .0074386 6.58 0.000 .0343606 .0635193

96 | .0528781 .0077166 6.85 0.000 .0377538 .0680024

97 | .0522242 .0079423 6.58 0.000 .0366575 .0677909

98 | .0664853 .0081929 8.11 0.000 .0504275 .0825432

|

_cons | 11.53634 .0092748 1243.83 0.000 11.51816 11.55452

-------------+----------------------------------------------------------------

sigma_u | .11484174

sigma_e | .07758351

rho | .68662771 (fraction of variance due to u_i)

------------------------------------------------------------------------------

(d) The two-way RE model is fitted using the general Stata command xtmixed with

options: || _all: R.year || farm:, mle. It produces results very similar to those by xtreg yit x1 x2 x3 x4 i.year, re

Page 6: Assignment 2 -- Solution · 2021. 4. 13. · Assignment 2 -- Solution. ECON6002 Panel Data and Spatial Econometrics, Term II 2020-21 . Due date: Friday Week 6, February 19, 2021,

The difference between two-way FE and two-way RE estimation suggest more need to be done in choosing a panel model with FE or RE. Table 1.3. Two-way RE estimation . xtmixed yit x1 x2 x3 x4 || _all: R.year || farm:, mle

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log likelihood = 1325.9818

Iteration 1: log likelihood = 1325.9818

Computing standard errors:

Mixed-effects ML regression Number of obs = 1,482

-------------------------------------------------------------

| No. of Observations per Group

Group Variable | Groups Minimum Average Maximum

----------------+--------------------------------------------

_all | 1 1,482 1,482.0 1,482

farm | 247 6 6.0 6

-------------------------------------------------------------

Wald chi2(4) = 8784.31

Log likelihood = 1325.9818 Prob > chi2 = 0.0000

------------------------------------------------------------------------------

yit | Coef. Std. Err. z P>|z| [95% Conf. Interval]

-------------+----------------------------------------------------------------

x1 | .6618469 .0205223 32.25 0.000 .621624 .7020698

x2 | .0376961 .0132336 2.85 0.004 .0117588 .0636334

x3 | .0537612 .0174256 3.09 0.002 .0196076 .0879148

x4 | .3543165 .0116974 30.29 0.000 .33139 .3772429

_cons | 11.57749 .0120504 960.76 0.000 11.55387 11.60111

------------------------------------------------------------------------------

------------------------------------------------------------------------------

Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval]

-----------------------------+------------------------------------------------

_all: Identity |

sd(R.year) | .0220552 .0069488 .011894 .0408974

-----------------------------+------------------------------------------------

farm: Identity |

sd(_cons) | .1217421 .0061302 .110301 .1343699

-----------------------------+------------------------------------------------

sd(Residual) | .0782755 .0015957 .0752097 .0814664

------------------------------------------------------------------------------

LR test vs. linear model: chi2(2) = 1032.61 Prob > chi2 = 0.0000

Note: LR test is conservative and provided only for reference.

2. Consider the Cigarette Demand Data available from the course website as Cigar.txt. Label the nine columns as State, Year, Price, Pop, Pop16, CPI, NDI, C, and PIMIN, and Define

Page 7: Assignment 2 -- Solution · 2021. 4. 13. · Assignment 2 -- Solution. ECON6002 Panel Data and Spatial Econometrics, Term II 2020-21 . Due date: Friday Week 6, February 19, 2021,

LnC = Ln(C), LnP = Ln(Price), LnNDI = Ln(NDI), and LnPmin = Ln(PIMIN). Consider a two-way fixed effects (FE) model for LnC, based on LnP, LnNDI, LnPmin, and Year. (a) Compute the within estimators of the coefficients of LnP, LnNDI, LnPmin, and Year,

and the corresponding estimated standard errors of the within estimators (you may need to write your own STATA code). Comment on the results.

(b) Assuming the idiosyncratic errors are iid normal, test the significance of individual FE given the non-existence of time FE, and the significance of time FE given the non-existence of individual FE.

(c) Assuming the idiosyncratic errors are iid normal, test the significance of individual FE allowing the existence of time FE, and the significance of time FE allowing the existence of individual FE.

(d) Consider fitting a one-way FE model for LnC, based on all possible regressors. Report a model you think the best in describing the relationship and discuss the results.

Solution: (a) We suppose to apply the Q-transformation to remove the two-way fixed effects, and then

run an OLE regression, compute the standard errors manually. A directly use of Stata fe option with i.Year dummies (as in Table 2.1 below) gives the same estimates, but slightly different standard errors. From Table 2.1, we see that all of the coefficients are statistically significant. LnP has a negative coefficient as expected, i.e., people buy less when the price is higher. LnNDI has a positive coefficient, with cigarette consumption showing some significant income effect. Surprisingly, LnPmin has a negative coefficient, showing that when the minimum price of cigarettes in neighboring states increase, cigarette consumption in the current state decreases. Year variable shows a positive price trend, but Year-dummies show negative effects, showing that with Year-dummies, there is probably no need for a Year-trend variable or with Year-trend variable there is no need for Year-dummies.

Table 2.1. Two-way FE estimation . xtreg LnC LnP LnNDI LnPmin Year i.Year, fe

note: 92.Year omitted because of collinearity

Fixed-effects (within) regression Number of obs = 1,380

Group variable: State Number of groups = 46

R-sq: Obs per group:

within = 0.6779 min = 30

between = 0.3178 avg = 30.0

overall = 0.4328 max = 30

F(32,1302) = 85.65

corr(u_i, Xb) = 0.0497 Prob > F = 0.0000

------------------------------------------------------------------------------

LnC | Coef. Std. Err. t P>|t| [95% Conf. Interval]

-------------+----------------------------------------------------------------

LnP | -1.023062 .0418181 -24.46 0.000 -1.1051 -.9410237

Page 8: Assignment 2 -- Solution · 2021. 4. 13. · Assignment 2 -- Solution. ECON6002 Panel Data and Spatial Econometrics, Term II 2020-21 . Due date: Friday Week 6, February 19, 2021,

LnNDI | .5200042 .0466836 11.14 0.000 .4284208 .6115876

LnPmin | -.1172486 .0541294 -2.17 0.030 -.223439 -.0110582

Year | .0271425 .0056747 4.78 0.000 .01601 .038275

|

Year |

64 | -.0552901 .0154889 -3.57 0.000 -.0856761 -.0249042

65 | -.0963049 .0162297 -5.93 0.000 -.1281441 -.0644658

66 | -.1038394 .0165225 -6.28 0.000 -.1362531 -.0714257

67 | -.1250987 .0176757 -7.08 0.000 -.1597748 -.0904227

68 | -.1228057 .0172665 -7.11 0.000 -.1566789 -.0889324

69 | -.1584459 .018693 -8.48 0.000 -.1951175 -.1217742

70 | -.1497712 .0178417 -8.39 0.000 -.1847728 -.1147696

71 | -.1283003 .0183839 -6.98 0.000 -.1643656 -.092235

72 | -.1238581 .0196831 -6.29 0.000 -.1624723 -.085244

73 | -.1890391 .0217798 -8.68 0.000 -.2317664 -.1463117

74 | -.1943228 .0233824 -8.31 0.000 -.2401941 -.1484516

75 | -.1738359 .0230157 -7.55 0.000 -.2189878 -.128684

76 | -.1339885 .0221764 -6.04 0.000 -.1774938 -.0904831

77 | -.1767688 .0239316 -7.39 0.000 -.2237175 -.1298201

78 | -.1396288 .0217205 -6.43 0.000 -.1822399 -.0970178

79 | -.1828466 .0225567 -8.11 0.000 -.2270981 -.1385952

80 | -.1875899 .0229984 -8.16 0.000 -.2327079 -.1424718

81 | -.2052302 .0237856 -8.63 0.000 -.2518926 -.1585678

82 | -.1576212 .0217146 -7.26 0.000 -.2002207 -.1150218

83 | -.0804423 .0181705 -4.43 0.000 -.116089 -.0447956

84 | -.0476163 .0162976 -2.92 0.004 -.0795888 -.0156438

85 | -.0482089 .0163213 -2.95 0.003 -.0802279 -.0161899

86 | -.0456368 .0159865 -2.85 0.004 -.076999 -.0142747

87 | -.0560178 .0161595 -3.47 0.001 -.0877194 -.0243162

88 | -.0677205 .0161209 -4.20 0.000 -.0993464 -.0360947

89 | -.0689491 .0158214 -4.36 0.000 -.0999873 -.037911

90 | -.0666174 .0155136 -4.29 0.000 -.0970517 -.0361831

91 | -.0701181 .0158837 -4.41 0.000 -.1012786 -.0389576

92 | 0 (omitted)

|

_cons | 2.890875 .1509644 19.15 0.000 2.594715 3.187035

-------------+----------------------------------------------------------------

sigma_u | .15466985

sigma_e | .07458789

rho | .81132297 (fraction of variance due to u_i)

------------------------------------------------------------------------------

F test that all u_i=0: F(45, 1302) = 125.73 Prob > F = 0.0000

(b) First, to test the hypothesis: 𝐻𝐻0: 𝜇𝜇1 = ⋯ = 𝜇𝜇𝑁𝑁, given 𝜆𝜆1 = ⋯ = 𝜆𝜆𝑇𝑇, the F test is used:

𝐹𝐹C1 =(RRSS − URSS)/(𝑁𝑁 − 1)

URSS/(𝑁𝑁𝑁𝑁 − 𝑁𝑁 − 𝐾𝐾) 𝐻𝐻0~ 𝐹𝐹𝑁𝑁−1, 𝑁𝑁(𝑇𝑇−1)−𝐾𝐾 = 𝐹𝐹45,1330

We have 𝐹𝐹C1 = 116.85, with p-value = 0.0000 from Table 2.2a below. Therefore, we reject 𝐻𝐻0 at any conventional level of significance, and conclude that the data provide significant evidence to show the existence of individual fixed effects. Table 2.2a Test for the existence of individual FE, given the non-existence of time FE . xtreg LnC LnP LnNDI LnPmin Year, fe

Page 9: Assignment 2 -- Solution · 2021. 4. 13. · Assignment 2 -- Solution. ECON6002 Panel Data and Spatial Econometrics, Term II 2020-21 . Due date: Friday Week 6, February 19, 2021,

Fixed-effects (within) regression Number of obs = 1,380

Group variable: State Number of groups = 46

R-sq: Obs per group:

within = 0.6367 min = 30

between = 0.2938 avg = 30.0

overall = 0.4030 max = 30

F(4,1330) = 582.77

corr(u_i, Xb) = 0.0508 Prob > F = 0.0000

------------------------------------------------------------------------------

LnC | Coef. Std. Err. t P>|t| [95% Conf. Interval]

-------------+----------------------------------------------------------------

LnP | -.8514155 .0385828 -22.07 0.000 -.9271053 -.7757258

LnNDI | .6042318 .0352055 17.16 0.000 .5351674 .6732963

LnPmin | .2191902 .0371634 5.90 0.000 .146285 .2920955

Year | -.0100831 .0035202 -2.86 0.004 -.0169888 -.0031774

_cons | 2.8971 .095711 30.27 0.000 2.709339 3.084861

-------------+----------------------------------------------------------------

sigma_u | .1573968

sigma_e | .07837842

rho | .80130054 (fraction of variance due to u_i)

------------------------------------------------------------------------------

F test that all u_i=0: F(45, 1330) = 116.85 Prob > F = 0.0000

Second, switching the roles of State and Year using xtset, we perform the test for time FE, given non-existence of individual FE. However, the Year as an independent variable in the model is not allowed to run a time FE estimation, and thus is dropped.

To test 𝐻𝐻0: 𝜆𝜆1 = ⋯ = 𝜆𝜆𝑇𝑇, given 𝜇𝜇1 = ⋯ = 𝜇𝜇𝑁𝑁, we use the following F statistic:

𝐹𝐹C2 =(RRSS − URSS)/(𝑁𝑁 − 1)

URSS/(𝑁𝑁𝑁𝑁 − 𝑁𝑁 − 𝐾𝐾) 𝐻𝐻0~ 𝐹𝐹𝑇𝑇−1, (𝑁𝑁−1)𝑇𝑇−𝐾𝐾 = 𝐹𝐹29,1347

We have 𝐹𝐹C2 = 2.20 and p-value = 0.0003 from Table 2.2b below. Again 𝐻𝐻0 is strongly rejected, and data provide significant evidence to show the existence of time FE, given non-existence to State FE.

Table 2.2b. Test for the existence of time FE given the non-existence of individual FE . xtset Year

panel variable: Year (balanced)

. xtreg LnC LnP LnNDI LnPmin, fe

Fixed-effects (within) regression Number of obs = 1,380

Group variable: Year Number of groups = 30

R-sq: Obs per group:

within = 0.3446 min = 46

between = 0.6454 avg = 46.0

overall = 0.2531 max = 46

Page 10: Assignment 2 -- Solution · 2021. 4. 13. · Assignment 2 -- Solution. ECON6002 Panel Data and Spatial Econometrics, Term II 2020-21 . Due date: Friday Week 6, February 19, 2021,

F(3,1347) = 236.07

corr(u_i, Xb) = -0.8881 Prob > F = 0.0000

------------------------------------------------------------------------------

LnC | Coef. Std. Err. t P>|t| [95% Conf. Interval]

-------------+----------------------------------------------------------------

LnP | -1.276568 .0598275 -21.34 0.000 -1.393933 -1.159203

LnNDI | .5687895 .0305808 18.60 0.000 .5087984 .6287806

LnPmin | .1602595 .0593774 2.70 0.007 .0437773 .2767416

_cons | 4.384547 .3359196 13.05 0.000 3.725565 5.04353

-------------+----------------------------------------------------------------

sigma_u | .21671531

sigma_e | .16954404

rho | .62032872 (fraction of variance due to u_i)

------------------------------------------------------------------------------

F test that all u_i=0: F(29, 1347) = 2.20 Prob > F = 0.0003

(c) First, to test 𝐻𝐻0: 𝜇𝜇1 = ⋯ = 𝜇𝜇𝑁𝑁 allowing 𝜆𝜆𝑡𝑡 ≠ 𝜆𝜆𝑠𝑠, 𝑡𝑡 ≠ 𝑠𝑠 = 1, . . . , 𝑁𝑁, we use the F- test:

𝐹𝐹M1 =(RRSS − URSS)/(𝑁𝑁 − 1)URSS/((N - 1)(T -1) − 𝐾𝐾)

𝐻𝐻0~ 𝐹𝐹𝑁𝑁−1, (𝑁𝑁−1)(𝑇𝑇−1)−𝐾𝐾 = 𝐹𝐹45, 1302

We have, 𝐹𝐹M1= 125.73, and p-value = 0.0000 from Table 2.3a below. Therefore, we reject 𝐻𝐻0 at any conventional level of significance, and conclude that the data provide sufficient evidence to show the existence of State FE, even the time FE is allowed in the model.

Table 2.3a. Test for the existence of individual FE allowing the existence of time FE

. xtset State

panel variable: State (balanced)

. xtreg LnC LnP LnNDI LnPmin Year i.Year, fe

note: 92.Year omitted because of collinearity

Fixed-effects (within) regression Number of obs = 1,380

Group variable: State Number of groups = 46

R-sq: Obs per group:

within = 0.6779 min = 30

between = 0.3178 avg = 30.0

overall = 0.4328 max = 30

F(32,1302) = 85.65

corr(u_i, Xb) = 0.0497 Prob > F = 0.0000

------------------------------------------------------------------------------

LnC | Coef. Std. Err. t P>|t| [95% Conf. Interval]

-------------+----------------------------------------------------------------

LnP | -1.023062 .0418181 -24.46 0.000 -1.1051 -.9410237

LnNDI | .5200042 .0466836 11.14 0.000 .4284208 .6115876

LnPmin | -.1172486 .0541294 -2.17 0.030 -.223439 -.0110582

Year | .0271425 .0056747 4.78 0.000 .01601 .038275

|

Year |

64 | -.0552901 .0154889 -3.57 0.000 -.0856761 -.0249042

Page 11: Assignment 2 -- Solution · 2021. 4. 13. · Assignment 2 -- Solution. ECON6002 Panel Data and Spatial Econometrics, Term II 2020-21 . Due date: Friday Week 6, February 19, 2021,

65 | -.0963049 .0162297 -5.93 0.000 -.1281441 -.0644658

66 | -.1038394 .0165225 -6.28 0.000 -.1362531 -.0714257

67 | -.1250987 .0176757 -7.08 0.000 -.1597748 -.0904227

68 | -.1228057 .0172665 -7.11 0.000 -.1566789 -.0889324

69 | -.1584459 .018693 -8.48 0.000 -.1951175 -.1217742

70 | -.1497712 .0178417 -8.39 0.000 -.1847728 -.1147696

71 | -.1283003 .0183839 -6.98 0.000 -.1643656 -.092235

72 | -.1238581 .0196831 -6.29 0.000 -.1624723 -.085244

73 | -.1890391 .0217798 -8.68 0.000 -.2317664 -.1463117

74 | -.1943228 .0233824 -8.31 0.000 -.2401941 -.1484516

75 | -.1738359 .0230157 -7.55 0.000 -.2189878 -.128684

76 | -.1339885 .0221764 -6.04 0.000 -.1774938 -.0904831

77 | -.1767688 .0239316 -7.39 0.000 -.2237175 -.1298201

78 | -.1396288 .0217205 -6.43 0.000 -.1822399 -.0970178

79 | -.1828466 .0225567 -8.11 0.000 -.2270981 -.1385952

80 | -.1875899 .0229984 -8.16 0.000 -.2327079 -.1424718

81 | -.2052302 .0237856 -8.63 0.000 -.2518926 -.1585678

82 | -.1576212 .0217146 -7.26 0.000 -.2002207 -.1150218

83 | -.0804423 .0181705 -4.43 0.000 -.116089 -.0447956

84 | -.0476163 .0162976 -2.92 0.004 -.0795888 -.0156438

85 | -.0482089 .0163213 -2.95 0.003 -.0802279 -.0161899

86 | -.0456368 .0159865 -2.85 0.004 -.076999 -.0142747

87 | -.0560178 .0161595 -3.47 0.001 -.0877194 -.0243162

88 | -.0677205 .0161209 -4.20 0.000 -.0993464 -.0360947

89 | -.0689491 .0158214 -4.36 0.000 -.0999873 -.037911

90 | -.0666174 .0155136 -4.29 0.000 -.0970517 -.0361831

91 | -.0701181 .0158837 -4.41 0.000 -.1012786 -.0389576

92 | 0 (omitted)

|

_cons | 2.890875 .1509644 19.15 0.000 2.594715 3.187035

-------------+----------------------------------------------------------------

sigma_u | .15466985

sigma_e | .07458789

rho | .81132297 (fraction of variance due to u_i)

------------------------------------------------------------------------------

F test that all u_i=0: F(45, 1302) = 125.73 Prob > F = 0.0000

Second, to test 𝐻𝐻0: 𝜆𝜆1 = ⋯ = 𝜆𝜆𝑇𝑇 allowing 𝜇𝜇𝑖𝑖 ≠ 𝜇𝜇𝑗𝑗, 𝑖𝑖 ≠ 𝑗𝑗 = 1, . . . , 𝑁𝑁, we use the F-test:

𝐹𝐹M2 =(RRSS − URSS)/(𝑁𝑁 − 1)URSS/((N - 1)(T -1)− 𝐾𝐾)

𝐻𝐻0~ 𝐹𝐹𝑇𝑇−1, (𝑁𝑁−1)(𝑇𝑇−1)−𝐾𝐾 = 𝐹𝐹29, 1302

We have, 𝐹𝐹M2= 6.06, and p-value = 0.0000 from Table 2.3b below. Therefore, we reject 𝐻𝐻0 at any conventional level of significance, and conclude that the data provide sufficient evidence to show the existence of Year FE, even the State FE is allowed in the model.

Table 2.3b. Test for the existence of time FE allowing the existence of individual FE . xtset Year

panel variable: Year (balanced)

. xtreg LnC LnP LnNDI LnPmin i.State, fe

Page 12: Assignment 2 -- Solution · 2021. 4. 13. · Assignment 2 -- Solution. ECON6002 Panel Data and Spatial Econometrics, Term II 2020-21 . Due date: Friday Week 6, February 19, 2021,

Fixed-effects (within) regression Number of obs = 1,380

Group variable: Year Number of groups = 30

R-sq: Obs per group:

within = 0.8774 min = 46

between = 0.5945 avg = 46.0

overall = 0.4960 max = 46

F(48,1302) = 194.10

corr(u_i, Xb) = -0.8344 Prob > F = 0.0000

------------------------------------------------------------------------------

LnC | Coef. Std. Err. t P>|t| [95% Conf. Interval]

-------------+----------------------------------------------------------------

LnP | -1.023062 .0418181 -24.46 0.000 -1.1051 -.9410237

LnNDI | .5200042 .0466836 11.14 0.000 .4284208 .6115876

LnPmin | -.1172486 .0541294 -2.17 0.030 -.223439 -.0110582

|

State |

3 | -.0942399 .0209363 -4.50 0.000 -.1353124 -.0531674

4 | .0652249 .019404 3.36 0.001 .0271584 .1032914

5 | -.1828052 .0277137 -6.60 0.000 -.2371736 -.1284368

7 | -.0800961 .0320071 -2.50 0.012 -.1428871 -.017305

8 | .1944474 .0225727 8.61 0.000 .1501645 .2387302

9 | .0131377 .0301371 0.44 0.663 -.045985 .0722603

10 | .1138834 .0227796 5.00 0.000 .0691946 .1585722

11 | -.0158117 .0204961 -0.77 0.441 -.0560207 .0243973

13 | -.1734154 .0203114 -8.54 0.000 -.213262 -.1335688

14 | -.0826502 .0277457 -2.98 0.003 -.1370814 -.028219

15 | .0020156 .0235876 0.09 0.932 -.0442583 .0482894

16 | -.0830408 .0219061 -3.79 0.000 -.1260158 -.0400657

17 | -.1476527 .0229396 -6.44 0.000 -.1926552 -.1026501

18 | .1969145 .0228691 8.61 0.000 .1520502 .2417787

19 | .1011496 .0194426 5.20 0.000 .0630073 .1392919

20 | .1333838 .0204419 6.53 0.000 .0932812 .1734864

21 | -.1509335 .0258846 -5.83 0.000 -.2017137 -.1001534

22 | -.0365199 .0269326 -1.36 0.175 -.089356 .0163161

23 | .0146083 .0231935 0.63 0.529 -.0308924 .0601091

24 | -.0606817 .0223601 -2.71 0.007 -.1045475 -.016816

25 | .0454322 .020374 2.23 0.026 .0054627 .0854017

26 | -.0328212 .023741 -1.38 0.167 -.079396 .0137535

27 | -.0993292 .0205569 -4.83 0.000 -.1396575 -.0590008

28 | -.1517093 .0218189 -6.95 0.000 -.1945133 -.1089053

29 | .2711074 .0270335 10.03 0.000 .2180734 .3241413

30 | .4794221 .0254298 18.85 0.000 .4295343 .5293099

31 | -.0744017 .031457 -2.37 0.018 -.1361136 -.0126897

32 | -.1977903 .0194705 -10.16 0.000 -.2359874 -.1595933

33 | -.0465274 .0269565 -1.73 0.085 -.0994104 .0063555

35 | -.142697 .0203435 -7.01 0.000 -.1826067 -.1027874

36 | -.0520312 .0240028 -2.17 0.030 -.0991196 -.0049428

37 | .0291263 .0199561 1.46 0.145 -.0100234 .068276

39 | -.060841 .0228124 -2.67 0.008 -.1055942 -.0160879

40 | .1122522 .0238575 4.71 0.000 .0654488 .1590556

41 | -.0606001 .0204522 -2.96 0.003 -.1007229 -.0204772

42 | -.1397424 .0199737 -7.00 0.000 -.1789266 -.1005582

43 | -.0026864 .021861 -0.12 0.902 -.0455731 .0402002

Page 13: Assignment 2 -- Solution · 2021. 4. 13. · Assignment 2 -- Solution. ECON6002 Panel Data and Spatial Econometrics, Term II 2020-21 . Due date: Friday Week 6, February 19, 2021,

44 | -.0196305 .0216586 -0.91 0.365 -.0621202 .0228591

45 | -.5592524 .0199262 -28.07 0.000 -.5983434 -.5201615

46 | .1273323 .0214664 5.93 0.000 .0852199 .1694448

47 | -.15095 .0249201 -6.06 0.000 -.1998381 -.102062

48 | -.194523 .0252826 -7.69 0.000 -.2441221 -.1449239

49 | .0282018 .0217202 1.30 0.194 -.0144086 .0708122

50 | -.0761815 .0222461 -3.42 0.001 -.1198236 -.0325394

51 | -.0240692 .0225262 -1.07 0.285 -.0682609 .0201225

|

_cons | 4.910075 .5067728 9.69 0.000 3.915894 5.904255

-------------+----------------------------------------------------------------

sigma_u | .26197707

sigma_e | .07458789

rho | .92501748 (fraction of variance due to u_i)

------------------------------------------------------------------------------

F test that all u_i=0: F(29, 1302) = 6.06 Prob > F = 0.0000

(d) A panel regression with State FE including all regressors, i.e., “xtreg LnC LnP LnNDI LnPmin Year CPI Pop Pop16, fe”shows that Pop and Pop16 are insignificant at all and thus are dropped. Further, CPI is insignificant in the presence of Year-trend and thus is dropped. As discussed in (a), with the inclusion of Year-trend variable, we may not consider year-dummies as it may be the reason for the wrong sign of LnPmin.

The results of the best fitted model are given in Table 2.4 below: Teble 2.4. One-way FE model . xtreg LnC LnP LnNDI LnPmin Year, fe

Fixed-effects (within) regression Number of obs = 1,380

Group variable: State Number of groups = 46

R-sq: Obs per group:

within = 0.6367 min = 30

between = 0.2938 avg = 30.0

overall = 0.4030 max = 30

F(4,1330) = 582.77

corr(u_i, Xb) = 0.0508 Prob > F = 0.0000

------------------------------------------------------------------------------

LnC | Coef. Std. Err. t P>|t| [95% Conf. Interval]

-------------+----------------------------------------------------------------

LnP | -.8514155 .0385828 -22.07 0.000 -.9271053 -.7757258

LnNDI | .6042318 .0352055 17.16 0.000 .5351674 .6732963

LnPmin | .2191902 .0371634 5.90 0.000 .146285 .2920955

Year | -.0100831 .0035202 -2.86 0.004 -.0169888 -.0031774

_cons | 2.8971 .095711 30.27 0.000 2.709339 3.084861

-------------+----------------------------------------------------------------

sigma_u | .1573968

sigma_e | .07837842

rho | .80130054 (fraction of variance due to u_i)

------------------------------------------------------------------------------

F test that all u_i=0: F(45, 1330) = 116.85 Prob > F = 0.0000

Page 14: Assignment 2 -- Solution · 2021. 4. 13. · Assignment 2 -- Solution. ECON6002 Panel Data and Spatial Econometrics, Term II 2020-21 . Due date: Friday Week 6, February 19, 2021,

When only state FE is included, all the coefficients have the expected signs. Year has a negative coefficient, indicating that less people smoke over time, possibly indicating an increasing awareness of the unhealthy effects of smoking.

3. Consider the cigarette demand data used in Problem 2.

(a) Fit a two-way random effects (RE) model to the sale variable LnC, based on LnP, LnNDI, LnPmin, and Year. Discuss your results. Comment (based on relevant tests) on the significance of individual and time specific random effects.

(b) Fit a one-way individual RE model to the sale variable LnC, based on LnP, LnNDI, LnPmin, Year, and the time dummies. Discuss your results. Comment (based on relevant tests) on the significance of the individual RE, and the significance of time FE.

(c) Fit a one-way time RE model to the sale variable LnC, based on LnP, LnNDI, LnPmin, Year, and the individual dummies. Discuss your results. Comment (based on relevant tests) on the significance of the time RE, and the significance of individual FE.

(d) Compare the three models fitted in (a)-(c). Solution: (a) From Table 3.1 below, we have the LR test statistic for the existence of both State and

Year RE has a value of 1991.31, with a p-value of 0.0000. Thus, we can reject the null hypothesis that the SD of both State and Year RE are zero, for the alternative hypothesis that at least one of the RE standard deviations are non-zero. Further, the 95% confidence interval (CI) for 𝜎𝜎𝜇𝜇 is (.1240788, .1873762), and hence we are at least 97.5% confident that 𝜎𝜎𝜇𝜇 > 0. Similarly, the 95% CI for 𝜎𝜎𝜆𝜆 is (.0209396, .0520159), and hence we are at least 97.5% confident that 𝜎𝜎𝜆𝜆 > 0.

Table 3.1. Two-way random effects estimation . xtmixed LnC LnP LnNDI LnPmin Year || _all: R.Year || State:, mle

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log likelihood = 1472.667

Iteration 1: log likelihood = 1472.667

Computing standard errors:

Mixed-effects ML regression Number of obs = 1,380

-------------------------------------------------------------

| No. of Observations per Group

Group Variable | Groups Minimum Average Maximum

----------------+--------------------------------------------

_all | 1 1,380 1,380.0 1,380

State | 46 30 30.0 30

-------------------------------------------------------------

Wald chi2(4) = 1011.13

Log likelihood = 1472.667 Prob > chi2 = 0.0000

------------------------------------------------------------------------------

Page 15: Assignment 2 -- Solution · 2021. 4. 13. · Assignment 2 -- Solution. ECON6002 Panel Data and Spatial Econometrics, Term II 2020-21 . Due date: Friday Week 6, February 19, 2021,

LnC | Coef. Std. Err. z P>|z| [95% Conf. Interval]

-------------+----------------------------------------------------------------

LnP | -.9438117 .0392337 -24.06 0.000 -1.020708 -.8669151

LnNDI | .5311831 .0429266 12.37 0.000 .4470484 .6153177

LnPmin | .0596247 .0453152 1.32 0.188 -.0291914 .1484408

Year | .0117017 .0049095 2.38 0.017 .0020792 .0213242

_cons | 2.85403 .1359743 20.99 0.000 2.587525 3.120535

------------------------------------------------------------------------------

------------------------------------------------------------------------------

Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval]

-----------------------------+------------------------------------------------

_all: Identity |

sd(R.Year) | .0330029 .0076607 .0209396 .0520159

-----------------------------+------------------------------------------------

State: Identity |

sd(_cons) | .1524776 .0160338 .1240788 .1873762

-----------------------------+------------------------------------------------

sd(Residual) | .0749673 .0014913 .0721006 .077948

------------------------------------------------------------------------------

LR test vs. linear model: chi2(2) = 1991.31 Prob > chi2 = 0.0000

(b) From Table 3.2, we see that all the four main variables are significant. However, as in

the two-way FE case the inclusion of time-dummies changes the sign of LnPmin, which may be an undesirable feature. LR test for State RE has a value of 2042.81 and a p-value of 0.000, showing that the State RE is highly significant. Each of the estimated time dummies are highly significant, from which we can infer that the time FE is highly significant.

Table 3.2. One-way State RE with time-dummies . xtreg LnC LnP LnNDI LnPmin Year i.Year, mle

note: 92.Year omitted because of collinearity

Fitting constant-only model:

Iteration 0: log likelihood = 764.58324

Iteration 1: log likelihood = 764.58491

Fitting full model:

Iteration 0: log likelihood = 1496.3129

Iteration 1: log likelihood = 1523.7647

Iteration 2: log likelihood = 1528.905

Iteration 3: log likelihood = 1528.9753

Iteration 4: log likelihood = 1528.9753

Random-effects ML regression Number of obs = 1,380

Group variable: State Number of groups = 46

Random effects u_i ~ Gaussian Obs per group:

min = 30

avg = 30.0

max = 30

LR chi2(32) = 1528.78

Log likelihood = 1528.9753 Prob > chi2 = 0.0000

Page 16: Assignment 2 -- Solution · 2021. 4. 13. · Assignment 2 -- Solution. ECON6002 Panel Data and Spatial Econometrics, Term II 2020-21 . Due date: Friday Week 6, February 19, 2021,

------------------------------------------------------------------------------

LnC | Coef. Std. Err. z P>|z| [95% Conf. Interval]

-------------+----------------------------------------------------------------

LnP | -1.0264 .0409447 -25.07 0.000 -1.106651 -.9461501

LnNDI | .522502 .0440898 11.85 0.000 .4360877 .6089164

LnPmin | -.1097341 .0526832 -2.08 0.037 -.2129914 -.0064769

Year | .0267034 .0053999 4.95 0.000 .0161197 .037287

|

Year |

64 | -.0550973 .0152925 -3.60 0.000 -.08507 -.0251245

65 | -.095866 .0159862 -6.00 0.000 -.1271985 -.0645336

66 | -.1032692 .016253 -6.35 0.000 -.1351244 -.071414

67 | -.1243342 .0173335 -7.17 0.000 -.1583073 -.0903612

68 | -.1221058 .0169345 -7.21 0.000 -.1552968 -.0889148

69 | -.1575054 .018286 -8.61 0.000 -.1933453 -.1216655

70 | -.1488741 .0174707 -8.52 0.000 -.183116 -.1146322

71 | -.1272949 .0179817 -7.08 0.000 -.1625385 -.0920513

72 | -.1226912 .019225 -6.38 0.000 -.1603714 -.0850109

73 | -.1877838 .0212737 -8.83 0.000 -.2294795 -.1460881

74 | -.192947 .0228136 -8.46 0.000 -.2376608 -.1482333

75 | -.1725179 .0224656 -7.68 0.000 -.2165496 -.1284862

76 | -.1327843 .0216585 -6.13 0.000 -.1752342 -.0903345

77 | -.1754749 .0233576 -7.51 0.000 -.221255 -.1296948

78 | -.1386318 .0212456 -6.53 0.000 -.1802724 -.0969913

79 | -.1819006 .0220619 -8.25 0.000 -.225141 -.1386601

80 | -.1866629 .0224923 -8.30 0.000 -.230747 -.1425788

81 | -.2043288 .0232583 -8.79 0.000 -.2499142 -.1587434

82 | -.1568713 .021257 -7.38 0.000 -.1985342 -.1152085

83 | -.0799712 .0178345 -4.48 0.000 -.1149262 -.0450163

84 | -.0474666 .0160192 -2.96 0.003 -.0788636 -.0160696

85 | -.0479929 .0160555 -2.99 0.003 -.0794611 -.0165246

86 | -.0454833 .0157439 -2.89 0.004 -.0763408 -.0146258

87 | -.0557555 .0159163 -3.50 0.000 -.0869508 -.0245601

88 | -.0674467 .0158837 -4.25 0.000 -.0985783 -.0363151

89 | -.068717 .0156017 -4.40 0.000 -.0992959 -.0381382

90 | -.0664853 .0153123 -4.34 0.000 -.0964968 -.0364738

91 | -.069805 .0156696 -4.45 0.000 -.1005168 -.0390932

92 | 0 (omitted)

|

_cons | 2.886191 .1457899 19.80 0.000 2.600448 3.171934

-------------+----------------------------------------------------------------

/sigma_u | .1522974 .016011 .1239384 .1871454

/sigma_e | .0736886 .0014266 .0709448 .0765385

rho | .8103021 .0328727 .7393529 .867932

------------------------------------------------------------------------------

LR test of sigma_u=0: chibar2(01) = 2042.81 Prob >= chibar2 = 0.000

(c) With the state dummies in the model, the Year-trend is not allowed, and thus is dropped.

All the three main variables are highly significant, and the sign of LnPmin is back to positive, showing the effect of time-dummies (or time FE). LR test for time RE has a value or 55.23, and a p-value of 0.000, showing the time RE is highly significant.

Table 3.3. One-way time RE model with individual dummies . xtset Year

Page 17: Assignment 2 -- Solution · 2021. 4. 13. · Assignment 2 -- Solution. ECON6002 Panel Data and Spatial Econometrics, Term II 2020-21 . Due date: Friday Week 6, February 19, 2021,

panel variable: Year (balanced)

. xtreg LnC LnP LnNDI LnPmin i.State, mle

Fitting constant-only model:

Iteration 0: log likelihood = 169.71765

Iteration 1: log likelihood = 169.71789

Fitting full model:

Iteration 0: log likelihood = 1599.403

Iteration 1: log likelihood = 1604.1888

Iteration 2: log likelihood = 1604.4563

Iteration 3: log likelihood = 1604.4632

Iteration 4: log likelihood = 1604.4632

Random-effects ML regression Number of obs = 1,380

Group variable: Year Number of groups = 30

Random effects u_i ~ Gaussian Obs per group:

min = 46

avg = 46.0

max = 46

LR chi2(48) = 2869.49

Log likelihood = 1604.4632 Prob > chi2 = 0.0000

------------------------------------------------------------------------------

LnC | Coef. Std. Err. z P>|z| [95% Conf. Interval]

-------------+----------------------------------------------------------------

LnP | -.8975275 .0363402 -24.70 0.000 -.9687531 -.8263019

LnNDI | .5886631 .0290623 20.26 0.000 .531702 .6456241

LnPmin | .1257777 .0422316 2.98 0.003 .0430054 .2085501

|

State |

3 | -.0953094 .0201388 -4.73 0.000 -.1347808 -.0558379

4 | .0774022 .0191828 4.03 0.000 .0398047 .1149998

5 | -.2132145 .0227722 -9.36 0.000 -.2578472 -.1685817

7 | -.1426293 .0230455 -6.19 0.000 -.1877977 -.0974609

8 | .1848792 .0208157 8.88 0.000 .1440813 .2256772

9 | .0249555 .0266934 0.93 0.350 -.0273626 .0772736

10 | .0830323 .0200961 4.13 0.000 .0436447 .12242

11 | .0039473 .0201618 0.20 0.845 -.035569 .0434637

13 | -.1582158 .0199874 -7.92 0.000 -.1973903 -.1190412

14 | -.0625993 .0255646 -2.45 0.014 -.1127049 -.0124936

15 | .0506663 .0226457 2.24 0.025 .0062815 .0950511

16 | -.0890431 .0205654 -4.33 0.000 -.1293505 -.0487357

17 | -.1515802 .0212465 -7.13 0.000 -.1932225 -.1099379

18 | .2613197 .0210214 12.43 0.000 .2201186 .3025208

19 | .095641 .0192334 4.97 0.000 .0579442 .1333377

20 | .1346986 .0198959 6.77 0.000 .0957033 .1736939

21 | -.1251522 .0242253 -5.17 0.000 -.1726328 -.0776715

22 | -.0607483 .0227774 -2.67 0.008 -.1053912 -.0161054

23 | .018648 .0217115 0.86 0.390 -.0239058 .0612018

24 | -.0873185 .0200369 -4.36 0.000 -.1265901 -.0480469

25 | .0561629 .0195933 2.87 0.004 .0177608 .0945651

26 | .0090979 .0228495 0.40 0.691 -.0356863 .0538821

27 | -.0886813 .0201186 -4.41 0.000 -.128113 -.0492497

Page 18: Assignment 2 -- Solution · 2021. 4. 13. · Assignment 2 -- Solution. ECON6002 Panel Data and Spatial Econometrics, Term II 2020-21 . Due date: Friday Week 6, February 19, 2021,

28 | -.1461788 .0208555 -7.01 0.000 -.1870549 -.1053027

29 | .2514699 .0230123 10.93 0.000 .2063667 .2965731

30 | .4632949 .0224709 20.62 0.000 .4192528 .507337

31 | -.1302755 .0232231 -5.61 0.000 -.175792 -.084759

32 | -.197185 .0192857 -10.22 0.000 -.2349843 -.1593856

33 | -.0841859 .0218829 -3.85 0.000 -.1270756 -.0412961

35 | -.1489439 .0196883 -7.57 0.000 -.1875323 -.1103555

36 | -.0156392 .0230855 -0.68 0.498 -.060886 .0296076

37 | .0322404 .0196162 1.64 0.100 -.0062067 .0706875

39 | -.0700525 .0209907 -3.34 0.001 -.1111934 -.0289115

40 | .0655532 .0201308 3.26 0.001 .0260976 .1050089

41 | -.0461755 .0201979 -2.29 0.022 -.0857625 -.0065884

42 | -.126918 .0197235 -6.43 0.000 -.1655753 -.0882607

43 | .0420017 .0211064 1.99 0.047 .0006339 .0833695

44 | -.0434668 .019814 -2.19 0.028 -.0823015 -.0046321

45 | -.5420722 .019692 -27.53 0.000 -.5806679 -.5034766

46 | .127251 .0204742 6.22 0.000 .0871222 .1673797

47 | -.095014 .023725 -4.00 0.000 -.1415142 -.0485138

48 | -.2279928 .0213031 -10.70 0.000 -.2697462 -.1862394

49 | .0762542 .0205311 3.71 0.000 .036014 .1164944

50 | -.1044423 .0199201 -5.24 0.000 -.1434851 -.0653996

51 | -.0189179 .0214157 -0.88 0.377 -.060892 .0230562

|

_cons | 2.835894 .1179413 24.04 0.000 2.604733 3.067055

-------------+----------------------------------------------------------------

/sigma_u | .0245583 .0046739 .0169121 .0356613

/sigma_e | .0741888 .0014358 .0714274 .077057

rho | .0987555 .0343306 .0469077 .1835962

------------------------------------------------------------------------------

LR test of sigma_u=0: chibar2(01) = 55.23 Prob >= chibar2 = 0.000

(d) In all the 3 models, the coefficients for LnP, LnNDI, and Year have remained statistically significant, and maintained their respective signs. This indicates that the coefficient estimates have some robustness against slightly different model specifications. The coefficient of LnPmin was only significant for the model with State RE and Time FE, but the p-value was only 0.037, indicating marginal significance, and will change depending on model specifications.

The effects were significant in all model specifications, regardless of FE or RE specification. But the Time RE and State FE specification had the highest log-likelihood value of 1605.9949, indicating the best fit with the data.

4. Consider the Bank Cost Data described in Chapter 3, Lecture Notes, also available at http://people.stern.nyu.edu/wgreene/Econometrics/PanelDataEconometrics.htm (a) Obtain the pooled OLS estimator with cluster-robust standard errors (CRSE) of panel

regression of C on W1-W4, and Q1-Q5, first using regress command, and then using xtreg, pa command. Comment on your results.

(b) For the panel regression of C on W1-W4, and Q1-Q5, obtain the pooled FGLS or PA estimator with CRSE and unstructured error correlation. Comment on your results.

(c) For the one-way individual FE panel regression of C on W1-W4, Q1-Q5 and time dummies, obtain the within estimator with CRSE. Comment on your results.

Page 19: Assignment 2 -- Solution · 2021. 4. 13. · Assignment 2 -- Solution. ECON6002 Panel Data and Spatial Econometrics, Term II 2020-21 . Due date: Friday Week 6, February 19, 2021,

(d) For the model considered in (c), obtain the first-difference estimator with CRSE. Compare the results with those in (c).

(e) For the model considered in (c), find the LSDV estimator using the command areg. Compare the results with those in (c) and comment.

(f) For the one-way individual RE panel regression of C on W1-W4, Q1-Q5 and time dummies, obtain the re, mle and pa corr(exchangeble) estimators with CRSE. Comment on your results.

(g) Using STATA to compare all the estimators obtained in (a)-(f).

Solution

(a) The coefficient estimates are exactly the same in both cases, but the standard error estimation differs slightly. Standard errors in the population-averaged model are slightly smaller than those of the pooled OLS. All coefficients are statistically significant. . regress c w1 w2 w3 w4 q1 q2 q3 q4 q5, vce(cluster bank)

Linear regression Number of obs = 2,500

F(9, 499) = 3532.78

Prob > F = 0.0000

R-squared = 0.9547

Root MSE = .25046

(Std. Err. adjusted for 500 clusters in bank)

------------------------------------------------------------------------------

| Robust

c | Coef. Std. Err. t P>|t| [95% Conf. Interval]

-------------+----------------------------------------------------------------

w1 | .423211 .0201681 20.98 0.000 .3835861 .4628358

w2 | .0365596 .009008 4.06 0.000 .0188612 .0542579

w3 | .177698 .016407 10.83 0.000 .1454628 .2099333

w4 | .1060201 .0125327 8.46 0.000 .0813967 .1306434

q1 | .1033549 .0094003 10.99 0.000 .0848858 .1218241

q2 | .3749293 .0107371 34.92 0.000 .3538338 .3960249

q3 | .0965813 .015679 6.16 0.000 .0657762 .1273864

q4 | .0562386 .00525 10.71 0.000 .0459238 .0665533

q5 | .2860344 .0140998 20.29 0.000 .2583321 .3137367

_cons | .5636438 .1653867 3.41 0.001 .2387037 .8885839

------------------------------------------------------------------------------

. xtreg c w1 w2 w3 w4 q1 q2 q3 q4 q5, pa corr(independent) vce(robust)

Iteration 1: tolerance = 7.542e-12

GEE population-averaged model Number of obs = 2,500

Group variable: bank Number of groups = 500

Link: identity Obs per group:

Family: Gaussian min = 5

Correlation: independent avg = 5.0

max = 5

Wald chi2(9) = 31909.90

Scale parameter: .062477 Prob > chi2 = 0.0000

Page 20: Assignment 2 -- Solution · 2021. 4. 13. · Assignment 2 -- Solution. ECON6002 Panel Data and Spatial Econometrics, Term II 2020-21 . Due date: Friday Week 6, February 19, 2021,

Pearson chi2(2500): 156.19 Deviance = 156.19

Dispersion (Pearson): .062477 Dispersion = .062477

(Std. Err. adjusted for clustering on bank)

------------------------------------------------------------------------------

| Robust

c | Coef. Std. Err. z P>|z| [95% Conf. Interval]

-------------+----------------------------------------------------------------

w1 | .423211 .0201317 21.02 0.000 .3837535 .4626684

w2 | .0365596 .0089918 4.07 0.000 .0189359 .0541832

w3 | .177698 .0163774 10.85 0.000 .1455989 .2097971

w4 | .1060201 .0125101 8.47 0.000 .0815007 .1305394

q1 | .1033549 .0093834 11.01 0.000 .0849638 .1217461

q2 | .3749293 .0107178 34.98 0.000 .3539229 .3959358

q3 | .0965813 .0156508 6.17 0.000 .0659063 .1272562

q4 | .0562386 .0052405 10.73 0.000 .0459674 .0665098

q5 | .2860344 .0140744 20.32 0.000 .2584491 .3136197

_cons | .5636438 .1650886 3.41 0.001 .2400761 .8872115

------------------------------------------------------------------------------

(b) When placing no restrictions on the structure of serial correlation between errors, the coefficient estimates and the standard errors changed very slightly. All coefficients still remain statistically significant. . xtset bank t

panel variable: bank (strongly balanced)

time variable: t, 1 to 5

delta: 1 unit

. xtreg c w1 w2 w3 w4 q1 q2 q3 q4 q5, pa corr(unstructured) vce(robust)

Iteration 1: tolerance = .01326228

Iteration 2: tolerance = .00021266

Iteration 3: tolerance = 8.629e-06

Iteration 4: tolerance = 5.371e-07

GEE population-averaged model Number of obs = 2,500

Group and time vars: bank t Number of groups = 500

Link: identity Obs per group:

Family: Gaussian min = 5

Correlation: unstructured avg = 5.0

max = 5

Wald chi2(9) = 33247.43

Scale parameter: .0624809 Prob > chi2 = 0.0000

(Std. Err. adjusted for clustering on bank)

------------------------------------------------------------------------------

| Robust

c | Coef. Std. Err. z P>|z| [95% Conf. Interval]

-------------+----------------------------------------------------------------

w1 | .4190001 .0201006 20.85 0.000 .3796037 .4583965

w2 | .0369044 .00895 4.12 0.000 .0193628 .054446

w3 | .180744 .0163357 11.06 0.000 .1487266 .2127613

w4 | .1056251 .0123766 8.53 0.000 .0813674 .1298827

q1 | .1037522 .0093492 11.10 0.000 .0854281 .1220764

Page 21: Assignment 2 -- Solution · 2021. 4. 13. · Assignment 2 -- Solution. ECON6002 Panel Data and Spatial Econometrics, Term II 2020-21 . Due date: Friday Week 6, February 19, 2021,

q2 | .3748237 .0107855 34.75 0.000 .3536844 .3959629

q3 | .0969988 .0154105 6.29 0.000 .0667948 .1272028

q4 | .0559306 .0051648 10.83 0.000 .0458079 .0660533

q5 | .2863292 .0139839 20.48 0.000 .2589213 .313737

_cons | .5847327 .1647887 3.55 0.000 .2617529 .9077126

------------------------------------------------------------------------------

(c) The Within estimators of the coefficients are still largely close in value to the pooled OLS

and pooled FGLS. Standard errors are higher, but still close to those of the pooled OLS and pooled FGLS estimates. All coefficients are still statistically significant.

. xtreg c w1 w2 w3 w4 q1 q2 q3 q4 q5 i.t, fe vce(robust)

Fixed-effects (within) regression Number of obs = 2,500

Group variable: bank Number of groups = 500

R-sq: Obs per group:

within = 0.9577 min = 5

between = 0.9473 avg = 5.0

overall = 0.9557 max = 5

F(13,499) = 2351.12

corr(u_i, Xb) = -0.0021 Prob > F = 0.0000

(Std. Err. adjusted for 500 clusters in bank)

------------------------------------------------------------------------------

| Robust

c | Coef. Std. Err. t P>|t| [95% Conf. Interval]

-------------+----------------------------------------------------------------

w1 | .4156845 .0219445 18.94 0.000 .3725694 .4587996

w2 | .0390743 .009717 4.02 0.000 .0199831 .0581655

w3 | .1876276 .0168927 11.11 0.000 .154438 .2208172

w4 | .0914774 .013212 6.92 0.000 .0655195 .1174354

q1 | .1052981 .0103676 10.16 0.000 .0849286 .1256676

q2 | .3768671 .0117705 32.02 0.000 .3537413 .3999929

q3 | .1022029 .0156095 6.55 0.000 .0715345 .1328713

q4 | .0529178 .0054736 9.67 0.000 .0421637 .063672

q5 | .2839846 .0148466 19.13 0.000 .2548151 .3131541

|

t |

2 | -.0005003 .0159987 -0.03 0.975 -.0319335 .0309329

3 | -.0324821 .0159782 -2.03 0.043 -.0638749 -.0010892

4 | -.0642705 .0160141 -4.01 0.000 -.0957339 -.0328071

5 | -.1015606 .0167178 -6.08 0.000 -.1344064 -.0687147

|

_cons | .5913814 .1745729 3.39 0.001 .248393 .9343699

-------------+----------------------------------------------------------------

sigma_u | .11882953

sigma_e | .2431313

rho | .19281473 (fraction of variance due to u_i)

------------------------------------------------------------------------------

(d) The coefficient estimates for the first-difference estimator are very close to the within estimators. The standard errors for the first-difference estimators are slightly larger than

Page 22: Assignment 2 -- Solution · 2021. 4. 13. · Assignment 2 -- Solution. ECON6002 Panel Data and Spatial Econometrics, Term II 2020-21 . Due date: Friday Week 6, February 19, 2021,

those of the within estimator, but all coefficients are still statistically significant. The number of time-dummies are reduced by 1 due to the first-differencing. The time dummies were mostly statistically significant in the within estimation, but are now all statistically insignificant in the first-difference estimation. . regress D.(c w1 w2 w3 w4 q1 q2 q3 q4 q5) i.t, vce(cluster bank)

Linear regression Number of obs = 2,000

F(12, 499) = 1832.54

Prob > F = 0.0000

R-squared = 0.9542

Root MSE = .34386

(Std. Err. adjusted for 500 clusters in bank)

------------------------------------------------------------------------------

| Robust

D.c | Coef. Std. Err. t P>|t| [95% Conf. Interval]

-------------+----------------------------------------------------------------

w1 |

D1. | .3943297 .0260517 15.14 0.000 .3431452 .4455143

w2 |

D1. | .028143 .011224 2.51 0.012 .0060908 .0501952

w3 |

D1. | .2032593 .0194798 10.43 0.000 .1649867 .2415319

w4 |

D1. | .0893374 .0156151 5.72 0.000 .0586579 .1200169

q1 |

D1. | .1064259 .0118681 8.97 0.000 .0831083 .1297434

q2 |

D1. | .3768837 .0128699 29.28 0.000 .3515978 .4021697

q3 |

D1. | .0948604 .0175255 5.41 0.000 .0604276 .1292932

q4 |

D1. | .0542789 .0067099 8.09 0.000 .0410957 .067462

q5 |

D1. | .2867459 .0161605 17.74 0.000 .2549948 .318497

t |

3 | -.0207953 .0284985 -0.73 0.466 -.076787 .0351965

4 | -.0189306 .0227362 -0.83 0.405 -.063601 .0257399

5 | -.0299231 .0228045 -1.31 0.190 -.0747277 .0148815

|

_cons | -.0102601 .0169456 -0.61 0.545 -.0435536 .0230333

------------------------------------------------------------------------------

(e) The coefficient estimates and time dummy coefficients using areg are exactly the same as those in the Within estimation. The standard errors obtained from areg are higher than those of the Within estimation.

. areg c w1 w2 w3 w4 q1 q2 q3 q4 q5 i.t, absorb(bank) vce(cluster bank)

Linear regression, absorbing indicators Number of obs = 2,500

Absorbed variable: bank No. of categories = 500

F( 13, 499) = 1879.20

Prob > F = 0.0000

R-squared = 0.9659

Page 23: Assignment 2 -- Solution · 2021. 4. 13. · Assignment 2 -- Solution. ECON6002 Panel Data and Spatial Econometrics, Term II 2020-21 . Due date: Friday Week 6, February 19, 2021,

Adj R-squared = 0.9571

Root MSE = 0.2431

(Std. Err. adjusted for 500 clusters in bank)

------------------------------------------------------------------------------

| Robust

c | Coef. Std. Err. t P>|t| [95% Conf. Interval]

-------------+----------------------------------------------------------------

w1 | .4156845 .0245459 16.94 0.000 .3674585 .4639105

w2 | .0390743 .0108688 3.60 0.000 .01772 .0604286

w3 | .1876276 .0188952 9.93 0.000 .1505037 .2247516

w4 | .0914774 .0147781 6.19 0.000 .0624424 .1205124

q1 | .1052981 .0115966 9.08 0.000 .082514 .1280822

q2 | .3768671 .0131658 28.62 0.000 .3509999 .4027343

q3 | .1022029 .0174598 5.85 0.000 .067899 .1365067

q4 | .0529178 .0061225 8.64 0.000 .0408889 .0649468

q5 | .2839846 .0166065 17.10 0.000 .2513574 .3166119

|

t |

2 | -.0005003 .0178952 -0.03 0.978 -.0356596 .034659

3 | -.0324821 .0178723 -1.82 0.070 -.0675962 .0026321

4 | -.0642705 .0179124 -3.59 0.000 -.0994636 -.0290774

5 | -.1015606 .0186995 -5.43 0.000 -.1383 -.0648211

|

_cons | .5913814 .1952668 3.03 0.003 .207735 .9750278

------------------------------------------------------------------------------

(f) The coefficient estimates are very close in all 3 estimation methods, and are exactly identical in MLE and population-averaged (PA) estimation. Standard errors are highest in the GLS estimation and lowest in the PA estimation. All coefficients are statistically significant in all methods, suggesting robustness to estimation methods. Time dummies of all 3 estimation methods also show the same pattern, with all except t2 coefficient being statistically significant.

. xtreg c w1 w2 w3 w4 q1 q2 q3 q4 q5 i.t, re vce(robust)

Random-effects GLS regression Number of obs = 2,500

Group variable: bank Number of groups = 500

R-sq: Obs per group:

within = 0.9577 min = 5

between = 0.9476 avg = 5.0

overall = 0.9557 max = 5

Wald chi2(13) = 33153.58

corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000

(Std. Err. adjusted for 500 clusters in bank)

------------------------------------------------------------------------------

| Robust

c | Coef. Std. Err. z P>|z| [95% Conf. Interval]

-------------+----------------------------------------------------------------

w1 | .4269637 .0202635 21.07 0.000 .3872478 .4666795

Page 24: Assignment 2 -- Solution · 2021. 4. 13. · Assignment 2 -- Solution. ECON6002 Panel Data and Spatial Econometrics, Term II 2020-21 . Due date: Friday Week 6, February 19, 2021,

w2 | .0332008 .0088759 3.74 0.000 .0158043 .0505973

w3 | .1836653 .0163038 11.27 0.000 .1517105 .2156201

w4 | .0885393 .012077 7.33 0.000 .0648688 .1122097

q1 | .1024541 .0093011 11.02 0.000 .0842242 .1206839

q2 | .3752844 .0107354 34.96 0.000 .3542435 .3963254

q3 | .098474 .0152924 6.44 0.000 .0685014 .1284466

q4 | .0540584 .0052547 10.29 0.000 .0437593 .0643575

q5 | .2900255 .0139809 20.74 0.000 .2626234 .3174277

|

t |

2 | -.0014721 .0162073 -0.09 0.928 -.0332379 .0302937

3 | -.0344234 .015634 -2.20 0.028 -.0650654 -.0037814

4 | -.0667354 .0159238 -4.19 0.000 -.0979455 -.0355253

5 | -.1036345 .0166382 -6.23 0.000 -.1362448 -.0710242

|

_cons | .5496466 .1664326 3.30 0.001 .2234447 .8758485

-------------+----------------------------------------------------------------

sigma_u | .04796794

sigma_e | .2431313

rho | .03746592 (fraction of variance due to u_i)

vce(robust) is not allowed for MLE

. xtreg c w1 w2 w3 w4 q1 q2 q3 q4 q5 i.t, mle

Fitting constant-only model:

Iteration 0: log likelihood = -3948.1225

Iteration 1: log likelihood = -3948.1224

Fitting full model:

Iteration 0: log likelihood = -48.543891

Iteration 1: log likelihood = -48.498592

Iteration 2: log likelihood = -48.498587

Random-effects ML regression Number of obs = 2,500

Group variable: bank Number of groups = 500

Random effects u_i ~ Gaussian Obs per group:

min = 5

avg = 5.0

max = 5

LR chi2(13) = 7799.25

Log likelihood = -48.498587 Prob > chi2 = 0.0000

------------------------------------------------------------------------------

c | Coef. Std. Err. z P>|z| [95% Conf. Interval]

-------------+----------------------------------------------------------------

w1 | .4269868 .0176047 24.25 0.000 .3924823 .4614913

w2 | .0331889 .0079966 4.15 0.000 .0175159 .0488619

w3 | .1836575 .0149601 12.28 0.000 .1543363 .2129787

w4 | .0885328 .0118133 7.49 0.000 .0653793 .1116864

q1 | .1024483 .0073384 13.96 0.000 .0880653 .1168313

q2 | .3752812 .0069884 53.70 0.000 .3615843 .3889781

Page 25: Assignment 2 -- Solution · 2021. 4. 13. · Assignment 2 -- Solution. ECON6002 Panel Data and Spatial Econometrics, Term II 2020-21 . Due date: Friday Week 6, February 19, 2021,

q3 | .0984666 .0095068 10.36 0.000 .0798337 .1170996

q4 | .0540608 .0040136 13.47 0.000 .0461943 .0619273

q5 | .2900378 .0096068 30.19 0.000 .2712089 .3088667

|

t |

2 | -.001474 .0161605 -0.09 0.927 -.033148 .0302

3 | -.0344273 .0162771 -2.12 0.034 -.06633 -.0025247

4 | -.0667405 .0162657 -4.10 0.000 -.0986206 -.0348603

5 | -.1036388 .0162975 -6.36 0.000 -.1355813 -.0716963

|

_cons | .5495577 .123002 4.47 0.000 .3084782 .7906371

-------------+----------------------------------------------------------------

/sigma_u | .0474584 .010149 .0312092 .0721676

/sigma_e | .2424231 .0038352 .2350216 .2500577

rho | .03691 .0156746 .0150649 .0797028

------------------------------------------------------------------------------

LR test of sigma_u=0: chibar2(01) = 6.33 Prob >= chibar2 = 0.006

. xtreg c w1 w2 w3 w4 q1 q2 q3 q4 q5 i.t, pa corr(exchangeable) vce(robust)

Iteration 1: tolerance = .00424965

Iteration 2: tolerance = .00002336

Iteration 3: tolerance = 1.296e-07

GEE population-averaged model Number of obs = 2,500

Group variable: bank Number of groups = 500

Link: identity Obs per group:

Family: Gaussian min = 5

Correlation: exchangeable avg = 5.0

max = 5

Wald chi2(13) = 33321.75

Scale parameter: .0610213 Prob > chi2 = 0.0000

(Std. Err. adjusted for clustering on bank)

------------------------------------------------------------------------------

| Robust

c | Coef. Std. Err. z P>|z| [95% Conf. Interval]

-------------+----------------------------------------------------------------

w1 | .4269868 .0202116 21.13 0.000 .3873728 .4666007

w2 | .0331889 .0088526 3.75 0.000 .0158381 .0505398

w3 | .1836575 .0162633 11.29 0.000 .151782 .2155331

w4 | .0885328 .0120463 7.35 0.000 .0649226 .1121431

q1 | .1024483 .0092761 11.04 0.000 .0842674 .1206291

q2 | .3752812 .0107063 35.05 0.000 .3542973 .3962651

q3 | .0984666 .0152536 6.46 0.000 .0685701 .1283632

q4 | .0540608 .0052414 10.31 0.000 .0437879 .0643337

q5 | .2900378 .0139443 20.80 0.000 .2627074 .3173682

t |

2 | -.001474 .0161659 -0.09 0.927 -.0331587 .0302107

3 | -.0344273 .015593 -2.21 0.027 -.064989 -.0038657

4 | -.0667405 .0158825 -4.20 0.000 -.0978697 -.0356112

5 | -.1036388 .0165952 -6.25 0.000 -.1361648 -.0711129

Page 26: Assignment 2 -- Solution · 2021. 4. 13. · Assignment 2 -- Solution. ECON6002 Panel Data and Spatial Econometrics, Term II 2020-21 . Due date: Friday Week 6, February 19, 2021,

|

_cons | .5495577 .166003 3.31 0.001 .2241978 .8749175

------------------------------------------------------------------------------

(g) The Stata commands for comparison:

quietly regress c w1 w2 w3 w4 q1 q2 q3 q4 q5, vce(cluster bank)

estimates store OLS_Est

quietly xtreg c w1 w2 w3 w4 q1 q2 q3 q4 q5, pa corr(independent) vce(robust)

estimates store PA_EstI

quietly xtreg c w1 w2 w3 w4 q1 q2 q3 q4 q5, pa corr(unstructured) vce(robust)

estimates store PA_EstU

quietly xtreg c w1 w2 w3 w4 q1 q2 q3 q4 q5 i.t, fe vce(robust)

estimates store FE_EstR

quietly regress D.(c w1 w2 w3 w4 q1 q2 q3 q4 q5) i.t, vce(cluster bank)

estimates store FD_EstR

quietly areg c w1 w2 w3 w4 q1 q2 q3 q4 q5 i.t, absorb(bank) vce(cluster bank)

estimates store LSDV_EstR

quietly xtreg c w1 w2 w3 w4 q1 q2 q3 q4 q5 i.t, re vce(robust)

estimates store RE_EstR

quietly xtreg c w1 w2 w3 w4 q1 q2 q3 q4 q5 i.t, mle

estimates store MLE_Est

quietly xtreg c w1 w2 w3 w4 q1 q2 q3 q4 q5 i.t, pa corr(exchangeable) vce(robust)

estimates store PA_EstE

The comparison results are given below. . estimates table OLS_Est PA_EstI PA_EstU FE_EstR LSDV_EstR RE_EstR PA_EstE, b(%7.3f) se ------------------------------------------------------------------------------------

Variable | OLS_Est PA_EstI PA_EstU FE_EstR LSDV_~R RE_EstR PA_EstE

-------------+----------------------------------------------------------------------

w1 | 0.423 0.423 0.419 0.416 0.416 0.427 0.427

| 0.020 0.020 0.020 0.022 0.025 0.020 0.020

w2 | 0.037 0.037 0.037 0.039 0.039 0.033 0.033

| 0.009 0.009 0.009 0.010 0.011 0.009 0.009

w3 | 0.178 0.178 0.181 0.188 0.188 0.184 0.184

| 0.016 0.016 0.016 0.017 0.019 0.016 0.016

w4 | 0.106 0.106 0.106 0.091 0.091 0.089 0.089

| 0.013 0.013 0.012 0.013 0.015 0.012 0.012

q1 | 0.103 0.103 0.104 0.105 0.105 0.102 0.102

| 0.009 0.009 0.009 0.010 0.012 0.009 0.009

q2 | 0.375 0.375 0.375 0.377 0.377 0.375 0.375

| 0.011 0.011 0.011 0.012 0.013 0.011 0.011

q3 | 0.097 0.097 0.097 0.102 0.102 0.098 0.098

| 0.016 0.016 0.015 0.016 0.017 0.015 0.015

q4 | 0.056 0.056 0.056 0.053 0.053 0.054 0.054

| 0.005 0.005 0.005 0.005 0.006 0.005 0.005

q5 | 0.286 0.286 0.286 0.284 0.284 0.290 0.290

| 0.014 0.014 0.014 0.015 0.017 0.014 0.014

t |

2 | -0.001 -0.001 -0.001 -0.001

| 0.016 0.018 0.016 0.016

3 | -0.032 -0.032 -0.034 -0.034

| 0.016 0.018 0.016 0.016

Page 27: Assignment 2 -- Solution · 2021. 4. 13. · Assignment 2 -- Solution. ECON6002 Panel Data and Spatial Econometrics, Term II 2020-21 . Due date: Friday Week 6, February 19, 2021,

4 | -0.064 -0.064 -0.067 -0.067

| 0.016 0.018 0.016 0.016

5 | -0.102 -0.102 -0.104 -0.104

| 0.017 0.019 0.017 0.017

|

_cons | 0.564 0.564 0.585 0.591 0.591 0.550 0.550

| 0.165 0.165 0.165 0.175 0.195 0.166 0.166

------------------------------------------------------------------------------------

legend: b/se

. estimates table FD_EstR, b(%7.3f) se

------------------------

Variable | FD_EstR

-------------+----------

w1 |

D1. | 0.394

| 0.026

w2 |

D1. | 0.028

| 0.011

w3 |

D1. | 0.203

| 0.019

w4 |

D1. | 0.089

| 0.016

q1 |

D1. | 0.106

| 0.012

q2 |

D1. | 0.377

| 0.013

q3 |

D1. | 0.095

| 0.018

q4 |

D1. | 0.054

| 0.007

q5 |

D1. | 0.287

| 0.016

t |

3 | -0.021

| 0.028

4 | -0.019

| 0.023

5 | -0.030

| 0.023

|

_cons | -0.010

| 0.017

------------------------

legend: b/se

. estimates table MLE_Est, b(%7.3f) se

------------------------

Variable | MLE_Est

-------------+----------

c |

w1 | 0.427

| 0.018

w2 | 0.033

| 0.008

w3 | 0.184

| 0.015

w4 | 0.089

| 0.012

q1 | 0.102

| 0.007

q2 | 0.375

| 0.007

q3 | 0.098

| 0.010

q4 | 0.054

| 0.004

q5 | 0.290

| 0.010

t |

2 | -0.001

| 0.016

3 | -0.034

| 0.016

4 | -0.067

| 0.016

5 | -0.104

| 0.016

|

_cons | 0.550

| 0.123

-------------+----------

sigma_u |

_cons | 0.047

| 0.010

-------------+----------

sigma_e |

_cons | 0.242

| 0.004

------------------------

legend: b/se