{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}E:\MEP\ejercicio3.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}19 Apr 2017, 20:59:23

{com}. do "C:\Users\PCGUEST\AppData\Local\Temp\STD00000000.tmp"
{txt}
{com}. clear
{txt}
{com}. 
{txt}end of do-file

{com}. do "C:\Users\PCGUEST\AppData\Local\Temp\STD00000000.tmp"
{txt}
{com}. clear
{txt}
{com}.  import excel "E:\MEP\Ejercicio 3_1 2017.xls", sheet("Hoja1") firstrow
{res}{txt}
{com}.  log using "E:\MEP\ejercicio3bis.smcl"
{err}log file already open
{txt}{search r(604):r(604);}

end of do-file

{search r(604):r(604);}

{com}. clear all

. do "C:\Users\PCGUEST\AppData\Local\Temp\STD00000000.tmp"
{txt}
{com}. clear all
{txt}
{com}.  import excel "E:\MEP\Ejercicio 3_1 2017.xls", sheet("Hoja1") firstrow
{res}{txt}
{com}.  log using "E:\MEP\ejercicio3bis.smcl"
{err}log file already open
{txt}{search r(604):r(604);}

end of do-file

{search r(604):r(604);}

{com}. do "C:\Users\PCGUEST\AppData\Local\Temp\STD00000000.tmp"
{txt}
{com}. clear all
{txt}
{com}.  import excel "E:\MEP\Ejercicio 3_1 2017.xls", sheet("Hoja1") firstrow
{res}{txt}
{com}.  *log using "E:\MEP\ejercicio3bis.smcl"
.  gen lcgas=log(cgas)
{txt}(3 missing values generated)

{com}.  gen lpcio=log(pcio)
{txt}(3 missing values generated)

{com}.  gen ltemp=log(temp)
{txt}(3 missing values generated)

{com}. 
{txt}end of do-file

{com}. do "C:\Users\PCGUEST\AppData\Local\Temp\STD00000000.tmp"
{txt}
{com}. reg lcgas lpcio ltemp

      {txt}Source {c |}       SS       df       MS              Number of obs ={res}      48
{txt}{hline 13}{char +}{hline 30}           F(  2,    45) ={res}  112.23
    {txt}   Model {char |} {res} 5.97717674     2  2.98858837           {txt}Prob > F      = {res} 0.0000
    {txt}Residual {char |} {res} 1.19826798    45  .026628177           {txt}R-squared     = {res} 0.8330
{txt}{hline 13}{char +}{hline 30}           Adj R-squared = {res} 0.8256
    {txt}   Total {char |} {res} 7.17544472    47  .152669037           {txt}Root MSE      = {res} .16318

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}       lcgas{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}lpcio {c |}{col 14}{res}{space 2} -1.02787{col 26}{space 2} .1103333{col 37}{space 1}   -9.32{col 46}{space 3}0.000{col 54}{space 4}-1.250093{col 67}{space 3}-.8056474
{txt}{space 7}ltemp {c |}{col 14}{res}{space 2}-.6765427{col 26}{space 2} .0549134{col 37}{space 1}  -12.32{col 46}{space 3}0.000{col 54}{space 4}-.7871439{col 67}{space 3}-.5659414
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 8.330494{col 26}{space 2} .4784619{col 37}{space 1}   17.41{col 46}{space 3}0.000{col 54}{space 4} 7.366822{col 67}{space 3} 9.294165
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. 
{txt}end of do-file

