INTRODUCTORY ECONOMETRICS – REPLICATING EXAMPLES

Chapter 5 – Examples

------------------------------------------------------------------------
      name:  SN
       log:  ~Wooldridge\intro-econx\iexample5.smcl
  log type:  smcl
 opened on:   6 Jan 2019, 23:50:42
**********************************************
. * Solomon Negash - Replicating Examples
. * Wooldridge (2016). Introductory Econometrics: A Modern Approach. 6th ed.  
. * STATA Program, version 15.1. 

. * Chapter 5  - Multiple Regression Analysis: OLS Asymptotics 
. * Computer Exercises (Examples)
. ******************** SETUP *********************

*Example5.1. N/A
.   
*Example5.2. Birth weight equaiton, Standar Errors.
. u bwght.dta, clear
. egen id=seq()
. sum id
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          id |      1,388       694.5    400.8254          1       1388

. eststo: qui reg lbwght cigs lfaminc if id<=694
(est1 stored)
. eststo: qui reg lbwght cigs lfaminc
(est2 stored)
. estout *, cells(b(star fmt(3)) se(par fmt(5))) stats(r2_a N, fmt(%9.3f %9.0g) label
> s(R-squared)) varlabels(_cons Constant)
--------------------------------------------
                     est1            est2   
                     b/se            b/se   
--------------------------------------------
cigs               -0.005***       -0.004***
                (0.00133)       (0.00086)   
lfaminc             0.019*          0.016** 
                (0.00819)       (0.00558)   
Constant            4.706***        4.719***
                (0.02705)       (0.01824)   
--------------------------------------------
R-squared           0.027           0.024   
N                     694            1388   
--------------------------------------------
. est clear

*Problem5.3 Economic model of crime
. u crime1.dta, clear
. *Test using F-statistic
. reg narr86 pcnv avgsen tottime ptime86 qemp86

      Source |       SS           df       MS      Number of obs   =     2,725
-------------+----------------------------------   F(5, 2719)      =     24.29
       Model |  85.9532425         5  17.1906485   Prob > F        =    0.0000
    Residual |  1924.39391     2,719  .707757967   R-squared       =    0.0428
-------------+----------------------------------   Adj R-squared   =    0.0410
       Total |  2010.34716     2,724  .738012906   Root MSE        =    .84128
------------------------------------------------------------------------------
      narr86 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        pcnv |  -.1512246    .040855    -3.70   0.000    -.2313346   -.0711145
      avgsen |  -.0070487   .0124122    -0.57   0.570     -.031387    .0172897
     tottime |   .0120953   .0095768     1.26   0.207    -.0066833     .030874
     ptime86 |  -.0392585   .0089166    -4.40   0.000    -.0567425   -.0217745
      qemp86 |  -.1030909   .0103972    -9.92   0.000    -.1234782   -.0827037
       _cons |   .7060607   .0331524    21.30   0.000     .6410542    .7710671
------------------------------------------------------------------------------
. test avgsen tottime 
 ( 1)  avgsen = 0
 ( 2)  tottime = 0
       F(  2,  2719) =    2.03
            Prob > F =    0.1310

. *Test using LM statistic
. reg narr86 pcnv ptime86 qemp86 
      Source |       SS           df       MS      Number of obs   =     2,725
-------------+----------------------------------   F(3, 2721)      =     39.10
       Model |  83.0741941         3   27.691398   Prob > F        =    0.0000
    Residual |  1927.27296     2,721  .708295833   R-squared       =    0.0413
-------------+----------------------------------   Adj R-squared   =    0.0403
       Total |  2010.34716     2,724  .738012906   Root MSE        =     .8416
------------------------------------------------------------------------------
      narr86 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        pcnv |  -.1499274   .0408653    -3.67   0.000    -.2300576   -.0697973
     ptime86 |  -.0344199    .008591    -4.01   0.000    -.0512655   -.0175744
      qemp86 |   -.104113   .0103877   -10.02   0.000    -.1244816   -.0837445
       _cons |   .7117715   .0330066    21.56   0.000      .647051     .776492
------------------------------------------------------------------------------

. predict ur, residual //residuals from the restricted model
. reg ur pcnv avgsen tottime ptime86 qemp86
      Source |       SS           df       MS      Number of obs   =     2,725
-------------+----------------------------------   F(5, 2719)      =      0.81
       Model |  2.87904835         5  .575809669   Prob > F        =    0.5398
    Residual |  1924.39392     2,719  .707757969   R-squared       =    0.0015
-------------+----------------------------------   Adj R-squared   =   -0.0003
       Total |  1927.27297     2,724  .707515773   Root MSE        =    .84128
