Lab 3 - Ekonometrika 2 (2012) - Time Series 1 (STATA)
Ekonometrika 2
Program S1 Ilmu Ekonomi FEUI
Maret 2012
Lab ke -3
Analisis Time Series 1
(STATA)
(STATA)
Gunakan data PHILLIPS.dta dengan deskripsi variable di PHILLIPS.txt.
. use “http://fmwww.bc.edu/ec-p/data/wooldridge/PHILLIPS.dta”
. *Lakukan set time data terlebih dahulu sebelum melakukan estimasi times series
. tsset year
time variable: year, 1948 to 1996
delta: 1 unit
SOAL A
- Estimasi persamaan statis kurva Phllips (1) dengan metode OLS:
inft=b0+b1unemt+ut (1)
. reg inf unem
Source | SS df MS Number of obs = 49
-------------+------------------------------ F( 1, 47) = 2.62
Model | 25.6369575 1 25.6369575 Prob > F = 0.1125
Residual | 460.61979 47 9.80042107 R-squared = 0.0527
-------------+------------------------------ Adj R-squared = 0.0326
Total | 486.256748 48 10.1303489 Root MSE = 3.1306
------------------------------------------------------------------------------
inf | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
unem | .4676257 .2891262 1.62 0.112 -.1140213 1.049273
_cons | 1.42361 1.719015 0.83 0.412 -2.034602 4.881822
------------------------------------------------------------------------------
- Jelaskan parameter-parameter yang diestimasi dari persamaan (1) (signifikansi, arah dan besaran)
Prob > F | R-squared | P>|t|
- Estimasi persamaan dinamik kurva Phillips (kurva Philips dengan asumsi angkapengangguran alamiah konstan) (2) dengan metode OLS
. reg cinf unem
Source | SS df MS Number of obs = 48
-------------+------------------------------ F( 1, 46) = 5.56
Model | 33.3829988 1 33.3829988 Prob > F = 0.0227
Residual | 276.30513 46 6.00663326 R-squared = 0.1078
-------------+------------------------------ Adj R-squared = 0.0884
Total | 309.688129 47 6.58910913 Root MSE = 2.4508
------------------------------------------------------------------------------
cinf | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
unem | -.5425869 .2301559 -2.36 0.023 -1.005867 -.079307
_cons | 3.030581 1.37681 2.20 0.033 .259206 5.801955
------------------------------------------------------------------------------
- Jelaskan parameter-parameter yang diestimasi dari persamaan (2) (signifikansi, arah dan besaran)
Prob > F | R-squared | P>|t|
- Bandingkan hasil regresi kedua persamaan di atas, model yang mana yang anda anggap sesuai untuk menjelaskan trade off antara inflasi dan pengangguran dalam jangka pendek? Jelaskan
. quietly reg inf unem
. estimates store inf
. quietly reg cinf unem
. estimates store cinf
. estimates table inf cinf, stat(N r2 r2_a aic bic) b(%7.4f) stfmt(%7.4g) star(0.1 0.05 0.01)
----------------------------------------
Variable | inf cinf
-------------+--------------------------
unem | 0.4676 -0.5426**
_cons | 1.4236 3.0306**
-------------+--------------------------
N | 49 48
r2 | .05272 .1078
r2_a | .03257 .0884
aic | 252.9 224.2
bic | 256.6 228
----------------------------------------
legend: * p<.1; ** p<.05; *** p<.01
- Estimasi persamaan dinamik kurva Phillips (kurva Philips dengan asumsi angka pengangguran merupakan fungsi dari angka pengangguran pada periode sebelumnya) (3) dengan metode OLS
cinf=q0+q1cunem+e (3)
. reg cinf cunem
Source | SS df MS Number of obs = 48
-------------+------------------------------ F( 1, 46) = 7.18
Model | 41.8221976 1 41.8221976 Prob > F = 0.0102
Residual | 267.865931 46 5.82317242 R-squared = 0.1350
-------------+------------------------------ Adj R-squared = 0.1162
Total | 309.688129 47 6.58910913 Root MSE = 2.4131
------------------------------------------------------------------------------
cinf | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
cunem | -.8421707 .3142509 -2.68 0.010 -1.474725 -.2096165
_cons | -.0781776 .3484621 -0.22 0.823 -.7795954 .6232401
------------------------------------------------------------------------------
- Jelaskan parameter-parameter yang diestimasi dari persamaan (2) (signifikansi, arah dan besaran)
Prob > F | R-squared | P>|t|
- Bandingkan hasil regresi persamaan (2) dan (3) di atas, model yang mana yang anda anggap sesuai dengan data? Jelaskan
. quietly reg cinf cunem
. estimates store cinf2
. estimates table cinf cinf2 , stat(N r2 r2_a aic bic) b(%7.4f) stfmt(%7.4g) star(0.1 0.05 0.01)
----------------------------------------
Variable | cinf cinf2
-------------+--------------------------
unem | -0.5426**
cunem | -0.8422**
_cons | 3.0306** -0.0782
-------------+--------------------------
N | 48 48
r2 | .1078 .135
r2_a | .0884 .1162
aic | 224.2 222.7
bic | 228 226.5
----------------------------------------
legend: * p<.1; ** p<.05; *** p<.01
- Bandingkan hasil regresi persamaan (1), (2), dan (3) di atas, model yang mana yang anda anggap sesuai dengan data? Jelaskan
. estimates table inf cinf cinf2 , stat(N r2 r2_a aic bic) b(%7.4f) stfmt(%7.4g) star(0.1 0.05 0.01)
-----------------------------------------------------
Variable | inf cinf cinf2
-------------+---------------------------------------
unem | 0.4676 -0.5426**
cunem | -0.8422**
_cons | 1.4236 3.0306** -0.0782
-------------+---------------------------------------
N | 49 48 48
r2 | .05272 .1078 .135
r2_a | .03257 .0884 .1162
aic | 252.9 224.2 222.7
bic | 256.6 228 226.5
-----------------------------------------------------
legend: * p<.1; ** p<.05; *** p<.01
SOAL B
- Estimasi angka penggangguran alamiah berdasarkan hasil regresi persamaan (2) dan (3) pada soal A.
. * Diketahui inft - infte = b1 (unemt - um) + et
. * dimana infte = inft-1
. * jadi, inft - inft-1 = b1.um + b1.unwmt + et
. * Dinft = b0 + b1.unwmt + et
. * dimana: b0 = b1.um
. reg cinf unem
Source | SS df MS Number of obs = 48
-------------+------------------------------ F( 1, 46) = 5.56
Model | 33.3829988 1 33.3829988 Prob > F = 0.0227
Residual | 276.30513 46 6.00663326 R-squared = 0.1078
-------------+------------------------------ Adj R-squared = 0.0884
Total | 309.688129 47 6.58910913 Root MSE = 2.4508
------------------------------------------------------------------------------
cinf | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
unem | -.5425869 .2301559 -2.36 0.023 -1.005867 -.079307
_cons | 3.030581 1.37681 2.20 0.033 .259206 5.801955
------------------------------------------------------------------------------
. * Jadi um (unemplaymet rate estimastion)
. display 3.030581 / -.5425869
-5.5854297
- Estimasi first order autocorrelation dari unem dengan menggunakan angka korelasi sample dari (unemt,unemt-1) , Berdasarkan angka korelasi sampel; apakah unit root tsb mendekati satu?Apa artinya jika unit root mendekati satu?
. * diketahui dalam pengujian Dickey-Fuller unit-root test
. * yt = p yt-1 + e
. * yt - yt-1 = p yt-1 - yt-1 + e
. * dyt = (p-1) yt-1 + e
. * dimana q = (p-1)
. * diketahui dyt = b0 + q yt-1 + b1 year + e
. * jika b0 signifikan artinya random walk dengan drift
. * jika q = 0 artinya tidak random walk atau no statisioner
. * jika b1 signifikan artinya random walk dengan trend waktu
. * DF memiliki hipotesis, H0: p=1 ==> q=0 ==> no statisioner || H1: p!=1 ==> q!=0 ==> stasioner
. * jadi dalam pengujian Dickey-Fuller unit-root test untuk varibel unemt kita dapat melakukan regres dengan persamaan seperti berikut:
. * diketahui dyt = q yt-1 + e
. reg cunem unem_1, noc
Source | SS df MS Number of obs = 48
-------------+------------------------------ F( 1, 47) = 0.23
Model | .288097988 1 .288097988 Prob > F = 0.6333
Residual | 58.7318998 47 1.24961489 R-squared = 0.0049
-------------+------------------------------ Adj R-squared = -0.0163
Total | 59.0199978 48 1.22958329 Root MSE = 1.1179
------------------------------------------------------------------------------
cunem | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
unem_1 | -.0130067 .0270885 -0.48 0.633 -.0675017 .0414883
------------------------------------------------------------------------------
. dfuller unem, regres nocon
Dickey-Fuller test for unit root Number of obs = 48
---------- Interpolated Dickey-Fuller ---------
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value
------------------------------------------------------------------------------
Z(t) -0.480 -2.623 -1.950 -1.609
------------------------------------------------------------------------------
D.unem | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
unem |
L1. | -.0130067 .0270885 -0.48 0.633 -.0675017 .0414883
------------------------------------------------------------------------------
. * diketahui dyt = b0 + q yt-1 + e
. reg cunem unem_1
Source | SS df MS Number of obs = 48
-------------+------------------------------ F( 1, 46) = 7.63
Model | 8.38981516 1 8.38981516 Prob > F = 0.0082
Residual | 50.5768493 46 1.09949672 R-squared = 0.1423
-------------+------------------------------ Adj R-squared = 0.1236
Total | 58.9666644 47 1.25460988 Root MSE = 1.0486
------------------------------------------------------------------------------
cunem | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
unem_1 | -.2676462 .0968906 -2.76 0.008 -.4626769 -.0726154
_cons | 1.571741 .5771181 2.72 0.009 .4100628 2.73342
------------------------------------------------------------------------------
. dfuller unem, regres
Dickey-Fuller test for unit root Number of obs = 48
---------- Interpolated Dickey-Fuller ---------
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value
------------------------------------------------------------------------------
Z(t) -2.762 -3.594 -2.936 -2.602
------------------------------------------------------------------------------
MacKinnon approximate p-value for Z(t) = 0.0639
------------------------------------------------------------------------------
D.unem | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
unem |
L1. | -.2676462 .0968906 -2.76 0.008 -.462677 -.0726155
|
_cons | 1.571741 .5771181 2.72 0.009 .4100629 2.73342
------------------------------------------------------------------------------
. * diketahui dyt = b0 + q yt-1 + b1 year + e
. reg cunem unem_1 year
Source | SS df MS Number of obs = 48
-------------+------------------------------ F( 2, 45) = 4.64
Model | 10.074198 2 5.03709899 Prob > F = 0.0148
Residual | 48.8924664 45 1.08649925 R-squared = 0.1708
-------------+------------------------------ Adj R-squared = 0.1340
Total | 58.9666644 47 1.25460988 Root MSE = 1.0424
------------------------------------------------------------------------------
cunem | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
unem_1 | -.3507137 .1171655 -2.99 0.004 -.5866972 -.1147303
year | .0164492 .0132111 1.25 0.220 -.0101593 .0430576
_cons | -30.39676 25.68177 -1.18 0.243 -82.12249 21.32898
------------------------------------------------------------------------------
. dfuller unem, regres trend
Dickey-Fuller test for unit root Number of obs = 48
---------- Interpolated Dickey-Fuller ---------
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value
------------------------------------------------------------------------------
Z(t) -2.993 -4.168 -3.508 -3.185
------------------------------------------------------------------------------
MacKinnon approximate p-value for Z(t) = 0.1340
------------------------------------------------------------------------------
D.unem | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
unem |
L1. | -.3507138 .1171655 -2.99 0.004 -.5866972 -.1147303
_trend | .0164492 .0132111 1.25 0.220 -.0101593 .0430576
_cons | 1.646202 .5768054 2.85 0.007 .4844567 2.807948
------------------------------------------------------------------------------
. * Kesimpulannya: unem random walk dengan drift
- Bandingkan R-squares pada hasil estimasi persamaan (2) dan (3) pada soal A, manakah yang lebih tinggi? Apakah hal ini terkait dengan adanya first order autocorrelation dari unem? Jelaskan
. estimates table cinf cinf2 , stat(N r2 r2_a aic bic) b(%7.4f) stfmt(%7.4g) star(0.1 0.05 0.01)
----------------------------------------
Variable | cinf cinf2
-------------+--------------------------
unem | -0.5426**
cunem | -0.8422**
_cons | 3.0306** -0.0782
-------------+--------------------------
N | 48 48
r2 | .1078 .135
r2_a | .0884 .1162
aic | 224.2 222.7
bic | 228 226.5
----------------------------------------
legend: * p<.1; ** p<.05; *** p<.01
. * cek serial correlation
. * Persamaan ke dua (2)
. quietly reg cinf unem
. dwstat
Durbin-Watson d-statistic( 2, 48) = 1.769648
. bgodfrey
Breusch-Godfrey LM test for autocorrelation
---------------------------------------------------------------------------
lags(p) | chi2 df Prob > chi2
-------------+-------------------------------------------------------------
1 | 0.062 1 0.8039
---------------------------------------------------------------------------
H0: no serial correlation
. * Persamaan ke dua (3)
. quietly reg cinf cunem
. dwstat
Durbin-Watson d-statistic( 2, 48) = 1.849401
. bgodfrey
Breusch-Godfrey LM test for autocorrelation
---------------------------------------------------------------------------
lags(p) | chi2 df Prob > chi2
-------------+-------------------------------------------------------------
1 | 0.042 1 0.8385
---------------------------------------------------------------------------
Komentar
Posting Komentar