Solomon Negash
  • Selam!
  • Books
  • Codes
  • About
  • Click to open the search input field Click to open the search input field Search
  • Menu Menu

WOOLDRIDGE CROSS-SECTION & PANEL DATA ECONOMETRICS– EXAMPLES

CHAPTER 10 – Panel Data Models

-------------------------------------------------------------------------------
      name:  SN
       log:  myReplications\iiexample10
  log type:  smcl
 opened on:  11 Jun 2019, 14:11:48
. **********************************************
. * Solomon Negash - Examples
. * Wooldridge (2016). Economic Analysis of Cross-Section and Panel Data. 2nd ed.  
. * STATA Program, version 15.1. 

. * Chapter 10  - Basic Linear Unobserved Effects Panel Data Models
. * Computer Exercises (Problems)
. ******************** SETUP *********************

. // Example 10.1 NA
. // Example 10.2 NA
. // Example 10.3 NA
. // Example 10.4 (RE Estimation of the Effects of Job Training Grants):
. bcuse jtrain, clear nodesc
. xtset fcode year
       panel variable:  fcode (strongly balanced)
        time variable:  year, 1987 to 1989
                delta:  1 unit
. xtreg lscrap d88 d89 union grant grant_1, re
Random-effects GLS regression                   Number of obs     =        162
Group variable: fcode                           Number of groups  =         54
R-sq:                                           Obs per group:
     within  = 0.2006                                         min =          3
     between = 0.0206                                         avg =        3.0
     overall = 0.0361                                         max =          3
                                                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    -.3073936    .1204898
         d89 |  -.2698336   .1316496    -2.05   0.040     -.527862   -.0118052
       union |   .5478021    .410625     1.33   0.182    -.2570081    1.352612
       grant |  -.2146961   .1477838    -1.45   0.146     -.504347    .0749548
     grant_1 |  -.3770697   .2053516    -1.84   0.066    -.7795514     .025412
       _cons |   .4148333   .2434322     1.70   0.088    -.0622851    .8919517
-------------+----------------------------------------------------------------
     sigma_u |  1.3900287
     sigma_e |   .4977442
         rho |  .88634984   (fraction of variance due to u_i)
------------------------------------------------------------------------------
. test grant grant_1
 ( 1)  grant = 0
 ( 2)  grant_1 = 0
           chi2(  2) =    3.66
         Prob > chi2 =    0.1601

. // Example 10.5 (FE Estimation of the Effects of Job Training Grants):
. xtreg lscrap d88 d89 union grant grant_1, fe
note: union omitted because of collinearity
Fixed-effects (within) regression               Number of obs     =        162
Group variable: fcode                           Number of groups  =         54
R-sq:                                           Obs per group:
     within  = 0.2010                                         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    -.2973089    .1368776
         d89 |  -.2472028   .1332183    -1.86   0.066    -.5113797     .016974
       union |          0  (omitted)
       grant |  -.2523149    .150629    -1.68   0.097    -.5510178     .046388
     grant_1 |  -.4215895      .2102    -2.01   0.047    -.8384239   -.0047551
       _cons |    .597434   .0677344     8.82   0.000     .4631142    .7317539
