Professional Documents
Culture Documents
Huongdan Stata
Huongdan Stata
Màn hình dữ liệu hiện ra với các dữ liệu màu đỏ tức là chưa được định dạng đúng theo stata bao
gồm biến N (Mã cổ phiếu) và biến giả SIZE (Quy mô BIG hoặc SMALL) => Chuyển 2 biến này để
định dạng hợp lệ theo stata
Khai báo biến cho hợp lệ theo định dạng của Stata:
- Chuyển mã cổ phiếu (N) thành dạng số bằng cách gõ lệnh vào ô Command: encode N, gen(N1)
-> enter.
Kiểm tra lại dữ liệu bằng Data Editor lúc này xuất hiện thêm cột N1 chuyển sang màu xanh.
Kiểm tra lại dữ liệu bằng Data Editor lúc này xuất hiện thêm cột LARGE (Trong đó các ô có giá
trị BIG ở cột SIZE sẽ chuyển thành giá trị 1 tương ứng ở cột LARGE và các ô có giá trị SMALL
sẽ chuyển thành giá trị 0)
1/ pwcorr MVA Cash OCF SG Size RONA NOPAT EBITDAgrowth CEV LEV,sig
-------------+---------------------------------------------------------------
MVA | 1.0000
| 0.0000
| 0.0000 0.0000
|
RONA | 0.0212 0.0058 0.0347 0.5266 0.0127 1.0000
-------------+---------------------------
EBITDAgrowth | 1.0000
| 0.7361
| 0.0651 0.0000
Hồi qui
------------------------------------------------------------------------------
-------------+----------------------------------------------------------------
Cash | .1151382 .032887 3.50 0.001 .1178194
------------------------------------------------------------------------------
Đa cộng tuyến
3/ estat vif
-------------+----------------------
-------------+----------------------
FEM
F(6,127) = 46.17
------------------------------------------------------------------------------
-------------+----------------------------------------------------------------
-------------+----------------------------------------------------------------
sigma_u | .67684447
sigma_e | .52047909
------------------------------------------------------------------------------
F test that all u_i=0: F(55, 127) = 3.39 Prob > F = 0.0000
REM
------------------------------------------------------------------------------
-------------+----------------------------------------------------------------
-------------+----------------------------------------------------------------
sigma_u | .46848001
sigma_e | .52047909
------------------------------------------------------------------------------
Chọn REM/FEM
Note: the rank of the differenced variance matrix (5) does not equal the number of
coefficients being tested
(6); be sure this is what you expect, or there may be problems computing the test.
Examine the output
of your estimators for anything unexpected and possibly consider scaling your
variables so that the
-------------+----------------------------------------------------------------
------------------------------------------------------------------------------
chi2(5) = (b-B)'[(V_b-V_B)^(-1)](b-B)
= 7.22
. xttest0
---- Nếu là fem thì chạy . xttest3 (có khi phải cài ssc install xttest3 trong máy nếu chưa
có nhé)
Breusch and Pagan Lagrangian multiplier test for random effects
Estimated results:
| Var sd = sqrt(Var)
---------+-----------------------------
e | .2708985 .5204791
u | .2194735 .46848
Test: Var(u) = 0
chibar2(01) = 23.63
------------------------------------------------------------------------------
| Robust
-------------+----------------------------------------------------------------
-------------+----------------------------------------------------------------
sigma_u | .46848001
sigma_e | .52047909
------------------------------------------------------------------------------
F( 1, 16) = 2.204
. pwcorr EPS Cash OCF SG Size RONA NOPAT EBITDAgrowth CEV LEV,sig
-------------+---------------------------------------------------------------
EPS | 1.0000
| 0.0024
| 0.0000 0.0000
|
NOPAT | 0.3076 0.6309 0.5131 0.0342 0.8211 0.1203 1.0000
-------------+---------------------------
EBITDAgrowth | 1.0000
| 0.7361
| 0.0651 0.0000
------------------------------------------------------------------------------
-------------+----------------------------------------------------------------
------------------------------------------------------------------------------
estat vif
-------------+----------------------
SG | 1.07 0.937291
-------------+----------------------
F(5,136) = 30.03
------------------------------------------------------------------------------
-------------+----------------------------------------------------------------
-------------+----------------------------------------------------------------
sigma_u | 1856.5303
sigma_e | 918.17852
------------------------------------------------------------------------------
F test that all u_i=0: F(55, 136) = 7.39 Prob > F = 0.0000
------------------------------------------------------------------------------
-------------+----------------------------------------------------------------
-------------+----------------------------------------------------------------
sigma_u | 1072.3563
sigma_e | 918.17852
------------------------------------------------------------------------------
Note: the rank of the differenced variance matrix (4) does not equal the number of
coefficients being tested
(5); be sure this is what you expect, or there may be problems computing the test.
Examine the output
of your estimators for anything unexpected and possibly consider scaling your
variables so that the
-------------+----------------------------------------------------------------
------------------------------------------------------------------------------
chi2(4) = (b-B)'[(V_b-V_B)^(-1)](b-B)
= 19.26
xttest0
Estimated results:
| Var sd = sqrt(Var)
---------+-----------------------------
e | 843051.8 918.1785
u | 1149948 1072.356
Test: Var(u) = 0
chibar2(01) = 64.40
Prob > chibar2 = 0.0000
------------------------------------------------------------------------------
| Robust
-------------+----------------------------------------------------------------
-------------+----------------------------------------------------------------
sigma_u | 1072.3563
sigma_e | 918.17852
------------------------------------------------------------------------------
F( 1, 16) = 10.156
Favoring speed over space. To switch, type or click on mata: mata set matafavor space, perm.
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-------------+----------------------------------------------------------------
EPS |
------------------------------------------------------------------------------
Standard
Standard
SG NOPAT CEV
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Sargan test of overid. restrictions: chi2(33) = 73.70 Prob > chi2 = 0.000
Sargan test excluding group: chi2(15) = 24.13 Prob > chi2 = 0.063
Sargan test excluding group: chi2(30) = 69.62 Prob > chi2 = 0.000
Kiểm tra vi phạm giả định liên hệ tuyến tính giữa biến phụ thuộc và biến độc lập
. qnorm MVA
. qnorm EPS
. sktest MVA
-------------+---------------------------------------------------------------
. sktest EPS
-------------+---------------------------------------------------------------