-------------
      name:  <unnamed>
       log:  /Users/baum/Dropbox/baum/EC 327 S2013/327arch.smcl
  log type:  smcl
 opened on:  18 Mar 2013, 13:26:02

. // 327arch  EC327 S2013
. webuse wpi1,clear

. g t2 = t^2

. label var t Quarter

. tsline D.ln_wpi, ti(delta log WPI)

. graph export a0.pdf, replace
(file /Users/baum/Dropbox/baum/EC 327 S2013/a0.pdf written in PDF format)

. arch D.ln_wpi t t2, arch(1/3) nolog

ARCH family regression

Sample: 1960q2 - 1990q4                            Number of obs   =       123
Distribution: Gaussian                             Wald chi2(2)    =     13.72
Log likelihood =  384.7913                         Prob > chi2     =    0.0010

-------------+----------------------------------------------------------------
             |                 OPG
     D.ln_wpi |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
ln_wpi       |
           t |    .0004825    .0001345      3.59    0.000      .0002189      .000746
          t2 |   -3.27e-06    9.98e-07     -3.27    0.001     -5.22e-06    -1.31e-06
       _cons |   -.0041354    .0037849     -1.09    0.275     -.0115537     .0032828
-------------+----------------------------------------------------------------
ARCH         |
        arch |
         L1. |    .3154317    .1925627      1.64    0.101     -.0619841     .6928476
         L2. |    .3066475    .1721862      1.78    0.075     -.0308312     .6441262
         L3. |    .0495786     .113572      0.44    0.662     -.1730185     .2721756
             |
       _cons |    .0000521    7.49e-06      6.96    0.000      .0000374     .0000667
-------------+----------------------------------------------------------------

. predict double a1, var

. tsline a1, ti(ARCH(3) conditional variance)

. graph export a1.pdf, replace
(file /Users/baum/Dropbox/baum/EC 327 S2013/a1.pdf written in PDF format)

. arch D.ln_wpi t t2, arch(1/2) garch(1) nolog

ARCH family regression

Sample: 1960q2 - 1990q4                            Number of obs   =       123
Distribution: Gaussian                             Wald chi2(2)    =     13.35
Log likelihood =  384.7846                         Prob > chi2     =    0.0013

-------------+----------------------------------------------------------------
             |                 OPG
     D.ln_wpi |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
ln_wpi       |
           t |    .0004775    .0001353      3.53    0.000      .0002124     .0007426
          t2 |   -3.23e-06    1.00e-06     -3.21    0.001     -5.20e-06    -1.26e-06
       _cons |   -.0040632    .0037916     -1.07    0.284     -.0114946     .0033681
-------------+----------------------------------------------------------------
ARCH         |
        arch |
         L1. |    .3194581    .1908863      1.67    0.094     -.0546721     .6935883
         L2. |    .2770548    .2799854      0.99    0.322     -.2717066     .8258162
             |
       garch |
         L1. |     .114156    .3592895      0.32    0.751     -.5900384     .8183505
             |
       _cons |    .0000462    .0000213      2.17    0.030      4.40e-06     .0000879
-------------+----------------------------------------------------------------

. predict double a2, var

. tsline a2, ti(GARCH(2,1) conditional variance)

. graph export a2.pdf, replace
(file /Users/baum/Dropbox/baum/EC 327 S2013/a2.pdf written in PDF format)

. arch D.ln_wpi, ar(1) ma(1 4) arch(1) garch(1) archm dist(t) nolog

ARCH family regression -- ARMA disturbances

Sample: 1960q2 - 1990q4                            Number of obs   =       123
Distribution: t                                    Wald chi2(4)    =    139.83
Log likelihood =  403.9809                         Prob > chi2     =    0.0000

-------------+----------------------------------------------------------------
             |                 OPG
     D.ln_wpi |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
ln_wpi       |
       _cons |    .0058501    .0031999      1.83    0.068     -.0004216     .0121218
-------------+----------------------------------------------------------------
ARCHM        |
      sigma2 |    7.598198    29.54179      0.26    0.797     -50.30265     65.49904
-------------+----------------------------------------------------------------
ARMA         |
          ar |
         L1. |    .7563752    .1061037      7.13    0.000      .5484158     .9643346
             |
          ma |
         L1. |    -.311195    .1452882     -2.14    0.032     -.5959546    -.0264353
         L4. |    .2325189    .1026414      2.27    0.023      .0313454     .4336924
-------------+----------------------------------------------------------------
ARCH         |
        arch |
         L1. |    .2675286    .1704146      1.57    0.116      -.066478     .6015351
             |
       garch |
         L1. |    .6933458    .1541304      4.50    0.000      .3912557     .9954359
             |
       _cons |    8.24e-06    7.75e-06      1.06    0.288     -6.95e-06     .0000234
-------------+----------------------------------------------------------------
     /lndfm2 |    1.437649    .6495163      2.21    0.027        .16462     2.710677
-------------+----------------------------------------------------------------
           df |   6.210783    2.734972                    3.178945     17.03946
-------------+----------------------------------------------------------------

. predict double a3, var

. tsline a3, ti("GARCH(1,1)-M conditional variance, t errors")

. graph export a3.pdf, replace
(file /Users/baum/Dropbox/baum/EC 327 S2013/a3.pdf written in PDF format)

. label var a1 "ARCH(3)"

. label var a3 "GARCH(1,1)-M"

. tsline a1 a3, scheme(s2mono)

. graph export a4.pdf,replace
(file /Users/baum/Dropbox/baum/EC 327 S2013/a4.pdf written in PDF format)

. log close
      name:  <unnamed>
       log:  /Users/baum/Dropbox/baum/EC 327 S2013/327arch.smcl
  log type:  smcl
 closed on:  18 Mar 2013, 13:26:20
-------------