Professional Documents
Culture Documents
TM 9
Purwanto Widodo
THE GAUSS–MARKOV THEOREM
(BLUE: BEST LINEAR UNBIASNESS ESTIMATOR)
1. It is linear, that is, a linear function of a random variable, such as the dependent variable Y
in the regression model.
2. It is unbiased, that is, its average or expected value, E(βˆ2), is equal to the true value, β2
3. It has minimum variance in the class of all such linear unbiased estimators; an unbiased
estimator with the least variance is known as an efficient estimator
THE ASSUMPTIONS UNDERLYING THE
METHOD OF LEAST SQUARES
THE ASSUMPTIONS UNDERLYING THE METHOD OF LEAST SQUARES
Relaxing the Assumptions of the Classical Model
Assumption 1. The regression model is linear in the
parameters.
𝑌 𝑖= 𝛽𝑜 + 𝛽1 𝑋 1 𝑖 +𝛽 1 𝑋 1 𝑖 +… 𝛽 𝑘 𝑋 𝑘𝑖 +𝜀𝑖
Transformasikan :
Bemtuk reciprocal
Transformasikan
Assumption 2: Fixed versus Stochastic
Regressors
Relaxing the assumption that X is nonstochastic and replacing it by the
assumption that X is stochastic but independent of [u] does not change the
desirable properties and feasibility of least squares estimation.
Assumption 3: Zero Mean Value of u
Assumption 10. The stochastic (disturbance) term u is
normally distributed.
. regress y x1 x2 x3 x4
------------------------------------------------------------------------------
y | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
x1 | 2.701012 .6957689 3.88 0.001 1.270839 4.131186
x2 | 3.059606 .9373141 3.26 0.003 1.132929 4.986282
x3 | -.0160601 .0081788 -1.96 0.060 -.032872 .0007517
x4 | -.0227016 .2723061 -0.08 0.934 -.5824348 .5370317
_cons | -9.854598 8.895195 -1.11 0.278 -28.13893 8.429736
------------------------------------------------------------------------------
. predict uhat, residuals
. sktest uhat
Uji Park :
Ho : tidak ada masalah hetero
H1 : terdapat masalah hetero
Kaedah keputusan
Tolak Ho
Jika
. generate uhat2 = uhat^2
. generate luhat2 =ln(uhat2)
. generate lx1 = ln(x1)
. generate lx2 = ln(x2)
. generate lx3 = ln(x3)
. generate lx4 = ln(x4)
------------------------------------------------------------------------------
luhat2 | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
lx1 | 2.696335 3.480041 0.77 0.445 -4.456991 9.849661
lx2 | 6.185105 9.267806 0.67 0.510 -12.86514 25.23535
lx3 | 4.329269 3.893054 1.11 0.276 -3.673018 12.33156
lx4 | -2.771412 1.439765 -1.92 0.065 -5.730892 .1880677
_cons | -39.01842 19.49114 -2.00 0.056 -79.08302 1.046189
------------------------------------------------------------------------------
. generate uhat2 = uhat^2
. generate luhat2 =ln(uhat2)
. generate lx1 = ln(x1)
. generate lx2 = ln(x2)
. generate lx3 = ln(x3)
. generate lx4 = ln(x4)
2. Uji Glejser
. regress absuhat x1 x2 x3 x4
------------------------------------------------------------------------------
absuhat | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
x1 | .1806422 .4049037 0.45 0.659 -.6516493 1.012934
x2 | .0376751 .5454713 0.07 0.945 -1.083557 1.158907
x3 | .0072894 .0047597 1.53 0.138 -.0024943 .017073
x4 | -.238095 .1584689 -1.50 0.145 -.5638326 .0876425
_cons | -2.543389 5.176571 -0.49 0.627 -13.18398 8.097206
------------------------------------------------------------------------------
Uji Glejser 2
ȁ𝑢𝑖 ȁ = 𝛽𝑜 + 𝛽1ඥ𝑋1𝑖 + 𝛽2 ඥ𝑋2𝑖 + 𝛽3ඥ𝑋3𝑖 + ⋯+ 𝛽𝑘 ඥ𝑋𝑘𝑖
------------------------------------------------------------------------------
absuhat | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
akrx1 | 1.228107 1.562472 0.79 0.439 -1.9836 4.439813
akrx2 | 2.370886 3.068566 0.77 0.447 -3.936642 8.678414
akrx3 | .3163667 .1656458 1.91 0.067 -.0241231 .6568566
akrx4 | -1.620849 .7045422 -2.30 0.030 -3.069056 -.1726416
_cons | -11.03613 9.43768 -1.17 0.253 -30.43556 8.363301
------------------------------------------------------------------------------
Uji Glejser 3
------------------------------------------------------------------------------
absuhat | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
satuperx1 | -5.139322 5.328043 -0.96 0.344 -16.09127 5.812626
satuperx2 | -24.37908 23.50337 -1.04 0.309 -72.69094 23.93278
satuperx3 | 162.1468 1205.311 0.13 0.894 -2315.406 2639.7
satuperx4 | 4.443855 1.210065 3.67 0.001 1.956531 6.93118
_cons | 4.898915 2.87545 1.70 0.100 -1.011657 10.80949
------------------------------------------------------------------------------
Uji Glejser 4
1 1 1 1
|𝑢𝑖|= 𝛽 𝑜+ 𝛽1 + 𝛽2 + 𝛽3 +…+ 𝛽 𝑘
√ 𝑋 1𝑖 √ 𝑋 2𝑖 √ 𝑋 3𝑖 √ 𝑋 𝑘𝑖
. generate satuper_akrx1 = 1/x1^0.5
. generate satuper_akrx2 = 1/x2^0.5
. generate satuper_akrx3 = 1/x3^0.5
. generate satuper_akrx4 = 1/x4^0.5
Uji Glejser 4
1 1 1 1
|𝑢𝑖|= 𝛽 𝑜+ 𝛽1 + 𝛽2 + 𝛽3 +…+ 𝛽 𝑘
√ 𝑋 1𝑖 √ 𝑋 2𝑖 √ 𝑋 3𝑖 √ 𝑋 𝑘𝑖
. regress absuhat satuper_akrx1 satuper_akrx2 satuper_akrx3 satuper_akrx4
. generate satuper_akrx1 = 1/x1^0.5
Source | SS df MS Number of obs = 31
. generate satuper_akrx2 = 1/x2^0.5 -------------+---------------------------------- F(4, 26) = 3.61
. generate satuper_akrx3 = 1/x3^0.5 Model | 9.71687575
Residual | 17.5049869
4 2.42921894
26 .673268727
Prob > F
R-squared
=
=
0.0181
0.3570
. generate satuper_akrx4 = 1/x4^0.5 -------------+---------------------------------- Adj R-squared = 0.2580
Total | 27.2218626 30 .907395422 Root MSE = .82053
-------------------------------------------------------------------------------
absuhat | Coef. Std. Err. t P>|t| [95% Conf. Interval]
--------------+----------------------------------------------------------------
satuper_akrx1 | -5.961065 5.547212 -1.07 0.292 -17.36352 5.441394
satuper_akrx2 | -24.0899 19.0802 -1.26 0.218 -63.30981 15.13001
satuper_akrx3 | -20.65066 86.1758 -0.24 0.812 -197.7876 156.4862
satuper_akrx4 | 6.184132 1.787648 3.46 0.002 2.509569 9.858696
_cons | 11.65992 6.641819 1.76 0.091 -1.99253 25.31238
-------------------------------------------------------------------------------
Breusch–Pagan–Godfrey (BPG) Test (2 versi Eviews)
Cari R2
Hitung nR2
Bandingkan dengan
. . regress uhat2 x1 x2 x3 x4
------------------------------------------------------------------------------
uhat2 | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
x1 | .7521687 1.573808 0.48 0.637 -2.482839 3.987177
x2 | .2944959 2.120175 0.14 0.891 -4.063587 4.652579
x3 | .0248884 .0185003 1.35 0.190 -.0131394 .0629162
x4 | -.8902518 .615948 -1.45 0.160 -2.156351 .3758475
_cons | -11.0446 20.12065 -0.55 0.588 -52.4032 30.31399
------------------------------------------------------------------------------
White’s General Heteroscedasticity Test
Model no cross term
1. Regress :
2. Cari R2, hitung nR2, bandingkan dengan
. generate x1kuadrat = x1^2
. generate x2kuadrat = x2^2
. generate x3kuadrat = x3^2
. generate x4kuadrat = x4^2
. generate x1kuadrat = x1^2
. generate x2kuadrat = x2^2
. generate x3kuadrat = x3^2
. generate x4kuadrat = x4^2
------------------------------------------------------------------------------
uhat2 | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
x1 | 40.70797 53.60411 0.76 0.456 -70.46015 151.8761
x2 | 8.554251 13.76868 0.62 0.541 -20.00024 37.10874
x3 | .0572075 .1357739 0.42 0.678 -.2243704 .3387854
x4 | -2.587839 1.972473 -1.31 0.203 -6.678497 1.502819
x1kuadrat | -4.451784 5.706431 -0.78 0.444 -16.2862 7.38263
x2kuadrat | -.3728507 .8909715 -0.42 0.680 -2.220613 1.474911
x3kuadrat | -.0000492 .0000705 -0.70 0.492 -.0001955 .000097
x4kuadrat | .1068085 .0738011 1.45 0.162 -.0462457 .2598627
_cons | -133.7902 156.4465 -0.86 0.402 -458.2404 190.6601
------------------------------------------------------------------------------
White’s General Heteroscedasticity Test
Model cross term
Regress :
------------------------------------------------------------------------------
uhat2 | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
x1 | 173.2675 149.4464 1.16 0.263 -143.5448 490.0798
x2 | 115.2211 137.7649 0.84 0.415 -176.8274 407.2697
x3 | -.783325 1.127542 -0.69 0.497 -3.173607 1.606957
x4 | 20.92119 46.82531 0.45 0.661 -78.34402 120.1864
x1kuadrat | -11.29855 10.19308 -1.11 0.284 -32.90691 10.30981
x2kuadrat | -6.403126 7.084332 -0.90 0.379 -21.42124 8.614988
x3kuadrat | .0003466 .0009106 0.38 0.708 -.0015837 .0022769
x4kuadrat | .5718936 .8437312 0.68 0.508 -1.216737 2.360524
x1x2 | -12.0206 10.5415 -1.14 0.271 -34.36758 10.32637
x1x3 | .0738459 .0810441 0.91 0.376 -.0979598 .2456516
x1x4 | -2.16023 3.089268 -0.70 0.494 -8.709184 4.388725
x2x3 | .0476595 .1294459 0.37 0.718 -.2267535 .3220726
x2x4 | -.4037976 4.41818 -0.09 0.928 -9.769921 8.962325
x3x4 | -.0303487 .0526993 -0.58 0.573 -.1420663 .0813688
_cons | -677.8232 814.1762 -0.83 0.417 -2403.8 1048.153
------------------------------------------------------------------------------
. regress y x1 x2 x3 x4
------------------------------------------------------------------------------
y | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
x1 | 2.701012 .6957689 3.88 0.001 1.270839 4.131186
x2 | 3.059606 .9373141 3.26 0.003 1.132929 4.986282
x3 | -.0160601 .0081788 -1.96 0.060 -.032872 .0007517
x4 | -.0227016 .2723061 -0.08 0.934 -.5824348 .5370317
_cons | -9.854598 8.895195 -1.11 0.278 -28.13893 8.429736
------------------------------------------------------------------------------
. . estat hettest
chi2(1) = 1.11
Prob > chi2 = 0.2916
. estat hettest, rhs
chi2(4) = 6.69
Prob > chi2 = 0.1531
. estat imtest
---------------------------------------------------
Source | chi2 df p
---------------------+-----------------------------
Heteroskedasticity | 19.23 14 0.1562
Skewness | 6.98 4 0.1368
Kurtosis | 0.57 1 0.4506
---------------------+-----------------------------
Total | 26.79 19 0.1098
---------------------------------------------------
. estat szroeter, rhs
---------------------------------------
Variable | chi2 df p
-------------+-------------------------
x1 | 2.05 1 0.1523 #
x2 | 2.73 1 0.0986 #
x3 | 2.86 1 0.0911 #
x4 | 3.12 1 0.0773 #
---------------------------------------
# unadjusted p-values
Penanganan hetero
Transformasi ke bentuk logaritma/ ln
Transformasi ke bentuk 1/ln
Robust standard error HCCME (heteroscedasticity Consistence covariance
marix estimator
Regress y x1 x2 x3 x4, vce(robust)
Fisible General Least Square
generate z1 = x1 dst
Regres y x1 x2 x3 x4
Predict ehat, residuals
Generate lehat2 = ln(ehat*ehat)
Regress lehat2 z1 z2 z3 z4