Lab 5 - Ekonometrika 2 (2012) - Data Panel 1 (STATA)
Ekonometrika 2
Program S1 Ilmu Ekonomi FEUI
Maret 2012
Lab ke-5
Analisis Data Panel
(STATA)
(STATA)
SOAL A
Gunakan data CRIME4.dta
. *lakukan set time dan id terlebih dahulu sebelum melakukan estimasi menggunakan panel data
. xtset county year
panel variable: county (strongly balanced)
time variable: year, 81 to 87
delta: 1 unit
1. Lakukan estimasi dengan metode first difference untuk persamaan berikut ini:
1. Lakukan estimasi dengan metode first difference untuk persamaan berikut ini:
∆log(crmrte)i= a0 +a1d83+ a2d84+ a3d85+ a4d86+ a5d87+b1∆log(prbarr) i+ b2∆log(prbconv) i + b3∆log(prbpris) i + b4∆log(avgsen) i + b5∆log(polpc)i +ui……… (1)
. reg clcrmrte d83 d84 d85 d86 d87 clprbarr clprbcon clprbpri clavgsen clpolpc
Source | SS df MS Number of obs = 540
-------------+------------------------------ F( 10, 529) = 40.32
Model | 9.60042816 10 .960042816 Prob > F = 0.0000
Residual | 12.5963761 529 .023811675 R-squared = 0.4325
-------------+------------------------------ Adj R-squared = 0.4218
Total | 22.1968043 539 .041181455 Root MSE = .15431
------------------------------------------------------------------------------
clcrmrte | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
d83 | -.0998658 .0238953 -4.18 0.000 -.1468071 -.0529246
d84 | -.0479374 .0235021 -2.04 0.042 -.0941063 -.0017686
d85 | -.0046111 .0234998 -0.20 0.845 -.0507756 .0415533
d86 | .0275143 .0241494 1.14 0.255 -.0199261 .0749548
d87 | .0408267 .0244153 1.67 0.095 -.0071361 .0887895
clprbarr | -.3274942 .0299801 -10.92 0.000 -.3863889 -.2685994
clprbcon | -.2381066 .0182341 -13.06 0.000 -.2739268 -.2022864
clprbpri | -.1650462 .025969 -6.36 0.000 -.2160613 -.1140312
clavgsen | -.0217607 .0220909 -0.99 0.325 -.0651574 .0216361
clpolpc | .3984264 .026882 14.82 0.000 .3456177 .4512351
_cons | .0077134 .0170579 0.45 0.651 -.0257962 .0412229
------------------------------------------------------------------------------
. hettest
Breusch-Pagan / Cook-Weisberg test for heteroskedasticity
Ho: Constant variance
Variables: fitted values of clcrmrte
chi2(1) = 1.16
Prob > chi2 = 0.2807
3. Ciptakan variabel baru yang merupakan first difference dari log semua data upah yang terdapat di data dan estimasi ulang persamaan (1) dengan mengikutsertakan variabel upah di persamaan tsb.
· Membuat variabel baru yang merupakan first difference
. gen dlwcon = d.lwcon
(90 missing values generated)
. gen dlwtuc = d.lwtuc
(90 missing values generated)
. gen dlwtrd = d.lwtrd
(90 missing values generated)
. gen dlwfir = d.lwfir
(90 missing values generated)
. gen dlwser = d.lwser
(90 missing values generated)
. gen dlwmfg = d.lwmfg
(90 missing values generated)
. gen dlwfed = d.lwfed
(90 missing values generated)
. gen dlwsta = d.lwsta
(90 missing values generated)
. gen dlwloc = d.lwloc
(90 missing values generated)
. reg clcrmrte d83 d84 d85 d86 d87 clprbarr clprbcon clprbpri clavgsen clpolpc dlwcon dlwtuc dlwtrd dlwfir dlwser dlwmfg dlwfed dlwsta dlwloc
Source | SS df MS Number of obs = 540
-------------+------------------------------ F( 19, 520) = 21.90
Model | 9.8674225 19 .519338026 Prob > F = 0.0000
Residual | 12.3293818 520 .02371035 R-squared = 0.4445
-------------+------------------------------ Adj R-squared = 0.4242
Total | 22.1968043 539 .041181455 Root MSE = .15398
------------------------------------------------------------------------------
clcrmrte | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
d83 | -.1108653 .0268105 -4.14 0.000 -.1635354 -.0581951
d84 | -.0374103 .024533 -1.52 0.128 -.0856063 .0107856
d85 | -.0005857 .024078 -0.02 0.981 -.0478877 .0467164
d86 | .0314757 .0245099 1.28 0.200 -.0166748 .0796262
d87 | .0388632 .0247819 1.57 0.117 -.0098218 .0875482
clprbarr | -.3230993 .0300195 -10.76 0.000 -.3820737 -.2641248
clprbcon | -.2402885 .0182474 -13.17 0.000 -.2761362 -.2044407
clprbpri | -.1693859 .02617 -6.47 0.000 -.2207978 -.117974
clavgsen | -.0156166 .0224126 -0.70 0.486 -.0596469 .0284137
clpolpc | .3977221 .026987 14.74 0.000 .3447051 .450739
dlwcon | -.0442367 .0304142 -1.45 0.146 -.1039864 .015513
dlwtuc | .0253998 .0142093 1.79 0.074 -.0025149 .0533145
dlwtrd | -.0290309 .0307907 -0.94 0.346 -.0895204 .0314586
dlwfir | .009122 .0212318 0.43 0.668 -.0325886 .0508326
dlwser | .0219548 .0144342 1.52 0.129 -.0064016 .0503113
dlwmfg | -.1402493 .1019317 -1.38 0.169 -.3404978 .0599992
dlwfed | .0174231 .1716064 0.10 0.919 -.3197038 .3545501
dlwsta | -.0517896 .0957109 -0.54 0.589 -.2398171 .1362379
dlwloc | -.0305151 .1021028 -0.30 0.765 -.2310998 .1700695
_cons | .0198522 .0206974 0.96 0.338 -.0208086 .060513
------------------------------------------------------------------------------
· Tanpa membuat variabel first difference
reg clcrmrte d83 d84 d85 d86 d87 clprbarr clprbcon clprbpri clavgsen clpolpc D.lwcon D.lwtuc D.lwtrd D.lwfir D .lwser D.lwmfg D.lwfed D.lwsta D.lwloc
Source | SS df MS Number of obs = 540
-------------+------------------------------ F( 19, 520) = 21.90
Model | 9.8674225 19 .519338026 Prob > F = 0.0000
Residual | 12.3293818 520 .02371035 R-squared = 0.4445
-------------+------------------------------ Adj R-squared = 0.4242
Total | 22.1968043 539 .041181455 Root MSE = .15398
------------------------------------------------------------------------------
clcrmrte | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
d83 | -.1108653 .0268105 -4.14 0.000 -.1635354 -.0581951
d84 | -.0374103 .024533 -1.52 0.128 -.0856063 .0107856
d85 | -.0005857 .024078 -0.02 0.981 -.0478877 .0467164
d86 | .0314757 .0245099 1.28 0.200 -.0166748 .0796262
d87 | .0388632 .0247819 1.57 0.117 -.0098218 .0875482
clprbarr | -.3230993 .0300195 -10.76 0.000 -.3820737 -.2641248
clprbcon | -.2402885 .0182474 -13.17 0.000 -.2761362 -.2044407
clprbpri | -.1693859 .02617 -6.47 0.000 -.2207978 -.117974
clavgsen | -.0156166 .0224126 -0.70 0.486 -.0596469 .0284137
clpolpc | .3977221 .026987 14.74 0.000 .3447051 .450739
|
lwcon |
D1. | -.0442367 .0304142 -1.45 0.146 -.1039864 .015513
|
lwtuc |
D1. | .0253998 .0142093 1.79 0.074 -.0025149 .0533145
|
lwtrd |
D1. | -.0290309 .0307907 -0.94 0.346 -.0895204 .0314586
|
lwfir |
D1. | .009122 .0212318 0.43 0.668 -.0325886 .0508326
|
lwser |
D1. | .0219548 .0144342 1.52 0.129 -.0064016 .0503113
|
lwmfg |
D1. | -.1402493 .1019317 -1.38 0.169 -.3404978 .0599992
|
lwfed |
D1. | .0174231 .1716064 0.10 0.919 -.3197038 .3545501
|
lwsta |
D1. | -.0517896 .0957109 -0.54 0.589 -.2398171 .1362379
|
lwloc |
D1. | -.0305151 .1021028 -0.30 0.765 -.2310998 .1700695
|
_cons | .0198522 .0206974 0.96 0.338 -.0208086 .060513
------------------------------------------------------------------------------
4. Bandingkan koefisien dari variabel-variabel di persamaan (1) dari dua hasil regresi tersebut. Adakah perbedaan yang cukup signifikan?
. quietly reg clcrmrte d83 d84 d85 d86 d87 clprbarr clprbcon clprbpri clavgsen clpolpc
. estimates store clcrmrte
. quietly reg clcrmrte d83 d84 d85 d86 d87 clprbarr clprbcon clprbpri clavgsen clpolpc dlwcon dlwtuc dlwtrd dlwfir dlwser dlwmfg dlwfed dlwsta dlwloc
. estimates store clcrmrte2
. estimates table clcrmrte clcrmrte2, stat(N r2 r2_a aic bic) star(0.1 0.05 0.01)
----------------------------------------------
Variable | clcrmrte clcrmrte2
-------------+--------------------------------
d83 | -.09986581*** -.11086526***
d84 | -.04793744** -.03741034
d85 | -.00461113 -.00058565
d86 | .02751434 .0314757
d87 | .0408267* .03886318
clprbarr | -.32749418*** -.32309927***
clprbcon | -.2381066*** -.24028845***
clprbpri | -.16504624*** -.16938589***
clavgsen | -.02176066 -.01561662
clpolpc | .3984264*** .39772208***
dlwcon | -.0442367
dlwtuc | .02539978*
dlwtrd | -.02903092
dlwfir | .00912198
dlwser | .02195485
dlwmfg | -.14024932
dlwfed | .01742314
dlwsta | -.05178962
dlwloc | -.03051514
_cons | .00771336 .01985222
-------------+--------------------------------
N | 540 540
r2 | .43251398 .44454248
r2_a | .42178646 .42424692
aic | -474.95277 -468.52173
bic | -427.74551 -382.69034
----------------------------------------------
legend: * p<.1; ** p<.05; *** p<.01
5. Apakah koefisien dari semua variabel upah menunjukkan konsistensi arah dan sesuai dengan hipotesa bahwa jika pendapatan naik maka tingkat kriminalitas akan turun?
. estimates table clcrmrte clcrmrte2, stat(N r2 r2_a aic bic) star(0.1 0.05 0.01)
----------------------------------------------
Variable | clcrmrte clcrmrte2
-------------+--------------------------------
d83 | -.09986581*** -.11086526***
d84 | -.04793744** -.03741034
d85 | -.00461113 -.00058565
d86 | .02751434 .0314757
d87 | .0408267* .03886318
clprbarr | -.32749418*** -.32309927***
clprbcon | -.2381066*** -.24028845***
clprbpri | -.16504624*** -.16938589***
clavgsen | -.02176066 -.01561662
clpolpc | .3984264*** .39772208***
dlwcon | -.0442367
dlwtuc | .02539978*
dlwtrd | -.02903092
dlwfir | .00912198
dlwser | .02195485
dlwmfg | -.14024932
dlwfed | .01742314
dlwsta | -.05178962
dlwloc | -.03051514
_cons | .00771336 .01985222
-------------+--------------------------------
N | 540 540
r2 | .43251398 .44454248
r2_a | .42178646 .42424692
aic | -474.95277 -468.52173
bic | -427.74551 -382.69034
----------------------------------------------
legend: * p<.1; ** p<.05; *** p<.01
6. Estimasi ulang persamaan (1) dengan metode Fixed Effect dan bandingkan hasil regresi dari kedua metode tersebut, apakah terjadi perubahan tingkat signifikansi dan/atau arah dari koefisien?
. xtreg clcrmrte d83 d84 d85 d86 d87 clprbarr clprbcon clprbpri clavgsen clpolpc, fe
Fixed-effects (within) regression Number of obs = 540
Group variable: county Number of groups = 90
R-sq: within = 0.4476 Obs per group: min = 6
between = 0.1247 avg = 6.0
overall = 0.4324 max = 6
F(10,440) = 35.65
corr(u_i, Xb) = -0.0614 Prob > F = 0.0000
------------------------------------------------------------------------------
clcrmrte | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
d83 | -.1004876 .0254125 -3.95 0.000 -.1504327 -.0505426
d84 | -.0483243 .0249774 -1.93 0.054 -.0974141 .0007654
d85 | -.0046755 .0249772 -0.19 0.852 -.053765 .0444139
d86 | .0278299 .0256981 1.08 0.279 -.0226763 .0783361
d87 | .0405086 .0259853 1.56 0.120 -.0105621 .0915793
clprbarr | -.3298869 .0329905 -10.00 0.000 -.3947253 -.2650484
clprbcon | -.2401652 .0199024 -12.07 0.000 -.2792809 -.2010496
clprbpri | -.1638598 .0280913 -5.83 0.000 -.2190696 -.10865
clavgsen | -.0233595 .0238217 -0.98 0.327 -.0701779 .0234589
clpolpc | .4107709 .0293047 14.02 0.000 .3531763 .4683656
_cons | .0077115 .0181441 0.43 0.671 -.0279484 .0433715
-------------+----------------------------------------------------------------
sigma_u | .0383454
sigma_e | .1638796
rho | .05190719 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(89, 440) = 0.33 Prob > F = 1.0000
. estimates store clcrmrtefe
. estimates table clcrmrte clcrmrtefe, stat(N r2 r2_a aic bic) star(0.1 0.05 0.01)
----------------------------------------------
Variable | clcrmrte clcrmrtefe
-------------+--------------------------------
d83 | -.09986581*** -.10048764***
d84 | -.04793744** -.04832434*
d85 | -.00461113 -.00467555
d86 | .02751434 .02782985
d87 | .0408267* .04050861
clprbarr | -.32749418*** -.32988686***
clprbcon | -.2381066*** -.24016521***
clprbpri | -.16504624*** -.16385977***
clavgsen | -.02176066 -.02335952
clpolpc | .3984264*** .41077093***
_cons | .00771336 .00771153
-------------+--------------------------------
N | 540 540
r2 | .43251398 .44761434
r2_a | .42178646 .32332757
aic | -474.95277 -509.44849
bic | -427.74551 -462.24122
----------------------------------------------
legend: * p<.1; ** p<.05; *** p<.01
7. Estimasi ulang juga persamaan yang digunakan di (iii) metode Fixed Effect. Bandingkan koefisien dari variabel-variabel di (vi). Dengan hasil regresi ini, adakah perbedaan yang cukup signifikan?
. xtreg clcrmrte d83 d84 d85 d86 d87 clprbarr clprbcon clprbpri clavgsen clpolpc dlwcon dlwtuc dlwtrd dlwfir dlwser dlwmfg dlwfed dlwsta dlwloc, fe
Fixed-effects (within) regression Number of obs = 540
Group variable: county Number of groups = 90
R-sq: within = 0.4598 Obs per group: min = 6
between = 0.1218 avg = 6.0
overall = 0.4441 max = 6
F(19,431) = 19.31
corr(u_i, Xb) = -0.0597 Prob > F = 0.0000
------------------------------------------------------------------------------
clcrmrte | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
d83 | -.1141352 .0286252 -3.99 0.000 -.1703976 -.0578728
d84 | -.0389382 .0261141 -1.49 0.137 -.0902651 .0123886
d85 | -.0022409 .0256621 -0.09 0.930 -.0526794 .0481976
d86 | .0329354 .0261288 1.26 0.208 -.0184203 .0842911
d87 | .038194 .0264144 1.45 0.149 -.0137231 .0901111
clprbarr | -.3250768 .0330891 -9.82 0.000 -.3901128 -.2600407
clprbcon | -.2425981 .0199446 -12.16 0.000 -.2817989 -.2033974
clprbpri | -.1692397 .0283532 -5.97 0.000 -.2249673 -.113512
clavgsen | -.0157704 .024231 -0.65 0.515 -.063396 .0318551
clpolpc | .4091099 .0294783 13.88 0.000 .3511708 .4670491
dlwcon | -.0457939 .0324344 -1.41 0.159 -.1095433 .0179554
dlwtuc | .0247632 .0151293 1.64 0.102 -.0049732 .0544996
dlwtrd | -.0291125 .0327938 -0.89 0.375 -.093568 .0353431
dlwfir | .0093063 .0226263 0.41 0.681 -.0351653 .0537779
dlwser | .0207563 .0154202 1.35 0.179 -.0095519 .0510645
dlwmfg | -.1318735 .1105524 -1.19 0.234 -.3491623 .0854153
dlwfed | .1092502 .1907329 0.57 0.567 -.2656321 .4841326
dlwsta | -.0595998 .1028897 -0.58 0.563 -.2618279 .1426282
dlwloc | -.0462415 .1098618 -0.42 0.674 -.2621731 .1696902
_cons | .0187045 .0221608 0.84 0.399 -.0248523 .0622613
-------------+----------------------------------------------------------------
sigma_u | .03838552
sigma_e | .16373945
rho | .05209467 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(89, 431) = 0.32 Prob > F = 1.0000
. estimates store clcrmrte2fe
. estimates table clcrmrte2 clcrmrte2fe, stat(N r2 r2_a aic bic) star(0.1 0.05 0.01)
----------------------------------------------
Variable | clcrmrte2 clcrmrte2fe
-------------+--------------------------------
d83 | -.11086526*** -.11413519***
d84 | -.03741034 -.03893822
d85 | -.00058565 -.00224089
d86 | .0314757 .0329354
d87 | .03886318 .03819399
clprbarr | -.32309927*** -.32507678***
clprbcon | -.24028845*** -.24259815***
clprbpri | -.16938589*** -.16923966***
clavgsen | -.01561662 -.01577044
clpolpc | .39772208*** .40910995***
dlwcon | -.0442367 -.04579393
dlwtuc | .02539978* .02476324
dlwtrd | -.02903092 -.02911246
dlwfir | .00912198 .0093063
dlwser | .02195485 .02075629
dlwmfg | -.14024932 -.13187353
dlwfed | .01742314 .10925023
dlwsta | -.05178962 -.05959983
dlwloc | -.03051514 -.04624147
_cons | .01985222 .01870452
-------------+--------------------------------
N | 540 540
r2 | .44454248 .45983823
r2_a | .42424692 .32448447
aic | -468.52173 -503.53249
bic | -382.69034 -417.70111
----------------------------------------------
legend: * p<.1; ** p<.05; *** p<.01
8. Apakah koefisien dari semua variabel upah menunjukkan konsistensi arah dan sesuai dengan hipotesa bahwa jika pendapatan naik maka tingkat kriminalitas akan turun?
. estimates table clcrmrte clcrmrte2 clcrmrtefe clcrmrte2fe, stat(N r2 r2_a aic bic) star(0.1 0.05 0.01)
------------------------------------------------------------------------------
Variable | clcrmrte clcrmrte2 clcrmrtefe clcrmrte2fe
-------------+----------------------------------------------------------------
d83 | -.09986581*** -.11086526*** -.10048764*** -.11413519***
d84 | -.04793744** -.03741034 -.04832434* -.03893822
d85 | -.00461113 -.00058565 -.00467555 -.00224089
d86 | .02751434 .0314757 .02782985 .0329354
d87 | .0408267* .03886318 .04050861 .03819399
clprbarr | -.32749418*** -.32309927*** -.32988686*** -.32507678***
clprbcon | -.2381066*** -.24028845*** -.24016521*** -.24259815***
clprbpri | -.16504624*** -.16938589*** -.16385977*** -.16923966***
clavgsen | -.02176066 -.01561662 -.02335952 -.01577044
clpolpc | .3984264*** .39772208*** .41077093*** .40910995***
dlwcon | -.0442367 -.04579393
dlwtuc | .02539978* .02476324
dlwtrd | -.02903092 -.02911246
dlwfir | .00912198 .0093063
dlwser | .02195485 .02075629
dlwmfg | -.14024932 -.13187353
dlwfed | .01742314 .10925023
dlwsta | -.05178962 -.05959983
dlwloc | -.03051514 -.04624147
_cons | .00771336 .01985222 .00771153 .01870452
-------------+----------------------------------------------------------------
N | 540 540 540 540
r2 | .43251398 .44454248 .44761434 .45983823
r2_a | .42178646 .42424692 .32332757 .32448447
aic | -474.95277 -468.52173 -509.44849 -503.53249
bic | -427.74551 -382.69034 -462.24122 -417.70111
------------------------------------------------------------------------------
legend: * p<.1; ** p<.05; *** p<.01
SOAL B
Gunakan data AIRFARE.dta
. *lakukan set time dan id terlebih dahulu sebelum melakukan estimasi menggunakan panel data
. xtset id year
panel variable: id (strongly balanced)
time variable: year, 1997 to 2000
delta: 1 unit
1. Lakukan estimasi dengan metode Pooled OLS untuk persamaan berikut ini: (perhatikan bahwa c bervariasi antar waktu)
log(fare)it= ct +ai +b1concen it + b2log(dist)it + b2(log(dist))2it +uit……………..(2)
. reg lfare concen ldist ldistsq
Source | SS df MS Number of obs = 4596
-------------+------------------------------ F( 3, 4592) = 1015.85
Model | 349.089591 3 116.363197 Prob > F = 0.0000
Residual | 526.004782 4592 .11454808 R-squared = 0.3989
-------------+------------------------------ Adj R-squared = 0.3985
Total | 875.094374 4595 .190444913 Root MSE = .33845
------------------------------------------------------------------------------
lfare | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
concen | .3526892 .0302101 11.67 0.000 .2934628 .4119157
ldist | -.899166 .1290132 -6.97 0.000 -1.152094 -.6462382
ldistsq | .1027463 .0097816 10.50 0.000 .0835697 .1219228
_cons | 6.249577 .4229656 14.78 0.000 5.420361 7.078793
------------------------------------------------------------------------------
. estimates store lfare_fe
2. Lakukan estimasi dengan metode fixed effect untuk persamaan (2)
. xtreg lfare concen ldist ldistsq, fe
note: ldist omitted because of collinearity
note: ldistsq omitted because of collinearity
Fixed-effects (within) regression Number of obs = 4596
Group variable: id Number of groups = 1149
R-sq: within = 0.0031 Obs per group: min = 4
between = 0.0576 avg = 4.0
overall = 0.0490 max = 4
F(1,3446) = 10.88
corr(u_i, Xb) = -0.2716 Prob > F = 0.0010
------------------------------------------------------------------------------
lfare | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
concen | .1030511 .0312422 3.30 0.001 .041796 .1643062
ldist | (omitted)
ldistsq | (omitted)
_cons | 5.032728 .0191358 263.00 0.000 4.995209 5.070246
-------------+----------------------------------------------------------------
sigma_u | .43021592
sigma_e | .11430784
rho | .9340593 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(1148, 3446) = 32.07 Prob > F = 0.0000
- Omited terjadi karena ldist dan ldistsq bersifat time-invariant
- Seperti yang diketahui FE sama dengan LSDV (Least Squares Dummy Variable). Karena individunya ada 90, tidak memungkinkan membuat dummy individu di STATA IC. Kita menggunakan dummy tahun saja, sesuai dengan arahan pertama juga. Dengan menggunakannya dummy tahun berarti yang kita dapatkan perbedaan karekteristik tiap tahun bukan tiap individu (LSDV).
. reg lfare concen ldist ldistsq i.year
Source | SS df MS Number of obs = 4596
-------------+------------------------------ F( 6, 4589) = 523.18
Model | 355.453858 6 59.2423096 Prob > F = 0.0000
Residual | 519.640516 4589 .113236112 R-squared = 0.4062
-------------+------------------------------ Adj R-squared = 0.4054
Total | 875.094374 4595 .190444913 Root MSE = .33651
------------------------------------------------------------------------------
lfare | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
concen | .3601203 .0300691 11.98 0.000 .3011705 .4190702
ldist | -.9016004 .128273 -7.03 0.000 -1.153077 -.6501235
ldistsq | .1030196 .0097255 10.59 0.000 .0839529 .1220863
|
year |
1998 | .0211244 .0140419 1.50 0.133 -.0064046 .0486533
1999 | .0378496 .0140413 2.70 0.007 .010322 .0653772
2000 | .09987 .0140432 7.11 0.000 .0723385 .1274015
|
_cons | 6.209258 .4206247 14.76 0.000 5.384631 7.033884
------------------------------------------------------------------------------
. estimates store lfare_fe
3. Bandingkan hasil regresi di (i) dan (ii) dan berikan analisis anda
. estimates table lfare_pls lfare_fe, stat(N r2 r2_a aic bic) star(0.1 0.05 0.01)
----------------------------------------------
Variable | lfare_pls lfare_fe
-------------+--------------------------------
concen | .35268924*** .36012033***
ldist | -.899166*** -.90160039***
ldistsq | .10274626*** .10301961***
|
year |
1998 | .02112437
1999 | .03784958***
2000 | .09986997***
|
_cons | 6.2495773*** 6.2092576***
-------------+--------------------------------
N | 4596 4596
r2 | .39891651 .40618917
r2_a | .39852381 .40541278
aic | 3088.4494 3038.5021
bic | 3114.1812 3083.5326
----------------------------------------------
legend: * p<.1; ** p<.05; *** p<.01
4. Lakukan estimasi dengan metode Random Effect untuk persamaan (2)
. xtreg lfare concen ldist ldistsq, re
Random-effects GLS regression Number of obs = 4596
Group variable: id Number of groups = 1149
R-sq: within = 0.0031 Obs per group: min = 4
between = 0.4150 avg = 4.0
overall = 0.3937 max = 4
Random effects u_i ~ Gaussian Wald chi2(3) = 826.06
corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000
------------------------------------------------------------------------------
lfare | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
concen | .1608968 .0278684 5.77 0.000 .1062758 .2155178
ldist | -.8363359 .2466771 -3.39 0.001 -1.319814 -.3528577
ldistsq | .0956912 .0186519 5.13 0.000 .0591341 .1322482
_cons | 6.265289 .8105466 7.73 0.000 4.676647 7.853931
-------------+----------------------------------------------------------------
sigma_u | .31866384
sigma_e | .11430784
rho | .88599643 (fraction of variance due to u_i)
------------------------------------------------------------------------------
. estimates store lfare_re
5. Bandingkan hasil regresi di (ii) dan (iv) dan berikan analisis anda
. estimates table lfare_fe lfare_re, stat(N r2 r2_a aic bic) star(0.1 0.05 0.01)
----------------------------------------------
Variable | lfare_fe lfare_re
-------------+--------------------------------
concen | .36012033*** .16089678***
ldist | -.90160039*** -.83633589***
ldistsq | .10301961*** .09569116***
|
year |
1998 | .02112437
1999 | .03784958***
2000 | .09986997***
|
_cons | 6.2092576*** 6.2652891***
-------------+--------------------------------
N | 4596 4596
r2 | .40618917
r2_a | .40541278
aic | 3038.5021 .
bic | 3083.5326 .
----------------------------------------------
legend: * p<.1; ** p<.05; *** p<.01
Ingat: Panel FE (LSDV) yang kita dapatkan adalah perbedaan karekteristik tiap tahun bukan tiap individu, karena yang kita masukan karekteristik tiap tahunnya yaitu dengan dummy tahun. Sedangkan Panel RE yang kita buat sudah memasukan karekteristik tiap individu dan tahun.
6. Lakukan prosedur pengujian untuk menentukan metode estimasi mana yang paling sesuai dengan persamaan (2).
· Hasil ketiga estimasi jika dibandingkan
. estimates table lfare_pls lfare_fe lfare_re, stat(N r2 r2_a aic bic) star(0.1 0.05 0.01)
--------------------------------------------------------------
Variable | lfare_pls lfare_fe lfare_re
-------------+------------------------------------------------
concen | .35268924*** .36012033*** .16089678***
ldist | -.899166*** -.90160039*** -.83633589***
ldistsq | .10274626*** .10301961*** .09569116***
|
year |
1998 | .02112437
1999 | .03784958***
2000 | .09986997***
|
_cons | 6.2495773*** 6.2092576*** 6.2652891***
-------------+------------------------------------------------
N | 4596 4596 4596
r2 | .39891651 .40618917
r2_a | .39852381 .40541278
aic | 3088.4494 3038.5021 .
bic | 3114.1812 3083.5326 .
--------------------------------------------------------------
legend: * p<.1; ** p<.05; *** p<.01
· Karena Panel FE (LSDV) yang kita dapatkan adalah perbedaan karekteristik tiap tahun bukan tiap individu, karena yang kita masukan karekteristik tiap tahunnya yaitu dengan dummy tahun. Sedangkan Panel RE yang kita buat sudah memasukan karekteristik tiap individu dan tahun. Maka dalam kasus ini, jika kita ingin melihat karekteristik individu maka kita tidak bisa Panel FE (LSDV) yang kita buat. Test antara FE dengan RE menggunakan Hausman tidak perlu langsung saja test antara RE dengan PLS menggunakan LM Test. Namun, jika kita ingin memasukan karekteristik tiap tahunnya saja maka cukup kita menggunakan estimasi Panel FE (LSDV).
· PLS Vs RE
. quietly xtreg lfare concen ldist ldistsq, re
. xttest0
Breusch and Pagan Lagrangian multiplier test for random effects
lfare[id,t] = Xb + u[id] + e[id,t]
Estimated results:
| Var sd = sqrt(Var)
---------+-----------------------------
lfare | .1904449 .4363999
e | .0130663 .1143078
u | .1015466 .3186638
Test: Var(u) = 0
chi2(1) = 5384.32
Prob > chi2 = 0.0000
- Kesimpulan, menggunakan Panel RE
· Secara global pengujian antara PLS, FE, dan RE dapat digambarkan seperti berikut:
7. Berdasarkan hasil pengujian tersebut berikan interpretasi anda terhadap parameter-parameter yang diestimasi
· Hasil estimasi dengan karekteristik tiap individu dan tahun. Sesuai kesimpulan menggunkan Panel RE
. xtreg lfare concen ldist ldistsq, re
Random-effects GLS regression Number of obs = 4596
Group variable: id Number of groups = 1149
R-sq: within = 0.0031 Obs per group: min = 4
between = 0.4150 avg = 4.0
overall = 0.3937 max = 4
Random effects u_i ~ Gaussian Wald chi2(3) = 826.06
corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000
------------------------------------------------------------------------------
lfare | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
concen | .1608968 .0278684 5.77 0.000 .1062758 .2155178
ldist | -.8363359 .2466771 -3.39 0.001 -1.319814 -.3528577
ldistsq | .0956912 .0186519 5.13 0.000 .0591341 .1322482
_cons | 6.265289 .8105466 7.73 0.000 4.676647 7.853931
-------------+----------------------------------------------------------------
sigma_u | .31866384
sigma_e | .11430784
rho | .88599643 (fraction of variance due to u_i)
------------------------------------------------------------------------------
· Hasil estimasi dengan karekteristik tiap tahun. Sesuai kesimpulan menggunkan Panel FE (LSDV)
. reg lfare concen ldist ldistsq i.year
Source | SS df MS Number of obs = 4596
-------------+------------------------------ F( 6, 4589) = 523.18
Model | 355.453858 6 59.2423096 Prob > F = 0.0000
Residual | 519.640516 4589 .113236112 R-squared = 0.4062
-------------+------------------------------ Adj R-squared = 0.4054
Total | 875.094374 4595 .190444913 Root MSE = .33651
------------------------------------------------------------------------------
lfare | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
concen | .3601203 .0300691 11.98 0.000 .3011705 .4190702
ldist | -.9016004 .128273 -7.03 0.000 -1.153077 -.6501235
ldistsq | .1030196 .0097255 10.59 0.000 .0839529 .1220863
|
year |
1998 | .0211244 .0140419 1.50 0.133 -.0064046 .0486533
1999 | .0378496 .0140413 2.70 0.007 .010322 .0653772
2000 | .09987 .0140432 7.11 0.000 .0723385 .1274015
|
_cons | 6.209258 .4206247 14.76 0.000 5.384631 7.033884
------------------------------------------------------------------------------
8. Hitung dampak kenaikan dist terhadap fare dan tentukan di pada level dist berapa fare optimal? (gunakan angka rata-rata)
· Hasil estimasi dengan karekteristik tiap individu dan tahun. Sesuai kesimpulan menggunkan Panel RE
a. 1 % dist naik maka fare rata2 tiap tahun dan tiap individu turun sebesar 0.836%
b. Level dist ketika fare optimal
· Hasil estimasi dengan karekteristik tiap tahun. Sesuai kesimpulan menggunkan Panel FE (LSDV)
a. 1 % dist naik maka fare rata2 tiap tahun turun sebesar 0.902%
b. Level dist ketika fare optimal
-------------------------------------------------
Versi PDF di Scribd
Komentar
Posting Komentar