{com}. reg lcgas lpcio d2 d3 d4

      {txt}Source {c |}       SS       df       MS              Number of obs ={res}      48
{txt}{hline 13}{char +}{hline 30}           F(  4,    43) ={res}   77.99
    {txt}   Model {char |} {res} 6.30618116     4  1.57654529           {txt}Prob > F      = {res} 0.0000
    {txt}Residual {char |} {res} .869263559    43  .020215432           {txt}R-squared     = {res} 0.8789
{txt}{hline 13}{char +}{hline 30}           Adj R-squared = {res} 0.8676
    {txt}   Total {char |} {res} 7.17544472    47  .152669037           {txt}Root MSE      = {res} .14218

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}       lcgas{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}lpcio {c |}{col 14}{res}{space 2}-1.093028{col 26}{space 2} .0967056{col 37}{space 1}  -11.30{col 46}{space 3}0.000{col 54}{space 4}-1.288053{col 67}{space 3}-.8980025
{txt}{space 10}d2 {c |}{col 14}{res}{space 2}-.4532205{col 26}{space 2} .0582794{col 37}{space 1}   -7.78{col 46}{space 3}0.000{col 54}{space 4} -.570752{col 67}{space 3} -.335689
{txt}{space 10}d3 {c |}{col 14}{res}{space 2}-.7653251{col 26}{space 2} .0584843{col 37}{space 1}  -13.09{col 46}{space 3}0.000{col 54}{space 4}-.8832699{col 67}{space 3}-.6473803
{txt}{space 10}d4 {c |}{col 14}{res}{space 2}-.0954411{col 26}{space 2}  .058217{col 37}{space 1}   -1.64{col 46}{space 3}0.108{col 54}{space 4}-.2128469{col 67}{space 3} .0219647
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 7.428041{col 26}{space 2} .4044053{col 37}{space 1}   18.37{col 46}{space 3}0.000{col 54}{space 4}  6.61248{col 67}{space 3} 8.243602
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{com}. help postest

. predict res2, resid
{txt}(3 missing values generated)

{com}. gen trend=_n

. twoway (scatter res2 trend)
{res}
{com}. estat dwatson
{err}time variable not set, use -tsset varname ...-
{txt}{search r(111):r(111);}

{com}. do "C:\Users\PCGUEST\AppData\Local\Temp\STD00000000.tmp"
{txt}
{com}. clear all
{txt}
{com}.  import excel "E:\MEP\Ejercicio 3_1 2017.xls", sheet("Hoja1") firstrow
{res}{txt}
{com}.  *log using "E:\MEP\ejercicio3bis.smcl"
.  gen trend=_n
{txt}
{com}.  tsset trend
{res}{txt}{col 9}time variable:  {res}{col 25}trend, 1 to 51
{txt}{col 17}delta:  {res}1 unit
{txt}
{com}.  gen lcgas=log(cgas)
{txt}(3 missing values generated)

{com}.  gen lpcio=log(pcio)
{txt}(3 missing values generated)

{com}.  gen ltemp=log(temp)
{txt}(3 missing values generated)

{com}. reg lcgas lpcio ltemp

      {txt}Source {c |}       SS       df       MS              Number of obs ={res}      48
{txt}{hline 13}{char +}{hline 30}           F(  2,    45) ={res}  112.23
    {txt}   Model {char |} {res} 5.97717674     2  2.98858837           {txt}Prob > F      = {res} 0.0000
    {txt}Residual {char |} {res} 1.19826798    45  .026628177           {txt}R-squared     = {res} 0.8330
{txt}{hline 13}{char +}{hline 30}           Adj R-squared = {res} 0.8256
    {txt}   Total {char |} {res} 7.17544472    47  .152669037           {txt}Root MSE      = {res} .16318

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}       lcgas{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}lpcio {c |}{col 14}{res}{space 2} -1.02787{col 26}{space 2} .1103333{col 37}{space 1}   -9.32{col 46}{space 3}0.000{col 54}{space 4}-1.250093{col 67}{space 3}-.8056474
{txt}{space 7}ltemp {c |}{col 14}{res}{space 2}-.6765427{col 26}{space 2} .0549134{col 37}{space 1}  -12.32{col 46}{space 3}0.000{col 54}{space 4}-.7871439{col 67}{space 3}-.5659414
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 8.330494{col 26}{space 2} .4784619{col 37}{space 1}   17.41{col 46}{space 3}0.000{col 54}{space 4} 7.366822{col 67}{space 3} 9.294165
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. reg lcgas lpcio d2 d3 d4

      {txt}Source {c |}       SS       df       MS              Number of obs ={res}      48
{txt}{hline 13}{char +}{hline 30}           F(  4,    43) ={res}   77.99
    {txt}   Model {char |} {res} 6.30618116     4  1.57654529           {txt}Prob > F      = {res} 0.0000
    {txt}Residual {char |} {res} .869263559    43  .020215432           {txt}R-squared     = {res} 0.8789
{txt}{hline 13}{char +}{hline 30}           Adj R-squared = {res} 0.8676
    {txt}   Total {char |} {res} 7.17544472    47  .152669037           {txt}Root MSE      = {res} .14218

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}       lcgas{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}lpcio {c |}{col 14}{res}{space 2}-1.093028{col 26}{space 2} .0967056{col 37}{space 1}  -11.30{col 46}{space 3}0.000{col 54}{space 4}-1.288053{col 67}{space 3}-.8980025
{txt}{space 10}d2 {c |}{col 14}{res}{space 2}-.4532205{col 26}{space 2} .0582794{col 37}{space 1}   -7.78{col 46}{space 3}0.000{col 54}{space 4} -.570752{col 67}{space 3} -.335689
{txt}{space 10}d3 {c |}{col 14}{res}{space 2}-.7653251{col 26}{space 2} .0584843{col 37}{space 1}  -13.09{col 46}{space 3}0.000{col 54}{space 4}-.8832699{col 67}{space 3}-.6473803
{txt}{space 10}d4 {c |}{col 14}{res}{space 2}-.0954411{col 26}{space 2}  .058217{col 37}{space 1}   -1.64{col 46}{space 3}0.108{col 54}{space 4}-.2128469{col 67}{space 3} .0219647
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 7.428041{col 26}{space 2} .4044053{col 37}{space 1}   18.37{col 46}{space 3}0.000{col 54}{space 4}  6.61248{col 67}{space 3} 8.243602
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. estat dwatson

