Description

stata

All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.

Related Documents

Share

Transcript

edipambudi@hotmail.com Page 1
Econometric Analysis of Cross Section and Panel Data by Jeffrey M. Wooldridge Chapter 10: Basic Linear Unobserved Effects Panel Data Models STATA Exercise
The data files used for the examples in this text can be downloaded in a zip file from the http://www.stata.com/texts/eacsap/ or giving commands on your STATA while your are connected to internet as below:
net from http://www.stata.com/data/jwooldridge/ net describe eacsap net get eacsap
Example 10.4 on page 261 using
jtrain1.dta
. RE Estimation of the Effects of Job Training Grants: We now use the data in JTRAIN1.RAW to estimate
the effect of job training grants on firm scrap rates, using a random effects analysis
. There are 54 firms that reported scrap rates for each of the years 1987, 1988, and 1989. Grants were not awarded in 1987. Some firms received grants in 1988, others received grants in 1989, and a firm could not receive a grant twice. Since there are firms in 1989 that received a grant only in 1988, it is important to allow the grant effect to persist one period. The estimated equation is
10.243 0.109 0.132 0.411 0.148 0.205
log 0.415 0.93 88 0.270 89 0.548 0.215 0.377
scrap d d union grant grant
The lagged value of grant has the larger impact and is statistically significant at the 5 percent level against a one-sided alternative. You are invited to estimate the equation without grant_1 to verify that the estimated grant effect is much smaller (on the order of 6.7 percent) and statistically insignificant.
use jtrain1, clear xtreg lscrap d88 d89 union grant grant_1, i( fcode)
Random-effects GLS regression Number of obs = 162 Group variable (i): fcode Number of groups = 54 R-sq: within = 0.2006 Obs per group: min = 3 between = 0.0206 avg = 3.0 overall = 0.0361 max = 3 Random effects u_i ~ Gaussian Wald chi2(5) = 26.99 corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0001 ------------------------------------------------------------------------------ lscrap | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- d88 | -.0934519 .1091559 -0.86 0.392 -.3073937 .1204898 d89 | -.2698336 .1316496 -2.05 0.040 -.527862 -.0118052 union | .5478021 .410625 1.33 0.182 -.2570081 1.352612 grant | -.214696 .1477838 -1.45 0.146 -.504347 .0749549 grant_1 | -.3770698 .2053516 -1.84 0.066 -.7795515 .0254119 _cons | .4148333 .2434322 1.70 0.088 -.0622851 .8919518 -------------+---------------------------------------------------------------- sigma_u | 1.3900287 sigma_e | .49774421 rho | .88634984 (fraction of variance due to u_i) ------------------------------------------------------------------------------
edipambudi@hotmail.com Page 2
test grant grant_1
( 1) grant = 0 ( 2) grant_1 = 0 chi2( 2) = 3.66 Prob > chi2 = 0.1601
Example 10.5 on page 272 using
jtrain1.dta
. FE Estimation of the Effects of Job Training Grants: Using the data in JTRAIN1.RAW, we estimate the effects of job training grants using the fixed effects estimator. The variable union has been dropped because it does not vary over time for any of the firms in the sample. The estimated equation with standard errors is
10.109 0.133 0.151 0.210
log 0.080 88 0.247 89 0.252 0.422
scrap d d grant grant
Compared with the random effects, the grant is estimated to have a larger effect, both contemporaneously and lagged one year. The t statistics are also somewhat more significant with fixed effects.
xtreg lscrap d88 d89 union grant grant_1, i( fcode) fe
Fixed-effects (within) regression Number of obs = 162 Group variable (i): fcode Number of groups = 54 R-sq: within = 0.2010 Obs per group: min = 3 between = 0.0079 avg = 3.0 overall = 0.0068 max = 3 F(4,104) = 6.54 corr(u_i, Xb) = -0.0714 Prob > F = 0.0001 ------------------------------------------------------------------------------ lscrap | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- d88 | -.0802157 .1094751 -0.73 0.465 -.297309 .1368776 d89 | -.2472028 .1332183 -1.86 0.066 -.5113797 .0169741 union | (dropped) grant | -.2523149 .150629 -1.68 0.097 -.5510178 .0463881 grant_1 | -.4215895 .2102 -2.01 0.047 -.8384239 -.0047551 _cons | .5974341 .0677344 8.82 0.000 .4631142 .7317539 -------------+---------------------------------------------------------------- sigma_u | 1.438982 sigma_e | .49774421 rho | .89313867 (fraction of variance due to u_i) ------------------------------------------------------------------------------ F test that all u_i=0: F(53, 104) = 23.87 Prob > F = 0.0000
test grant grant_1
( 1) grant = 0 ( 2) grant_1 = 0 F( 2, 104) = 2.23 Prob > F = 0.1127
edipambudi@hotmail.com Page 3
Example 10.5 (continued) on page 276. Notice that Stata does not calculate the robust standard errors for fixed effect models. Example 10.6 on page 282 using
jtrain1.dta
FD Estimation of the Effects of Job Training Grants: We now estimate the effect of job training grants on
ˆ
log( )
scrap
using first differencing. Specifically, we use pooled OLS on
1 2 1 2 1
log( ) 89
it t it it it
scrap d grant grant
Rather than difference the year dummies and omit the intercept, we simply include an intercept and a dummy variable for 1989 to capture the aggregate time effects. If we were specifically interested in the year effects from the structural model (in levels), then we should difference those as well. The estimated equation is
10.91(0.088) 0.125(0.111) 0.131(0.128) 0.235(0.265)
log( ) 0.91 0.096 89 0.223 0.351
it t it it
scrap d grant grant
where the usual standard errors are in parentheses and the robust standard errors are in brackets. We report
2
0.037
R
here because it has a useful interpretation: it measures the amount of variation in the growth in the scrap rate that is explained by
t
grant
and
1
t
grant
(and
89
d
). The estimates on
t
grant
and
1
t
grant
are fairly similar to the fixed effect estimates, although is now statistically
t
grant
more significant than
1
t
grant
. The usual
F
test for joint significance of
t
grant
and
1
t
grant
is 1.53 with
p-value
=222.
use jtrain1, clear tsset fcode year
panel variable: fcode, 410032 to 419486 time variable: year, 1987 to 1989
reg d.lscrap d89 d.grant d.grant_1
Source | SS df MS Number of obs = 108 -------------+------------------------------ F( 3, 104) = 1.31 Model | 1.31104125 3 .43701375 Prob > F = 0.2739 Residual | 34.5904876 104 .332600842 R-squared = 0.0365 -------------+------------------------------ Adj R-squared = 0.0087 Total | 35.9015288 107 .335528307 Root MSE = .57672 ------------------------------------------------------------------------------ D.lscrap | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- d89 | -.0962081 .1254469 -0.77 0.445 -.344974 .1525578 grant | D1 | -.222781 .1307423 -1.70 0.091 -.482048 .0364859 grant_1 | D1 | -.3512459 .2350848 -1.49 0.138 -.817428 .1149362 _cons | -.0906072 .0909695 -1.00 0.322 -.2710032 .0897888 ------------------------------------------------------------------------------
test d.grant d.grant_1
( 1) D.grant = 0 ( 2) D.grant_1 = 0
edipambudi@hotmail.com Page 4
F( 2, 104) = 1.53 Prob > F = 0.2215
Example 10.6 (continued) on page 283.
We test for AR(1) serial correlation in the first-differenced equation by regressing
ˆ
it
on
1
ˆ
it
using the year 1989. We get
ˆ
0.237
t
with t statistic = 1.76. There is marginal evidence of positive serial correlation in the first differences
it
. Further,
1
ˆ
0.237
is very different from
1
0.5
, which is implied by the standard random and fixed effects assumption that the
it
are serially uncorrelated.
reg d.lscrap d89 d.grant d.grant_1
Source | SS df MS Number of obs = 108 -------------+------------------------------ F( 3, 104) = 1.31 Model | 1.31104125 3 .43701375 Prob > F = 0.2739 Residual | 34.5904876 104 .332600842 R-squared = 0.0365 -------------+------------------------------ Adj R-squared = 0.0087 Total | 35.9015288 107 .335528307 Root MSE = .57672 ------------------------------------------------------------------------------ D.lscrap | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- d89 | -.0962081 .1254469 -0.77 0.445 -.344974 .1525578 grant | D1 | -.222781 .1307423 -1.70 0.091 -.482048 .0364859 grant_1 | D1 | -.3512459 .2350848 -1.49 0.138 -.817428 .1149362 _cons | -.0906072 .0909695 -1.00 0.322 -.2710032 .0897888 ------------------------------------------------------------------------------
predict u, res
(363 missing values generated)
reg u l.u
Source | SS df MS Number of obs = 54 -------------+------------------------------ F( 1, 52) = 3.10 Model | .971328577 1 .971328577 Prob > F = 0.0844 Residual | 16.3125173 52 .313702256 R-squared = 0.0562 -------------+------------------------------ Adj R-squared = 0.0380 Total | 17.2838459 53 .3261103 Root MSE = .56009 ------------------------------------------------------------------------------ u | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- u |
L1 | .2369063 .1346333 1.76 0.084 -.0332551 .5070678
_cons | 3.30e-10 .0762188 0.00 1.000 -.1529441 .1529442 ------------------------------------------------------------------------------

We Need Your Support

Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks