Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

Sum *

Variable | Obs Mean Std. Dev. Min Max


-------------+--------------------------------------------------------
chuyencan | 200 .85 .3579675 0 1
conguoiyeu | 200 .295 .4571872 0 1
diemtrungb~h | 200 7.81215 .6606323 4.5 9
dinhhuongh~p | 200 .715 .4525472 0 1
gioitinh | 200 .3 .4594075 0 1
-------------+--------------------------------------------------------
sogiolamthem | 200 1.4575 2.017373 0 8
sogiolenmang | 200 4.11 2.306948 .5 13
sogiongu | 200 7.355 1.376937 4 12
sogiotuhoc | 200 3.3625 1.730554 0 10
solancuphoc | 200 2.665 3.037914 0 20
-------------+--------------------------------------------------------
solandichoi | 200 2.745 1.982328 0 10
stt | 200 100.5 57.87918 1 200
Tính hệsố tương quan ước lượng quan hệtương quan [-1;1] mốc so sánh 0,5 (dữ liệ u chéo), 0,7-0,8 (dữ liệ u chuỗi thời
gian): tỷ lệthuậ n/đồng biến hay tỷ lệnghịch/nghịch biến. Quan hệtương quan không xác định được chiều quan hệgiữa 2
biến. Vd: số cảnh sát, số tộ
i phạm, dân số

| diemtr~h soland~i solanc~c sogiot~c sogiongu sogiol~g sogiol~m gioitinh dinhhu~p conguo~u chuyen~n

-------------+---------------------------------------------------------------------------------------------------

diemtrungb~h | 1.0000

solandichoi | -0.3372 1.0000

solancuphoc | -0.4536 0.3087 1.0000

sogiotuhoc | 0.4228 -0.2051 -0.2870 1.0000

sogiongu | 0.0059 0.0140 0.0574 0.0137 1.0000

sogiolenmang | -0.5159 0.3408 0.3842 -0.3747 -0.0982 1.0000

sogiolamthem | -0.2915 0.2109 0.2445 -0.2435 -0.0628 0.2407 1.0000

gioitinh | -0.0326 0.0899 0.1552 -0.0047 -0.0580 0.0469 -0.0594 1.0000

dinhhuongh~p | 0.5532 -0.3111 -0.4390 0.3251 -0.0586 -0.4199 -0.2445 -0.0459 1.0000

conguoiyeu | 0.0461 0.4216 0.0498 -0.0437 0.0204 0.1263 0.0436 0.0072 -0.0045 1.0000

chuyencan | 0.3975 -0.2170 -0.4254 0.2545 -0.0443 -0.3785 -0.1794 -0.0611 0.4482 0.0261 1.0000

Tính hệsố hồi quy ước lượng quan hệnhân quả: X nguyên nhân  Y kết quả

. reg diemtrungbinh solandichoi solancuphoc sogiotuhoc sogiongu sogiolenmang sogiolamthem gioitinh dinhhuonghoctap
conguoiyeu chuyencan

Source | SS df MS Number of obs = 200

-------------+------------------------------ F( 10, 189) = 17.94

Model | 42.2979739 10 4.22979739 Prob > F = 0.0000

Residual | 44.5526035 189 .235728061 R-squared = 0.4870


-------------+------------------------------ Adj R-squared = 0.4599

Total | 86.8505774 199 .436435062 Root MSE = .48552

---------------------------------------------------------------------------------

diemtrungbinh | Coef. Std. Err. t P>|t| [95% Conf. Interval]

----------------+----------------------------------------------------------------

solandichoi | -.0480547 .0212466 -2.26 0.025 -.0899656 -.0061438

solancuphoc | -.0288444 .0138482 -2.08 0.039 -.0561612 -.0015276

sogiotuhoc | .0615198 .0222467 2.77 0.006 .0176361 .1054035

sogiongu | .0012011 .0255177 0.05 0.963 -.0491351 .0515373

sogiolenmang | -.0658522 .0183221 -3.59 0.000 -.1019944 -.0297101

sogiolamthem | -.0214814 .0183432 -1.17 0.243 -.057665 .0147023

gioitinh | .0328114 .0766754 0.43 0.669 -.1184381 .1840609

dinhhuonghoctap | .3872242 .0947852 4.09 0.000 .2002514 .574197

conguoiyeu | .2199433 .0844575 2.60 0.010 .0533429 .3865436

chuyencan | .0896128 .1145905 0.78 0.435 -.1364278 .3156534

_cons | 7.679435 .2779433 27.63 0.000 7.131165 8.227705

Biến giới tính có dấu hệsố hồi quy khác với dấu của hệsố tương quan
. vif

Variable | VIF 1/VIF

-------------+----------------------

dinhhuongh~p | 1.55 0.643798

sogiolenmang | 1.51 0.663026

solandichoi | 1.50 0.667775