{txt}Durbin-Watson d-statistic({res}  5{txt},{res}    48{txt}) = {res} .6110564
{txt}
{com}. *twoway (scatter res2 trend)
. 
. 
{txt}end of do-file

{com}. do "C:\Users\PCGUEST\AppData\Local\Temp\STD00000000.tmp"
{txt}
{com}. clear all
{txt}
{com}.  import excel "E:\MEP\Ejercicio 3_1 2017.xls", sheet("Hoja1") firstrow
{res}{txt}
{com}.  *log using "E:\MEP\ejercicio3bis.smcl"
.  gen trend=_n
{txt}
{com}.  tsset trend
{res}{txt}{col 9}time variable:  {res}{col 25}trend, 1 to 51
{txt}{col 17}delta:  {res}1 unit
{txt}
{com}.  gen lcgas=log(cgas)
{txt}(3 missing values generated)

{com}.  gen lpcio=log(pcio)
{txt}(3 missing values generated)

{com}.  gen ltemp=log(temp)
{txt}(3 missing values generated)

{com}. reg lcgas lpcio ltemp

      {txt}Source {c |}       SS       df       MS              Number of obs ={res}      48
{txt}{hline 13}{char +}{hline 30}           F(  2,    45) ={res}  112.23
    {txt}   Model {char |} {res} 5.97717674     2  2.98858837           {txt}Prob > F      = {res} 0.0000
    {txt}Residual {char |} {res} 1.19826798    45  .026628177           {txt}R-squared     = {res} 0.8330
{txt}{hline 13}{char +}{hline 30}           Adj R-squared = {res} 0.8256
    {txt}   Total {char |} {res} 7.17544472    47  .152669037           {txt}Root MSE      = {res} .16318

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}       lcgas{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}lpcio {c |}{col 14}{res}{space 2} -1.02787{col 26}{space 2} .1103333{col 37}{space 1}   -9.32{col 46}{space 3}0.000{col 54}{space 4}-1.250093{col 67}{space 3}-.8056474
{txt}{space 7}ltemp {c |}{col 14}{res}{space 2}-.6765427{col 26}{space 2} .0549134{col 37}{space 1}  -12.32{col 46}{space 3}0.000{col 54}{space 4}-.7871439{col 67}{space 3}-.5659414
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 8.330494{col 26}{space 2} .4784619{col 37}{space 1}   17.41{col 46}{space 3}0.000{col 54}{space 4} 7.366822{col 67}{space 3} 9.294165
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. predict res1, resid
{txt}(3 missing values generated)