------------------------------------------------------------------------------
          ur |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        pcnv |  -.0012971    .040855    -0.03   0.975    -.0814072    .0788129
      avgsen |  -.0070487   .0124122    -0.57   0.570     -.031387    .0172897
     tottime |   .0120953   .0095768     1.26   0.207    -.0066833     .030874
     ptime86 |  -.0048386   .0089166    -0.54   0.587    -.0223226    .0126454
      qemp86 |   .0010221   .0103972     0.10   0.922    -.0193652    .0214093
       _cons |  -.0057108   .0331524    -0.17   0.863    -.0707173    .0592956
------------------------------------------------------------------------------

. display as text "N * R-quared = " as result 2725*0.0015
N * R-squared = 4.0875

. log close
      name:  SN
       log:  ~Wooldridge\intro-econx\iexample5.smcl
  log type:  smcl
 closed on:   6 Jan 2019, 23:50:42
----------------------------------------------------------------------------




Recent
Comments

Archives

RSS Solomon Negash

  • Al-Shabaab’s Attack in Ethiopia: One-off Incursion or Persistent Threat? 2022-09-15
    JamesTown.Org |  Terrorism Monitor Volume: 20 Issue: 17 Ethiopian forces in July contained and repulsed an attack conducted in the eastern part of the country by Somalia-based al-Shabaab. Fighters from the militant group entered from southwestern Somalia and targeted four border towns in Ethiopia’s Somali regional state known as Ogaden Region. The estimated 500 al-Shabaab […]
    Solomon
  • IPIS Briefing September 2021 – Ethiopia-Tigray Conflict 2021-10-30
    Source: IPIS Briefing September 2021 The IPIS briefing offers a selection of articles, news and updates on natural resources, armed conflict, Business & Human Rights and arms trade. Every month, an editorial and related publications shed a light on a specific topic in IPIS’ areas of research. State-Sponsored Cover-Up of the War on Tigray | September 30, 2021 […]
    Solomon
  • IPIS Briefing August 2021 – Ethiopia-Tigray Conflict 2021-09-19
    Source: IPIS Briefing August 2021 The IPIS briefing offers a selection of articles, news and updates on natural resources, armed conflict, Business & Human Rights and arms trade. Every month, an editorial and related publications shed a light on a specific topic in IPIS’ areas of research. U.S. Response To The Human Rights Crisis In Ethiopia’s […]
    Solomon
  • IPIS Briefing June/July 2021 – Ethiopia-Tigray Conflict 2021-09-19
    Source: IPIS Briefing June/July 2021 The IPIS briefing offers a selection of articles, news and updates on natural resources, armed conflict, Business & Human Rights and arms trade. Every month, an editorial and related publications shed a light on a specific topic in IPIS’ areas of research.  Ethiopia accuses international community of ‘double standards’ in Tigray […]
    Solomon
  • IPIS Briefing May 2021 – Ethiopia-Tigray Conflict 2021-06-08
    Source: IPIS Briefing May 2021: “Ethiopia Tigray crisis – Warnings of genocide and famine” The IPIS briefing offers a selection of articles, news and updates on natural resources, armed conflict, Business & Human Rights and arms trade. Every month, an editorial and related publications shed a light on a specific topic in IPIS’ areas of research. […]
    Solomon
  • Ethiopia: Contemplating Elections and the Prospects for Peaceful Reform 2021-05-14
    Source: USIP  April 29, 2021 |  Amid ongoing violence across the country, the vote may offer opportunities to support political dialogue and decrease polarization. Ethiopia is approaching parliamentary elections on June 5. This will be the first vote since the process of reform launched in 2018 by Prime Minister Abiy Ahmed, and the stakes are […]
    Solomon
  • IPIS Briefing April 2021 – Ethiopia-Tigray Conflict 2021-05-14
    Source: IPIS Briefing April 2021: “In Tigray, Sexual Violence Has Become A Weapon Of War” The IPIS briefing offers a selection of articles, news and updates on natural resources, armed conflict, Business & Human Rights and arms trade. Every month, an editorial and related publications shed a light on a specific topic in IPIS’ areas […]
    Solomon
  • IPIS Briefing March 2021 – Ethiopia-Tigray Conflict 2021-04-10
    Source: IPIS Briefing March 2021 Ethiopian police arrest 359 for suspected murder and illicit arms trade | 29 March 2021 | Xinhua The Ethiopian Federal Police Commission disclosed the arrest of 359 people on suspicion of murder, illicit arms trade, money laundering and auto theft, the state-affiliated Fana Broadcasting Corporate reported Sunday. Scale of Tigray horror […]
    Solomon
  • FP – The U.N. Must End the Horrors of Ethiopia’s Tigray War 2021-03-08
    Foreign Policy | Recent human rights investigations confirm the atrocities that journalists reported in November. A strong multilateral push can force an Eritrean withdrawal and put the region on the path to peace. In November 2020, as war broke out in Ethiopia’s northern Tigray region, the scale of the suffering was already apparent to anyone […]
    Solomon