solancuphoc | 1.49 0.669304

chuyencan | 1.42 0.704003

conguoiyeu | 1.26 0.794500

sogiotuhoc | 1.25 0.799205

sogiolamthem | 1.16 0.865044

gioitinh | 1.05 0.954663

sogiongu | 1.04 0.959502

-------------+----------------------

Mean VIF | 1.32

Cách khắc phục

1) Bỏ bớt biến độ


c lậ
p: biến nào có p-value lớn nhất bỏ trước

. reg diemtrungbinh solandichoi solancuphoc sogiotuhoc sogiolenmang sogiolamthem gioitinh dinhhuonghoctap conguoiyeu
chuyencan

Source | SS df MS Number of obs = 200

-------------+------------------------------ F( 9, 190) = 20.04

Model | 42.2974516 9 4.69971685 Prob > F = 0.0000


Residual | 44.5531258 190 .234490136 R-squared = 0.4870

-------------+------------------------------ Adj R-squared = 0.4627

Total | 86.8505774 199 .436435062 Root MSE = .48424

---------------------------------------------------------------------------------

diemtrungbinh | Coef. Std. Err. t P>|t| [95% Conf. Interval]

----------------+----------------------------------------------------------------

solandichoi | -.0480406 .0211886 -2.27 0.024 -.0898357 -.0062455

solancuphoc | -.0287954 .0137727 -2.09 0.038 -.0559624 -.0016285

sogiotuhoc | .0615195 .0221882 2.77 0.006 .0177527 .1052863

sogiolenmang | -.0659781 .0180781 -3.65 0.000 -.1016377 -.0303185

sogiolamthem | -.0215494 .018238 -1.18 0.239 -.0575244 .0144256

gioitinh | .0325323 .0762448 0.43 0.670 -.1178627 .1829273

dinhhuonghoctap | .3868989 .0942845 4.10 0.000 .2009202 .5728777

conguoiyeu | .2200736 .0841901 2.61 0.010 .0540063 .386141

chuyencan | .0893842 .1141865 0.78 0.435 -.1358518 .3146203

_cons | 7.68919 .1847282 41.62 0.000 7.324808 8.053571

---------------------------------------------------------------------------------

. reg diemtrungbinh solandichoi solancuphoc sogiotuhoc sogiolenmang sogiolamthem dinhhuonghoctap conguoiyeu chuyencan

Source | SS df MS Number of obs = 200

-------------+------------------------------ F( 8, 191) = 22.62

Model | 42.2547609 8 5.28184511 Prob > F = 0.0000

Residual | 44.5958165 191 .23348595 R-squared = 0.4865

-------------+------------------------------ Adj R-squared = 0.4650


Total | 86.8505774 199 .436435062 Root MSE = .4832

---------------------------------------------------------------------------------

diemtrungbinh | Coef. Std. Err. t P>|t| [95% Conf. Interval]

----------------+----------------------------------------------------------------

solandichoi | -.0474086 .0210915 -2.25 0.026 -.0890107 -.0058065

solancuphoc | -.0279446 .0135983 -2.06 0.041 -.0547667 -.0011224

sogiotuhoc | .0617671 .022133 2.79 0.006 .0181105 .1054236

sogiolenmang | -.0659799 .0180394 -3.66 0.000 -.1015619 -.0303979

sogiolamthem | -.0223369 .0181055 -1.23 0.219 -.0580493 .0133755

dinhhuonghoctap | .3876544 .0940658 4.12 0.000 .2021132 .5731955

conguoiyeu | .2190728 .083977 2.61 0.010 .0534314 .3847143

chuyencan | .0891641 .1139406 0.78 0.435 -.1355793 .3139076

_cons | 7.695212 .1837934 41.87 0.000 7.332686 8.057737

---------------------------------------------------------------------------------

Các yếu tố khác các yếu tố này ảnh hưởng lên điểm học tậ
p: mức độnhậ
n thức, trình độ(endogenous variables), external
enviroments

2) Tăng cỡ mẫu làm giảm mức độđa cộ


ng tuyến: mẫu đáng tin cậ
y (>300 quan sát)

VIF

Y X1 X2 X3

Reg x2 x1 x3, lấy R2 Tính VIF=(1/(1-R2))

Phương sai thay đổi: phần dư trong mô hình hồi quy có tương quan với các biến độ
c lậ
p. Nguyên nhân: thiếu biến giải
thích, do cấu trúc mô hình…
reg diemtrungbinh solandichoi solancuphoc sogiotuhoc sogiongu sogiolenmang sogiolamthem gioitinh dinhhuonghoctap
chuyencan  sai số (có biến conguoiyeu) = y-y (dự báo), sai số tương quan với biến solandichoi  Phương sai của sai số
thay đổi.

. estat hettest