{com}. reg lcgas lpcio d2 d3 d4

      {txt}Source {c |}       SS       df       MS              Number of obs ={res}      48
{txt}{hline 13}{char +}{hline 30}           F(  4,    43) ={res}   77.99
    {txt}   Model {char |} {res} 6.30618116     4  1.57654529           {txt}Prob > F      = {res} 0.0000
    {txt}Residual {char |} {res} .869263559    43  .020215432           {txt}R-squared     = {res} 0.8789
{txt}{hline 13}{char +}{hline 30}           Adj R-squared = {res} 0.8676
    {txt}   Total {char |} {res} 7.17544472    47  .152669037           {txt}Root MSE      = {res} .14218

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}       lcgas{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}lpcio {c |}{col 14}{res}{space 2}-1.093028{col 26}{space 2} .0967056{col 37}{space 1}  -11.30{col 46}{space 3}0.000{col 54}{space 4}-1.288053{col 67}{space 3}-.8980025
{txt}{space 10}d2 {c |}{col 14}{res}{space 2}-.4532205{col 26}{space 2} .0582794{col 37}{space 1}   -7.78{col 46}{space 3}0.000{col 54}{space 4} -.570752{col 67}{space 3} -.335689
{txt}{space 10}d3 {c |}{col 14}{res}{space 2}-.7653251{col 26}{space 2} .0584843{col 37}{space 1}  -13.09{col 46}{space 3}0.000{col 54}{space 4}-.8832699{col 67}{space 3}-.6473803
{txt}{space 10}d4 {c |}{col 14}{res}{space 2}-.0954411{col 26}{space 2}  .058217{col 37}{space 1}   -1.64{col 46}{space 3}0.108{col 54}{space 4}-.2128469{col 67}{space 3} .0219647
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 7.428041{col 26}{space 2} .4044053{col 37}{space 1}   18.37{col 46}{space 3}0.000{col 54}{space 4}  6.61248{col 67}{space 3} 8.243602
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. predict res2, resid
{txt}(3 missing values generated)

{com}. estat dwatson

{txt}Durbin-Watson d-statistic({res}  5{txt},{res}    48{txt}) = {res} .6110564
{txt}
{com}. *twoway (scatter res2 trend)
. 
. 
{txt}end of do-file

{com}. prais lcgas lpcio d2 d3 d4

{txt}Iteration 0:  rho = {res}0.0000
{txt}Iteration 1:  rho = {res}0.5995
{txt}Iteration 2:  rho = {res}0.6235
{txt}Iteration 3:  rho = {res}0.6275
{txt}Iteration 4:  rho = {res}0.6283
{txt}Iteration 5:  rho = {res}0.6284
{txt}Iteration 6:  rho = {res}0.6285
{txt}Iteration 7:  rho = {res}0.6285
{txt}Iteration 8:  rho = {res}0.6285
{txt}Iteration 9:  rho = {res}0.6285

{txt}Prais-Winsten AR(1) regression -- iterated estimates

      Source {c |}       SS       df       MS              Number of obs ={res}      48
{txt}{hline 13}{char +}{hline 30}           F(  4,    43) ={res}  132.92
    {txt}   Model {char |} {res} 6.07772046     4  1.51943012           {txt}Prob > F      = {res} 0.0000
    {txt}Residual {char |} {res}  .49153905    43  .011431141           {txt}R-squared     = {res} 0.9252
{txt}{hline 13}{char +}{hline 30}           Adj R-squared = {res} 0.9182
    {txt}   Total {char |} {res} 6.56925951    47  .139771479           {txt}Root MSE      = {res} .10692

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}       lcgas{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}lpcio {c |}{col 14}{res}{space 2}-.9737226{col 26}{space 2} .1651491{col 37}{space 1}   -5.90{col 46}{space 3}0.000{col 54}{space 4}-1.306778{col 67}{space 3}-.6406677
{txt}{space 10}d2 {c |}{col 14}{res}{space 2}-.4572743{col 26}{space 2} .0333442{col 37}{space 1}  -13.71{col 46}{space 3}0.000{col 54}{space 4}-.5245192{col 67}{space 3}-.3900293
{txt}{space 10}d3 {c |}{col 14}{res}{space 2} -.777721{col 26}{space 2} .0386838{col 37}{space 1}  -20.10{col 46}{space 3}0.000{col 54}{space 4}-.8557343{col 67}{space 3}-.6997078
{txt}{space 10}d4 {c |}{col 14}{res}{space 2}-.1244664{col 26}{space 2} .0333922{col 37}{space 1}   -3.73{col 46}{space 3}0.001{col 54}{space 4}-.1918082{col 67}{space 3}-.0571247
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 6.941128{col 26}{space 2} .6890318{col 37}{space 1}   10.07{col 46}{space 3}0.000{col 54}{space 4} 5.551563{col 67}{space 3} 8.330693
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
         rho {c |}  {res} .6284699
{txt}{hline 13}{c BT}{hline 64}
Durbin-Watson statistic (original)    {res}0.611056
{txt}Durbin-Watson statistic (transformed) {res}1.526952

{com}. clear

. exit, clear