-------------+----------------------------------------------------------------
     sigma_u |   1.438982
     sigma_e |   .4977442
         rho |  .89313867   (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(53, 104) = 24.66                    Prob > F = 0.0000
. test grant grant_1
 ( 1)  grant = 0
 ( 2)  grant_1 = 0
       F(  2,   104) =    2.23
            Prob > F =    0.1127

. // Example 10.5 (Continued)
. xtreg lscrap d88 d89 union grant grant_1, fe r 
note: union omitted because of collinearity
Fixed-effects (within) regression               Number of obs     =        162
Group variable: fcode                           Number of groups  =         54
R-sq:                                           Obs per group:
     within  = 0.2010                                         min =          3
     between = 0.0079                                         avg =        3.0
     overall = 0.0068                                         max =          3
                                                F(4,53)           =       7.07
corr(u_i, Xb)  = -0.0714                        Prob > F          =     0.0001
                                 (Std. Err. adjusted for 54 clusters in fcode)
------------------------------------------------------------------------------
             |               Robust
      lscrap |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         d88 |  -.0802157   .0978408    -0.82   0.416    -.2764594    .1160281
         d89 |  -.2472028   .1967819    -1.26   0.215    -.6418974    .1474917
       union |          0  (omitted)
       grant |  -.2523149   .1434399    -1.76   0.084    -.5400188     .035389
     grant_1 |  -.4215895   .2824604    -1.49   0.141    -.9881333    .1449543
       _cons |    .597434   .0638746     9.35   0.000     .4693177    .7255503
-------------+----------------------------------------------------------------
     sigma_u |   1.438982
     sigma_e |   .4977442
         rho |  .89313867   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. // Example 10.6 (FD Estimation of the Effects of Job Training Grants)
. reg d.lscrap d89 d.grant d.grant_1
      Source |       SS           df       MS      Number of obs   =       108
-------------+----------------------------------   F(3, 104)       =      1.31
       Model |  1.31104171         3  .437013902   Prob > F        =    0.2739
    Residual |  34.5904836       104  .332600804   R-squared       =    0.0365
-------------+----------------------------------   Adj R-squared   =    0.0087
       Total |  35.9015253       107  .335528274   Root MSE        =    .57672
------------------------------------------------------------------------------
    D.lscrap |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         d89 |  -.0962082   .1254469    -0.77   0.445    -.3449741    .1525577
             |
       grant |
         D1. |  -.2227811   .1307423    -1.70   0.091     -.482048    .0364859
             |
     grant_1 |
         D1. |  -.3512459   .2350848    -1.49   0.138     -.817428    .1149361
             |
       _cons |  -.0906072   .0909695    -1.00   0.322    -.2710031    .0897888
------------------------------------------------------------------------------
. test d.grant d.grant_1
 ( 1)  D.grant = 0
 ( 2)  D.grant_1 = 0
       F(  2,   104) =    1.53
            Prob > F =    0.2215
. reg d.lscrap d89 d.grant d.grant_1, robust
Linear regression                               Number of obs     =        108
                                                F(3, 104)         =       1.95
                                                Prob > F          =     0.1254
                                                R-squared         =     0.0365
                                                Root MSE          =     .57672
------------------------------------------------------------------------------
             |               Robust
    D.lscrap |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         d89 |  -.0962082   .1284682    -0.75   0.456    -.3509654    .1585491
             |
       grant |
         D1. |  -.2227811   .1238652    -1.80   0.075    -.4684103    .0228482
             |
     grant_1 |
         D1. |  -.3512459   .2477216    -1.42   0.159    -.8424871    .1399952
             |
       _cons |  -.0906072   .0846918    -1.07   0.287    -.2585543    .0773399
------------------------------------------------------------------------------

. //Example 10.6 (continued)
. reg d.lscrap d89 d.grant d.grant_1 
      Source |       SS           df       MS      Number of obs   =       108
-------------+----------------------------------   F(3, 104)       =      1.31
       Model |  1.31104171         3  .437013902   Prob > F        =    0.2739
    Residual |  34.5904836       104  .332600804   R-squared       =    0.0365
-------------+----------------------------------   Adj R-squared   =    0.0087
       Total |  35.9015253       107  .335528274   Root MSE        =    .57672
------------------------------------------------------------------------------
    D.lscrap |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         d89 |  -.0962082   .1254469    -0.77   0.445    -.3449741    .1525577
             |
       grant |
         D1. |  -.2227811   .1307423    -1.70   0.091     -.482048    .0364859
             |
     grant_1 |
         D1. |  -.3512459   .2350848    -1.49   0.138     -.817428    .1149361
             |
       _cons |  -.0906072   .0909695    -1.00   0.322    -.2710031    .0897888
------------------------------------------------------------------------------
. predict u, r
(363 missing values generated)
. g u_1 = u[_n-1]
(363 missing values generated)
. reg u u_1
      Source |       SS           df       MS      Number of obs   =        54
-------------+----------------------------------   F(1, 52)        =      3.10
       Model |  .971329776         1  .971329776   Prob > F        =    0.0844
    Residual |  16.3125141        52  .313702194   R-squared       =    0.0562
-------------+----------------------------------   Adj R-squared   =    0.0380
       Total |  17.2838438        53  .326110261   Root MSE        =    .56009
------------------------------------------------------------------------------
           u |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         u_1 |   .2369065   .1346333     1.76   0.084    -.0332549    .5070679
       _cons |   3.33e-09   .0762188     0.00   1.000    -.1529441    .1529441
------------------------------------------------------------------------------

. //Example 10.7 (Job Training Grants) 
. *See Example 10.4 above 

------------------------------------------------------------------------------
. log close 
      name:  SN
       log:  myReplications\iiexample10
  log type:  smcl
 closed on:  11 Jun 2019, 14:11:50
-------------------------------------------------------------------------------
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Popular
  • From Oslo to The Hague – The journey of Abiy Ahmed...November 7, 2020 - 3:06 pm
  • Reads Atlas Shrugged
    My top reads of 2023December 31, 2023 - 3:40 pm
  • የትግራይ ህዝብ እና የህውሓት ግኑኝነት...September 29, 2016 - 12:30 am
  • ጸበባን ቃልሲን ህዝቢ ትግራይ ከመይ...January 26, 2021 - 1:36 pm
  • ከምጽዓተ ኢትዮጵያ እንተርፍ ይሆን?...December 29, 2023 - 7:29 pm
  • Wooldridge chapter 4 – ExamplesJanuary 6, 2019 - 11:30 pm
  • IPIS Briefing March 2021 – Ethiopia-Tigray ConflictApril 10, 2021 - 7:03 pm
  • Spatial Mapping of Education DataDecember 24, 2018 - 12:01 am
  • ሶስቱ የጥፋት ፈረሶችና የኢትዮጵያ...November 12, 2020 - 5:48 pm
  • ትርጉም የለሽ ምጥ የለም!November 30, 2020 - 8:35 pm
  • መንግስት እና የህዝብ አስተዳደር –...March 5, 2017 - 2:19 am
  • በአዲስ አበባና በሌሎች ከተሞች የሚታዩ...February 8, 2019 - 3:23 pm
Recent
  • ጽምዶMarch 31, 2026 - 8:18 pm
  • ክሪቶ በፕላቶMarch 28, 2026 - 11:37 pm
  • ፍራንከንስታይን፥ አዲስ መፅሓፍ በገበያ...February 18, 2026 - 6:15 pm
  • My Top Reads of 2025December 15, 2025 - 4:31 pm
  • ሓንሳዕ ንደማመፅ እሞ!!October 18, 2025 - 6:16 pm
  • Great Ideas E04. Liberation, Then ReflectionOctober 10, 2025 - 6:54 pm
  • Great Ideas E03 – The Median Isn’t the MessageOctober 3, 2025 - 3:16 pm
  • ሃቅ ሃቁን ብቻ እናውራ ከተባለ ̷...October 1, 2025 - 11:55 pm
  • Great Ideas E02 – Great Scientific Ideas That Changed...September 26, 2025 - 1:30 pm
  • Great Ideas E01 – I, PencilSeptember 20, 2025 - 2:53 pm
  • My Replication Codes Project Gains Wider RecognitionSeptember 11, 2025 - 7:02 pm
  • Free GIS & Remote‑Sensing Toolkit 🌍April 18, 2025 - 9:18 pm
Comments
  • NATNAEL ENDALAMAW DERSHEየገብረህወት ባይከዳኝ መጥሃፍ መንግስት...November 20, 2025 - 5:40 pm by NATNAEL ENDALAMAW DERSHE
  • ሙለርትኽክል አለኻ ፀላኢኻን ፈታዊኻን ፈሊኻ...October 19, 2025 - 8:06 am by ሙለር
  • AwetThis is a very reflective essay about Tigray’s political...October 18, 2025 - 9:13 pm by Awet
  • Solomonሰላም ደረጀ ጽሁፉን እንዴት ማግኘት...April 19, 2025 - 8:32 pm by Solomon
  • ደረጀሶል የዶ/ር ተወልደ አርቲክል በሶፍት...April 19, 2025 - 7:35 pm by ደረጀ
  • Solomonእንኳዕ ሓቢሩ አብጽሓና!January 2, 2024 - 3:13 pm by Solomon
  • Solomonእንኳን አብሮ አደረሰን Babi!January 2, 2024 - 3:13 pm by Solomon
  • SolomonThank you Chombe, I wish you the same!January 2, 2024 - 3:12 pm by Solomon
  • Solomonአሰስ ብትል አንዳንዶቹን ኦንላይን...January 2, 2024 - 3:11 pm by Solomon
  • Brehaneእንኳዕ አብፅሓካ ሰሌ!January 2, 2024 - 2:46 am by Brehane
  • Babiሶል እንኳን አደረሰህ!January 1, 2024 - 7:34 am by Babi
  • ChombeThank you! All the best for 2024!December 31, 2023 - 9:03 pm by Chombe
©2026 - Solomon Negash
  • Home
  • Cons.Book
  • EthioData
  • Feeds
  • Contact
Link to: Wooldridge2 – Chapter 9 – Simultaneous Equations Models Link to: Wooldridge2 – Chapter 9 – Simultaneous Equations Models Wooldridge2 – Chapter 9 – Simultaneous Equations Models Link to: Reps: Wooldridge Introductory Econometrics – Examples. Link to: Reps: Wooldridge Introductory Econometrics – Examples. Reps: Wooldridge Introductory Econometrics – Examples.
Scroll to top Scroll to top Scroll to top