Breusch-Pagan / Cook-Weisberg test for heteroskedasticity (kiếm định phương sai thay đổi)

Ho: Constant variance (phương sai không đổi)

Variables: fitted values of diemtrungbinh

chi2(1) = 31.26

Prob > chi2 = 0.0000 < alpha=0.05  bác bỏ giả thuyết Ho  phương sai thay đổi

. estat imtest, white (White test)

White's test for Ho: homoskedasticity (phương sai không đổi)

against Ha: unrestricted heteroskedasticity (phương sai thay đổi)

chi2(41) = 94.53

Prob > chi2 = 0.0000 < alpha=0.05  bác bỏ giả thuyết Ho  phương sai thay đổi

Cameron & Trivedi's decomposition of IM-test

---------------------------------------------------

Source | chi2 df p

---------------------+-----------------------------

Heteroskedasticity | 94.53 41 0.0000


Skewness | 30.61 8 0.0002

Kurtosis | 0.76 1 0.3829

---------------------+-----------------------------

Total | 125.90 50 0.0000

---------------------------------------------------

Cách khắc phục

1) Ước lượng vững của ma trận hiệp phương sai

. reg diemtrungbinh solandichoi solancuphoc sogiotuhoc sogiolenmang sogiolamthem dinhhuonghoctap conguoiyeu chuyencan,
robust
Linear regression Number of obs = 200

F( 8, 191) = 13.81

Prob > F = 0.0000

R-squared = 0.4865

Root MSE = .4832

---------------------------------------------------------------------------------

| Robust

diemtrungbinh | Coef. Std. Err. t P>|t| [95% Conf. Interval]

----------------+----------------------------------------------------------------

solandichoi | -.0474086 .0284671 -1.67 0.097 -.1035589 .0087416

solancuphoc | -.0279446 .0147497 -1.89 0.060 -.0570377 .0011486

sogiotuhoc | .0617671 .0201864 3.06 0.003 .0219502 .1015839

sogiolenmang | -.0659799 .0263343 -2.51 0.013 -.1179234 -.0140364

sogiolamthem | -.0223369 .0197632 -1.13 0.260 -.0613192 .0166453

dinhhuonghoctap | .3876544 .0953722 4.06 0.000 .1995364 .5757724

conguoiyeu | .2190728 .0903228 2.43 0.016 .0409145 .3972312

chuyencan | .0891641 .1379356 0.65 0.519 -.1829087 .361237

_cons | 7.695212 .1897578 40.55 0.000 7.320922 8.069502

---------------------------------------------------------------------------------

2) Phương pháp bình phương nhỏ nhất tổng quát (GLS)

reg diemtrungbinh solandichoi solancuphoc sogiotuhoc sogiolenmang sogiolamthem dinhhuonghoctap conguoiyeu chuyencan

predict phandu

gen phandu2=phandu^2
qui reg phandu2 solandichoi solancuphoc sogiotuhoc sogiolenmang sogiolamthem dinhhuonghoctap conguoiyeu chuyencan

predict wt

reg diemtrungbinh solandichoi solancuphoc sogiotuhoc sogiolenmang sogiolamthem dinhhuonghoctap conguoiyeu chuyencan
[aweight=1/wt]

reg diemtrungbinh solandichoi solancuphoc sogiotuhoc sogiolenmang sogiolamthem dinhhuonghoctap conguoiyeu chuyencan
[aweight=1/wt]

(sum of wgt is 3.3156e+00)

Source | SS df MS Number of obs = 200

-------------+------------------------------ F( 8, 191) = 25.39

Model | 51.1016573 8 6.38770716 Prob > F = 0.0000

Residual | 48.0507782 191 .251574755 R-squared = 0.5154

-------------+------------------------------ Adj R-squared = 0.4951

Total | 99.1524355 199 .498253445 Root MSE = .50157

---------------------------------------------------------------------------------

diemtrungbinh | Coef. Std. Err. t P>|t| [95% Conf. Interval]

----------------+----------------------------------------------------------------

solandichoi | -.0573268 .020873 -2.75 0.007 -.0984981 -.0161555

solancuphoc | -.0224413 .0134119 -1.67 0.096 -.0488957 .0040131

sogiotuhoc | .0577595 .0235116 2.46 0.015 .0113839 .1041352

sogiolenmang | -.0752175 .0177553 -4.24 0.000 -.1102391 -.040196

sogiolamthem | -.0196832 .0183654 -1.07 0.285 -.0559082 .0165419

dinhhuonghoctap | .3653586 .095266 3.84 0.000 .17745 .5532672


conguoiyeu | .2652936 .0856476 3.10 0.002 .0963569 .4342303

chuyencan | .1273865 .1141214 1.12 0.266 -.0977136 .3524867

_cons | 7.725162 .1862664 41.47 0.000 7.357759 8.092566

---------------------------------------------------------------------------------

You might also like