You are on page 1of 116

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

MC LC
M U ........................................................................................... 3
1 S LIU DNG TRONG EVIEWS...................................... 7
2 NHP S LIU T BN PHM X L S LIU ....... 11
2.1 nh dng tn sut v nhp s liu ......................................... 12
2.2 Sa i s liu v lu s liu .................................................. 15
2.3 V th.................................................................................. 16
2.4 Thng k m t ....................................................................... 19
2.3 t bin mi ........................................................................... 21
3 C LNG M HNH HI QUY N ........................ 23
3.1 c lng m hnh................................................................. 23
3.2 Lu kt qu hi quy ................................................................ 26
3.3 Xem phn d v gi tr c lng (gi tr tng hp) ........... 26
4 HI QUY NHIU BIN C LP .................................... 28
4.1 M tp s liu c sn .............................................................. 28
4.2 nh gi chung v cc bin .................................................... 28
4.3 Hi quy m hnh nhiu bin ................................................... 29
4.4 Phng sai, hip phng sai cc c lng h s .................. 31
4.5 Kim nh b bt bin ............................................................ 31
4.6 Kim nh thm bin............................................................... 33
4.7 Kim nh v hai h s hi quy .............................................. 34
5 CC DNG M HNH ........................................................ 36
5.1 Bin xu th thi gian............................................................... 36
5.2 Hi quy vi bin tr ................................................................ 37
5.3 Hi quy m hnh dng hm m .............................................. 37

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

6 M HNH VI BIN GI ................................................... 39


6.1 Xc nh yu t nh tnh........................................................ 39
6.2 t bin gi ............................................................................. 40
6.3 Hi quy m hnh c bin gi................................................... 40
7 HIN TNG A CNG TUYN .................................... 42
7.1 a cng tuyn hon ho.......................................................... 42
7.2 a cng tuyn khng hon ho............................................... 42
7.3 Hi quy ph kim nh a cng tuyn.................................... 44
8 HIN TNG PHNG SAI SAI S THAY I.......... 45
8.1 Hin tng .............................................................................. 45
8.2 Kim nh White..................................................................... 46
8.3 Lu phn d v gi tr c lng ........................................... 48
8.4 Kim nh bng hi quy ph................................................... 50
8.5 Khc phc phng sai sai s thay i..................................... 51
9 HIN TNG T TNG QUAN.................................... 53
9.1 Hin tng .............................................................................. 53
9.2 Kim nh Breusch-Godfrey................................................... 54
9.3 Kim nh bng hi quy ph................................................... 56
9.4 Khc phc t tng quan........................................................ 57
10 NH DNG M HNH..................................................... 60
10.1 Kim nh Ramsey RESET .................................................. 60
10.2 Kim nh nhn t Lagrange (kim nh 2) ........................ 62
10.3 Khc phc khuyt tt tng hp ............................................. 63

thc hnh, c th ti chng trnh Eviews4 ti trang mng ca


khoa Ton kinh t: www.mfe.edu.vn, mc Th vin / D liu
phn mm / Eviews4, v gii nn. Chng trnh c th chy trc
tip, khng yu cu ci t.

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

M U
Eviews l phn mm c thit k ring cho cc m hnh kinh t
lng v chui thi gian. Phn mm ny ph hp cho ging dy v
hc tp kinh t lng cho i tng sinh vin i hc v sau i hc.
Chng trnh Eviews c thit k d s dng vi con chut v bn
phm, cc kt qu thit k di dng bng, cc th c lu di
dng tp c th a vo cc vn bn hoc in ra d dng.
Cun sch ny tp trung gii thiu nhng phn thc hnh tng ng
vi chng trnh Kinh t lng c bn ging cho sinh vin bc i
hc, cc phn thc hnh nng cao dnh cho bc cao hc s gii thiu
trong cun sch khc. Vi chng trnh Eviews4, khng yu cu ci
t chng trnh, ch cn c y cc tp v nhn vo biu tng ca
Eviews l c th chy chng trnh trc tip trn my tnh. T phin
bn Eviews5 tr i, chng trnh yu cu phi ci t. Cun sch ny
s dng hnh nh ca phin bn Eviews4.
Tp chy chng trnh Eviews c biu tng l

. Nhn vo biu

tng ca Eviews, ca s chnh ca chng trnh xut hin.


Ca s chnh ca chng trnh Eviews gm cc phn:
- Thanh chc nng: vi cc nt thc hin cc thao tc c bn
c chng trnh nh sn, v cc la chn nh dng
tng t nh cc chng trnh chy trong mi trng
Windows.
- Ca s lnh: trng bn di thanh chc nng l ni ngi
s dng vit lnh trc tip. C th dng chut ko rng ca
s lnh ty .

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

Thanh ch dn: xc nh ng dn n th mc v tp ang s


dng.
Cc nt thu nh, m rng ca s, v thot khi chng trnh.

Ca
s
lnh

Thanh
chc
nng

Thanh
ch
dn

Thot
khi
Eviews

Ca s chnh ca chng trnh Eviews gm cc phn:


- Thanh chc nng: vi cc nt thc hin cc thao tc c bn
c chng trnh nh sn, v cc la chn nh dng
tng t nh cc chng trnh chy trong mi trng
Windows.
- Ca s lnh: trng bn di thanh chc nng l ni ngi
s dng vit lnh trc tip. C th dng chut ko rng ca
s lnh ty .
- Thanh ch dn: xc nh ng dn n th mc v tp ang s
dng.
- Cc nt thu nh, m rng ca s, v thot khi chng trnh.

C th khng cn s dng chut m dng bn phm chn la cc


nt. n v gi phm Alt trn bn phm, trn dng task bar cc la chn

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

s t ng gch chn cc ch ci. Khi phm Alt v nhn phm


tng ng vi ch ci tng ng s cho kt qu ging nh khi dng
chut chn nt .
V d: Khi gi phm Alt, g phm F tng ng vi nhn chut vo
nt File; ch E tng ng vi nt Edit.

- Ngn cch phn nguyn v phn thp phn ca mt s, Eviews dng


du chm .
Mt s ch th c bn ca Eviews
Eviews lm vic vi mt s dng ch th c bn, mi ch th c th
lu li v t tn c th d dng s dng khi cn thit. Mt s ch
th thng dng gm:
Series: Mi bin l mt chui s liu, do Eviews dng cch
gi Series cho cc bin.
Group: Mt nhm bin s c la chn l mt Group. Group
c th gm tt c cc bin hoc ch hai bin.
Graph: Mt th c lu li di dng mt Graph. th c
th gm th ca mt bin, th ca nhiu bin, th ca cc
bin theo nhau.
Equation: Mt phng trnh hi quy c lu li di dng mt
Equation.
System: Mt h gm nhiu phng trnh hi quy c lu li
di dng mt System.
5

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

Mt s k hiu dng cho thc hnh


:

Thao tc, thc hin thao tc yu cu.


V d

:
:
[?] :

Chn View : dng chut nhn vo nt View

Kt qu ca thao tc.
Cc thao tc, chn la k tip nhau.
V d: File Open: Chn nt File ri nt Open.
Cu hi, cn nm c l thuyt tr li.

Tt c cc cu hi kim nh trong sch u c thc hin vi


mc ngha l 5%.
Cp ngoc vung []: do trong Eviews c th m nhiu ca s cng
lc, do cp ngoc vung xc nh ca s cn thc hin thao tc.
V d [Eviews] l ca s chnh.
- ngn gn v thun tin v sau, cc nt trn cc ca s c vit
trong cp du < >, v d: <Ok>, <Cancel>

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

1 S LIU DNG TRONG EVIEWS


Eviews l chng trnh x l s liu, c lng phng trnh hi quy,
phn tch chui thi gian, do vic hiu r v s liu l iu cn
thit. hiu r cu trc s liu c qun l v x l bi Eviews, m
mt s b s liu v quan st cc s liu sau
M b s liu c tn sut theo nm
Ti ca s chnh, chn File Open

Trong la chn Open, c bn dng nh dng tp c th m:


- Dng Workfile: l tp d liu v thc hin cc phn tch thng
thng. y l dng c bn, trong tp c th lu s liu, cc
th, cc phng trnh hi quy, kt qu c lng.
- Dng Database: c s d liu, bao gm nhiu nh dng.

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

Dng Program:
Dng Text File

Chn dng Workfile, l dng thng thng nht tnh ton x l


s liu vi Eviews.
Chn th mc SOLIEU, tp s liu BT_YEAR_US, ca s
Workfile m ra. Trn ca s ny c mt s thng tin:
- Dng trn cng: Tn ca Workfile v ng dn
- Cc nt vi cc chc nng khc nhau, s c cp sau
- Khong s liu v Mu t 1899 n 1922
Bn di ca ca s, lit k cc ch th m Workfile ang qun l,
gm:
c
k
l resid
y.

c th thy r hn thng tin m cc ch th ny cha ng, ti ca


s Workfile, nhn vo nt Label+/-, xut hin cc thng tin v thi
gian khi to cc s liu ny, theo th t: thng/ngy/nm, gi:pht,
v ch thch v ba bin k, l, y.
Hai ch th

resid khng c ch thch, v y l hai ch th c

bit dng lu cc thng tin ring.


Thng tin ca mt bin s thng thng bao gm:
- Tn bin: Tn ca bin s c t ngn gn, ti a 24 k t ch gm
ch v s, khng c du cch, bt u bi ch ci. Tn bin thng
c t ph hp vi ni dung ca bin.
- Nhn bin: Phn ch thch v ngha ca bin, c th l chui k t
vi di ty , vi cc t c bit, du cch.
- Tn sut bin: l tn sut ca s liu, c th theo thi gian, khng
gian, hoc s liu hn hp.

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

- Gi tr ca bin: l cc i lng o lng bng s. Trong chng


trnh Eviews, du ngn cch vi phn thp phn l du chm. Khi cha
c gi tr, Eviews ngm nh s dng ch NA (not available) thay
th.
c : ch th cha cc h s tnh c t cc phng trnh hi quy,
cc m hnh. Khi cha c kt qu hi quy t phng trnh no, cc gi
tr ca C c gn bng 0
resid: l chui nhn s nhn gi tr l phn d t c c t vic
c lng cc phng trnh hi quy. Khi cha c phng trnh hi
quy, cc gi tr Resid u cha c.
Nhn p chut tri vo

c, ca s [Coef C] m ra, vi ct C1

gm cc quan st t R1 n R751, vi cc gi tr bng 0.


Nhn p chut tri vo

k, ca s [Series: K] m ra. Ct ngoi

cng bn tri obs l tn sut ca s liu, t 1899 n 1922, cc gi tr


ca bin K c lit k theo cc quan st t ct tip theo trong bng.
Nhn p chut tri vo

resid, ca s [Series: RESID] m ra vi

quan st t 1899 n 1922, cc gi tr u l NA v cha c kt qu


tnh ton no c thc hin.
Ti ca s [Workfile], s dng chut nh du (bi en) cc bin t
K n Y, nhy chut phi, chn Open as Group, tt c cc bin u
c lit k trong cng mt ca s [Group].
M b s liu c tn sut theo Qu
M b s liu mi, ti ca s [Eviews] File New, chn tp

Bt_Quarter.

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

B s liu c th hin t 1953:1 n 1967:4, vi mt ch s sau du


:. Vi cch th hin ny, s liu l t Qu 1 nm 1953 n Qu 4
nm 1967.
Chn bin bt k, chng hn X, m ra di dng ca s [Series].
Vi ca s ny, tn sut bin c chu k 1, 2, 3, 4, 1, th hin y l
s liu Qu.
M b s liu c tn sut theo Qu
M b s liu mi, ti ca s [Eviews] File New, chn tp
Bt_Monthly.
B s liu c th hin t 1973:01 n 1995:06, vi hai ch s sau
du :, th hin l s liu t Thng 1 nm 1973 n Thng 6 nm
1995.
bit ngha cc bin, chn nt Label trn thanh chc nng ca ca
s [Workfile].

10

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

2 NHP S LIU T BN PHM X L S LIU


S liu dng cho Eviews c th l tp c sn di cc nh dng khc
nhau, hoc s liu t bn ngoi cn phi nhp vo my. Bi ny hng
dn thc hnh s liu t bn ngoi vo my tnh, lu s liu, v cc x
l thng tin c bn cho b s liu .
Xt b s liu v d sau, vi X l u t quc gia (Gross National
Investment), Y l tng sn phm quc ni (Gross Domestic Products)
ca Vit Nam theo cc nm t 1994 n 2005. C hai bin n v l
nghn t VND, tnh theo gi so snh 1994. Ngun: Tng cc thng k.
NmXY1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
200553

58
67

11

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

Thc hin nhp s liu v lu li di dng mt tp s liu ca


Eviews.

2.1 nh dng tn sut v nhp s liu


Ti ca s chnh ca Eviews, thun tin, ng ca s nh ang m
(nu c)
Chn File New : Ca s [Workfile Range]: tn sut ca s liu.

Frequency - tn sut ca s liu


Tn sut v
nh dngV dTn sut v
nh dngu cui nghaAnnual
(Nm)
yyyyStart: 1991
End: 200515 quan st theo nm, t nm
1991 n nm 2005Semi-annual
(Na nm)
yyyy:hStart: 1991:1
12

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

Quarterly
(Qu)
yyyy:qStart: 1991:1
End: 2005:460 quan st theo qu, t qu 1
nm 1991 n qu 4 nm 2005Monthly
(Thng)
yyyy:mmStart: 1991:01
End: 2005:12180 quan st theo thng, t
thng 1 nm 1991 n thng
12 nm 2005Weekly
(Tun)
mm/dd/yyyyStart: 01/01/2008
End: 12/01/200849 quan st theo tun, t tun
c ngy 1 thng 1 nm 2008
n tun c ngy 1 thng 12
nm 2008Daily [5day]
(Ngy: tun 5
ngy)
mm/dd/yyyyStart: 11/12/2008
End: 12/11/200822 quan st theo ngy, t ngy
- Vi tn sut theo thi gian, ring s liu trong giai on 1930
2029, th s ch Nm c th dng bi hai ch s, v d 67 c
hiu l 1967, hoc 12 c hiu l 2012, vi giai on khc bt
buc phi 4 ch s.
- S ch Ngy, Thng vi gi tr nh hn 10 c th ch dng mt ch
s, v d s liu thng, 2000:1 v 2001:01 l nh nhau.
- Vi s liu tn sut theo Ngy, Tun, Eviews ngm nh s dng
quy c ca M, l Thng/Ngy/Nm (mm/dd/yyyy). C th thay

13

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

i th t ny sang quy c chu u l Ngy/Thng/Nm bng


cch chn Option > Frequency Conversion Dates >.
Vi s liu theo Tun, quan st u tin v cui cng s l tun c
cha ngy nhp vo, v ly ngy lm i din cho tun. Cc
quan st s ly ngy c cng Th vi quan st u tin lm i
din. V d nu quan st u tin l 1/1/2008, th ton b tun t
30/12/2007 n 5/1/2008 ly ngy 1/1/2008 lm i din, v i
din cho tun t 6/1/08 12/1/08 s ly ngy 8/1 lm i din.
Vi s liu Ngy tnh cho tun 5 ngy, nu thi im bt u ri
vo ngy cui tun, th quan st u tin s bt u t Th Hai ca
tun tip theo; v nu thi im cui cng ri vo ngy cui tun,
th quan st cui cng s kt thc Th Su ca tun trc .
Tn sut Undated dng cho s liu khng thuc cc trng hp

trn; nh tn sut theo gi, theo phin, s liu cho, s liu hn


hp.
Vi b s liu v d trn ca Vit Nam, tn sut ca cc bin l theo
nm, t 1994 n 2005.
Frequency:

Annual Start date: 1995 End date: 2005 : m

ca s Workfile
Ca s [Workfile] l ca s qun l vic nhp, lu, x l s liu.
Trong ca s Workfile ch c hai bin l cc h s C v phn d
Resid. Cn to hai bin s mi v nhp s liu.
Ti ca s [Eviews], chn Quick Empty Group (Edit Series)
M ca s [Group]
Chn u tin bn phi obs, nhp tn bin l X, cc bn di
t ng chuyn thnh NA, nhp cc gi tr ca bin X ng vi cc
nm. Tip tc vi ct bin Y.
Ti ca s [Workfile], biu tng ca hai bin X v Y xut hin.

14

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

Nhp nhn bin


Hai bin X v Y nhp cha c nhn, cn nhp nhn ch thch
ngha ca cc bin.
Ti ca s [Workfile], nhn chut p vo bin X, m ca s
[Series: X] chn Name, m ca s [Object Name]

Trong ca s ny, trng trn cho php thay i tn bin, trng


bn di nhp nhn bin. Vi v d ang xt, nhn cho bin X l
Gross National Investment.
Tng t, c th nhp nhn cho bin Y l Gross Domestic Products.

2.2 Sa i s liu v lu s liu


Trng hp cn sa i s liu, v d bin X c th thc hin theo
trnh t:
Chn bin X, m ca s [Series: X], chn nt Edit+/- v thay i
cc gi tr cn thit.

15

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

S liu nhp c th lu li di dng tp chuyn dng ca Eviews,


c th m v s dng khi cn thit.
Ti ca s [Eviews] Chn File Save (hoc Save as)
Ca s [SaveAs] : Chn v tr v tn tp.
Cc tp c ui ngm nh l .wf1.
S liu nhp phn 2.1 l s liu th. thy c r hn cc
thng tin cha ng trong cc bin , cn thc hin tnh cc thng k
vi tng bin, xem xt tng quan, th m t v cc bin v mi
lin h gia chng.

2.3 V th
M t s liu qua th v cc thng k c trng c bn l x l ban
u cn thit i vi cc bin s.
Chn X v Y, m ca s [Group]
V th cc bin theo quan st
[Group] View Graph Line
Kt qu cho th ng ca X v Y theo quan st (theo thi gian)
trn cng mt h ta

16

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

C th chn cc loi th khc: Bar, Spike ( th ct).


v th ca hai bin theo nhau, mi bin trn mt trc ta , la
chn:
[Group] View Graph Scatter Simple Scatter
Kt qu cho th im ca bin Y trn trc tung v X trn trc
honh. Khi khng c la chn c yu cu, Eviews ngm nh bin
xp sau nm trn trc tung, bin xp trc nm trc honh.
Qua th im, c th thy xu th kh r gia Y v X, c th xc
nh c hnh nh ca ng hi quy bng cch chn:
[Group] View Graph Scatter Scatter with Regression
Ca s [Global Fit Option], nu khng nh dng c bit, chn OK,
kt qu l th im vi ng hi quy

17

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

Cc la chn khc cho php v th theo cc dng khc nhau. Cc


th s t ng iu chnh kht vi kch thc ca s [Group].
Lu th
C th lu th chn vo cc chng trnh son tho vn bn
Ti ca s [Group] c th, nhn t hp phm Ctrl+C, m ca s
[Graph Metafile], chn OK, m vn bn v nhn Ctrl+V dn th
lu.
Thay i nh dng th:
Ti ca s [Group] c th, chn Freeze, m ca s [Graph].
Vi la chn [Graph] Proc Options : ca s [Graph Option] vi
cc la chn cho nh dng.
[Graph] Proc Add text: Thm dng ch vo th
[Graph] Proc Save Graph: lu th chn vo vn bn
[Graph] Name: lu th di dng mt ch th, t tn.
Ngoi ra cn nhiu la chn khc vi th

18

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

Bn cnh cch chn v th t ca s [Graph], c th c cch khc


v th:
Ca s [Eviews] Quick Graph: chn loi th, v th t ca cc
bin v th.
V th trn nhiu h ta
Khi mun v th cho mi bin trn mt h ta ring, chn:
[Group] Multiple Graphs.

2.4 Thng k m t
Cc thng k m t v cc bin v tng quan gia cc bin l nhng
thng tin c bn nh gi v bin.
Thng k m t ca cc bin
Ca s [Group] View Descriptive Stats Common Sample
X

Trung bnh
Trung v
Ti a
Ti thiu
lch chun
H s bt i xng
H s nhn

Mean
Median
Maximum
Minimum
Std. Dev.
Skewness
Kurtosis

112.7500
97.00000
195.0000
53.00000
51.36523
0.402047
1.666396

274.3333
265.0000
393.0000
179.0000
66.98213
0.304621
2.030123

Thng k JB
Mc xc sut

Jarque-Bera
Probability

1.212534
0.545383

0.655918
0.720393

Tng
Tng bnh phng chnh lch

Sum
Sum Sq. Dev.

1353.000
29022.25

3292.000
49352.67

S quan st

Observations

12

12

Thng k JB v Mc xc sut (P-value) dng kim nh v cp gi


thuyt vi tng bin:

19

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

H0: bin phn phi theo quy lut Chun


H1: bin khng phn phi theo quy lut Chun
H s tng quan
[Group] View Correlations Common Sample
Kt qu:

X
Y

1.000000
0.982533

0.982533
1.000000

Phng sai - hip phng sai


[Group] View Covariances Common Sample
Kt qu:

X
Y

2418.521
3098.750

3098.750
4112.722

Kim nh so snh cc bin


Kim nh so snh trung bnh, trung v, phng sai ca hai bin
[Group] View Test of Equality, m ca s [Test Between
Series].
C ba la chn kim nh
Kim nh s bng nhau ca hai trung bnh: Mean
Test for Equality of Means Between Series
Sample: 1994 2005
Included observations: 12
Method
df
Value
t-test
22
6.631244
Anova F-statistic
(1, 22)
43.97339

Probability
0.0000
0.0000

Kim nh s bng nhau ca hai phng sai: Varianc


Test for Equality of Variances Between Series

Sample: 1994 2005


Included observations: 12
20

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

Method
F-test
Siegel-Tukey
Bartlett
Levene
Brown-Forsythe

df
(11, 11)
1
(1, 22)
(1, 22)

Value
1.700511
0.086621
0.732933
0.686207
0.562284

Probability
0.3921
0.9310
0.3919
0.4164
0.4613

Cc phn tch thng k ca cc kim nh c cho trong cc thng tin


bn di mi kim nh.

2.3 t bin mi
Bn cnh cc bin nhp s liu l X v Y, c th t cc bin mi
t cc bin c hoc nhp bin s mi. C mt s cch nhp bin
mi c tc dng tng ng.
V d: cn t bin mi Z = Y X
[Eviews] Quick Generates Series: m ca s [Generate Series by
Equation]
Ti Enter Equation g: Z = Y X
Ti Sample, ngm nh mu m lnh t bin c tc dng l ton b.
Khi cn c th thay i mu ny. Nhn OK chp nhn.
Khi khng cn thay i mu, c th s dng lnh trong Ca s lnh.
[Ca s lnh] GENR Z = Y X
Bin Z c to ra nm trong ca s [Workfile].
Cc hm v lnh c bn
Ngoi cc php ton c bn: cng [+], tr [], nhn [*], chia [/], ly
tha [^], cc hm c bn ca Eviews nh sau:

21

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

Tn nghaV dKt quLOGLogarit c s t


nhinLX = LOG(X)LX i = ln( X i )EXPLy tha c s
t nhinEX = EXP(X)X i
EX i = eABSGi tr tuyt iAX = ABS(X)AX i = | X i |SINHm
sinSINX = SIN(X)SINX i = sin( X i )COSHm cosinCOSX =
COS(X)COSX i = cos( X i )(-J)Tr bc JX4 = X(-4)X 4i = X
i 4D(X)Sai phn bc 1DX = D(X)DX i = X i X i 1

t bin xu th thi gian


[Ca s lnh] GENR T = TREND( )
Kt qu cho bin T nhn gi tr 0, 1, 2 phn nh xu th ca thi gian
tng dn theo cc quan st.

22

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

3 C LNG M HNH HI QUY N


(Tip theo 2)
Vi b s liu t bi 2, nhn xt qua th gia Y v X, thy gia hai
bin c xu th tuyn tnh kh r, h s tng quan gia hai bin bng
0,982533 kh ln, do c th xc nh mt m hnh hi quy trong
Tng sn phm trong nc (Y) ph thuc vo Tng u t quc gia
(X) c dng tuyn tnh vi hai h s.
Hm hi quy tng th PRF:
E (Y / X t ) = 1 + 2 X t
Dng ngu nhin

Yt

= 1 + 2 X t + ut M hnh (3.1)

Nu xt bin hng s C lun bng 1, c th vit m hnh (3.1):


Yt = 1Ct + 2 X t + ut
Vi mu kch thc l 10 gm 10 quan st nhp, hm hi quy mu
SRF c dng:

Y = 1 + 2

X
Y = 1 + 2 X t + et
Dng phng php Bnh phng nh nht (Least Squares - LS) vi b
s liu nhp, tnh ton cc c lng, v cc thng k cn thit
dnh cho phn tch.

3.1 c lng m hnh


[Eviews] Quick Estimate Equation
(Ngoi ra cn 4 cch khc, c cp sau)
Ca s nh dng phng trnh xut hin.

23

t
t

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

Ca s [Equation Specification] gm khai bo phng trnh hi quy,


phng php c lng, mu c lng.

Khai bo phng trnh hi quy

Vi m hnh hi quy Y theo X c h s chn, c hai kiu khai bo:


Kiu 1: Y = C(1) + C(2)*X
Kiu 2: Y C X
S dng kiu khai bo th hai, phng php LS bnh phng nh
nht, mu 1994 2005, c kt qu ca s [Equation]
Dependent Variable: Y
Method: Least Squares
Date: Time:
Sample: 1994 2005
Included observations: 12
Variable
Coefficient
C
129.8715
X
1.281258

Std. Error
9.439523
0.076739

R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood
Durbin-Watson stat

Mean dependent var


S.D. dependent var
Akaike info criterion
Schwarz criterion
F-statistic
Prob(F-statistic)

0.965370
0.961907
13.07316
1709.075
-46.78007
1.035566

t-Statistic
13.75826
16.69636

Prob.
0.0000
0.0000
274.3333
66.98213
8.130011
8.210829
278.7683
0.000000

24

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

Nu s dng cch khai bo th nht: Y = C(1) + C(2)*X th kt qu


ch khc phn th hin cc h s nh sau
Y = C(1) + C(2)*X

C(1)
C(2)

Coefficient

Std. Error

t-Statistic

Prob.

129.8715
1.281258

9.439523
0.076739

13.75826
16.69636

0.0000
0.0000

Cc thng tin khc vn gi nguyn


Bn cnh Cch 1 [Eviews] Quick Estimate Equation nh trn, cn
mt s cch sau:
Cch 2: [Eviews] Objects New Object Equation OK
Cch 3: Chn X, Y thnh ca s [Group] Procs Make Equation
Cch 4: Chn X v Y, nhn chut phi Open As Equation
Cch 5: [Ca s lnh] LS Y C X
Cch s dng lnh LS Y C X l n gin nht, s c s dng trong
cc phn sau.
Cc kiu th hin kt qu hi quy
[Equation] View Representations : c cc kt qu
Estimation Command:
=====================
LS Y C X

Cu lnh c lng
(vit trong ca s lnh)

Estimation Equation:
=====================
Y = C(1) + C(2)*X

Phng trnh hi quy

Substituted Coefficients:
=====================

Kt qu c lng

Y = 129.8714549 + 1.281258345*X

[Equation] View Estimation Output : bng kt qu chi tit

25

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

3.2 Lu kt qu hi quy
Kt qu hi quy c th c lu gi, bin tp, in ra nh mt vn bn.
Trong ca s kt qu
[Equation] Name: ca s [Object Name], tn ngm nh cho kt qu
c lng phng trnh hi quy l eq01. Nu chn OK, th ch th
eq01 c to ra trong Workfile.
Mun sao v dn kt qu c lng chn vo cc vn bn, dng
chut nh du ton b bng kt qu chi tit, nhn chut phi, chn
Copy, chn loi gi nguyn nh dng hoc khng gi nh dng, ri
ti ni cn dn chn Paste; hoc s dng t hp Ctrl+C v Ctrl+V.

3.3 Xem phn d v gi tr c lng (gi tr tng hp)


Sau khi c lng mt m hnh hi quy, c th nh gi cht lng
ca m hnh v kt qu thng qua cc gi tr phn d (residuals) v
cc gi tr c lng ca bin ph thuc (cn gi l gi tr tng hp
fitted values).
[Equation] View Actual, Fitted, Residual Actual, Fitted,
Residual Table
c bng gi tr v th phn d
Actual l gi tr thc t b s liu: Yt
Fitted l gi tr c lng bi hm hi quy: t
Residual l gi tr phn d: et hay t

26

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

[?] - Vo nm no gi tr quan st v gi tr c lng gn nhau


nht, xa nhau nht?
- Nm 2000 c gi tr quan st cao hay thp hn gi tr c
lng? Cao (thp) hn bao nhiu?
- Phn d c nm ra ngoi hai ng bin khng?
- Trong giai on no th ng hi quy m t gn ng nht s
bin ng ca bin ph thuc Y?

C th xem th ca gi tr thc t, gi tr c lng, v phn d trn


cng h ta hoc th ca ring phn d bng cch chn Actual,
Fitted, Residual Graph. Cc th ny c th lu li hoc ct dn vo
cc vn bn tng t nh th ca cc bin X, Y.

27

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

4 HI QUY NHIU BIN C LP


Bi ny s s dng b s liu BT1CH1.wf1 c sn nm trong th mc
SOLIEU thc hnh. y l b s liu v mt s ch tiu kinh t v
m ca Vit Nam.

4.1 M tp s liu c sn
[Eviews] File Open
Chn tp s liu BT1CH1 trong th mc tng ng
Ca s [Workfile] gm cc bin s c bn ca kinh t v m Vit Nam
t nm 1980 n 1996: GDP GAP GIP EX IM, n v l t USD
tnh theo gi so snh 1994.
[?] - ngha ca cc bin s trong b s liu l g?
- nh gi xu th chung ca cc bin theo thi gian nh th no?
Cc bin c xu th tng hay khng?
- Mc xut khu tng ln t bin trong nm no? Lin h vi
thc tin, c th gii thch g v mc tng ?
- So snh gia EX v IM nh gi xem trong cc nm, nm
no c xut siu, nhp siu, c cn bng cn cn thng mi?
- So snh gia GAP v GIP nh gi gia tng sn phm nng
nghip v cng nghip.

4.2 nh gi chung v cc bin


V th ca cc bin theo thi gian, mi bin mt th (Multiple
Graphs) v nhn xt v xu th ca cc bin.
V th ca GDP, GAP, GIP trn cng mt h trc ta
(Graphs) v so snh mc tng trng ca cc bin.

28

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

[?] - So snh trong hai trng hp, khi GAP mc ti thiu, v


GIP mc ti thiu, khi GDP trong trng hp no ln hn?
- C phi GDP lun lun tng theo hai bin khng?
- GDP tng theo bin no nhanh hn?

Xem cc thng k c trng mu ca tt c cc bin (Descriptive


Stats)
[?] - Bin no c gi tr trung bnh ln nht, nh nht?
- Bin no c s bin ng tuyt i o bng phng sai ln nht,
nh nht
- Bin no c s bin ng tng i o bng h s bin thin ln
nht, nh nht?
- H s lch ca bin no ln nht, nh nht?
- Kim nh v tnh phn phi chun ca cc bin?

Xem ma trn tng quan ca cc bin (Correlations)


[?] - Cc bin c tng quan thun chiu hay ngc chiu?
- Cp bin no c tng quan ln nht, nh nht?
- Tng sn phm quc ni tng quan vi bin no nhiu nht, t
nht? quan h l tng quan cng chiu hay ngc chiu?

4.3 Hi quy m hnh nhiu bin


Xt m hnh hi quy
E(GDP/GAPt , GIPt) = 1 + 2 GAPt + 3 GIPt (MH 4.1)
GDPt
GDPt

= 1 + 2 GAPt + 3 GIPt + ut
= 1Ct + 2 GAPt + 3 GIPt + ut

[Ca s lnh] LS GDP C GAP GIP


Bng kt qu hi quy

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

Dependent Variable: GDP


Method: Least Squares
Date: . Time: .
Sample: 1980 1996
Included observations: 17
Variable
Coefficient
C
-2.395032
GAP
1.455290
GIP
0.674673

Std. Error
1.571602
0.199663
0.092429

R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood
Durbin-Watson stat

Mean dependent var


S.D. dependent var
Akaike info criterion
Schwarz criterion
F-statistic
Prob(F-statistic)

0.997573
0.997227
0.492409
3.394535
-10.42806
1.205284

t-Statistic
-1.523944
7.288738
7.299395

Prob.
0.1498
0.0000
0.0000
28.42353
9.350102
1.579772
1.726809
2877.499
0.000000

Vi kt qu hi quy trn:
[?] - Gii thch ngha cc c lng h s? Kt qu c ph hp
vi l thuyt kinh t khng?
- H s chn c ngha thng k khng? Kt qu kim nh ny
c ngha nh th no?
- Cc h s gc c ngha thng k khng? iu ny c ngha
nh th no?
- Theo m hnh ny, GAP v GIP gii thch c bao nhiu % s
bin ng ca GDP?
- Qua c lng im cc h s gc, GDP tng trng theo bin
no nhiu hn?
- Tng bnh phng phn d v sai s chun ca hi quy bng
bao nhiu?

Gi tr c lng bin ph thuc (gi tr tng hp) v phn d


[Equation] Actual, Fitted, Residual Actual, Fitted, Residual
Table: xem gi tr c lng bin ph thuc v phn d.
[Equation] Actual, Fitted, Residual Actual, Fitted, Residual
Graph: xem th cc gi tr.

30

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

4.4 Phng sai, hip phng sai cc c lng h s


c th c lng, kim nh v hn mt h s hi quy, cn c c
lng phng sai, hip phng sai ca cc c lng h s.
[Equation] Covariance Matrix

C
GAP
GIP

GAP

GIP

2.469931
-0.308582
0.135627

-0.308582
0.039865
-0.018113

0.135627
-0.018113
0.008543

[?] - Phng sai ca cc c lng bng bao nhiu?


- Hip phng sai c lng hai h s gc bng bao nhiu?
- Hip phng sai cc c lng h s c dng trong trng
hp no?
- S dng kt qu hip phng sai, v bng kt qu hi quy m
hnh t phn u, cho bit nu GAP v GIP cng tng mt n v
th trung bnh ca GDP thay i nh th no?
- Kim nh gi thuyt cho rng: h s ca bin GAP ln gp i
h s ca bin GIP.
- Nu GAP tng mt n v, nhng GIP gim mt n v, th
GDP s tng ln hay gim i, tng ln (gim i) ti a bao nhiu,
ti thiu bao nhiu?

4.5 Kim nh b bt bin


Eviews thc hin kim nh b bt bin s da trn kim nh thu hp
hi quy. Vi m hnh ban u:
(4.1)
E(GDP/GAPt, GIPt) = 1 + 2 GAPt + 3 GIPt
GDPt

= 1 + 2 GAPt + 3 GIPt + ut

Mun kim nh b bin GIP:


E(GDP/GAPt)

GDPt

= 1 + 2 GAPt
= 1 + 2 GAPt + ut
31

(4.2)

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

H0: 3 = 0 : c th b bin GIP


H1: 3 0 : khng th b bin GIP
Kim nh F; F =

(RSS(4.2) RSS(4.1) ) / m
RSS(4.1) /(n k(4.1) )

2
2

Ti ca s kt qu c lng m hnh [Equation]


[Equation] View Coefficient Tests Redundant Variables
Ca s khai bo bt (thm) bin

G bin mun b: GIP

<Ok>

Kt qu hi quy sau khi b bin GIP.


Redundant Variables: GIP
F-statistic
53.28117
Log likelihood ratio
26.68699

Probability
Probability

Test Equation:
Dependent Variable: GDP
Method: Least Squares
Date: . Time: .
Sample: 1980 1996
Included observations: 17
Variable
Coefficient
C
-13.10596
GAP
2.885761

Std. Error
1.191955
0.080939

0.000004
0.000000

t-Statistic
-10.99535
35.65346

Prob.
0.0000
0.0000

32

(R(4.1) RSS(4.2) ) / m
(1 R(4.1) ) /(n k(4.1) )

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood
Durbin-Watson stat

0.988337
0.987560
1.042863
16.31345
-23.77156
0.753159

Mean dependent var


S.D. dependent var
Akaike info criterion
Schwarz criterion
F-statistic
Prob(F-statistic)

28.42353
9.350102
3.031948
3.129973
1271.169
0.000000

[?] Vi cp gi thuyt H0: 3 = 0 ; H1: 3 0, gi tr thng k F


dng kim nh l F(1,14) = 53.2812 [.000]
- Thng k F tnh c th nh th no?
- Bc t do ca kim nh F bng bao nhiu?
- Da vo thng tin kim nh F, kim nh gi thuyt H0: nn
b bin GIP khi m hnh, s dng thng k F v mc xc sut
P-value kt lun.
- Thc hin kim nh tng t, c nn b bin GAP khi m
hnh hay khng?

4.6 Kim nh thm bin


Thm hai bin EX v IM vo m hnh
(4.1)
E(GDPt) = 1 + 2 GAPt + 3 GIPt
E(GDPt) = 1 + 2 GAPt + 3 GIPt + 4EXt + 5IMt (4.3)
H0: 3 = 4 = 0
H1: 32 + 42 0
Ti ca s kt qu c lng m hnh [Equation]
[Equation] View Coefficient Tests Omitted Variables
Ca s khai bo bt (thm) bin
G bin mun thm: EX IM
<Ok>
Kt qu hi quy sau khi thm bin.

33

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

Omitted Variables: EX IM
F-statistic
10.78774
Log likelihood ratio
17.49112

Probability
Probability

Test Equation:
Dependent Variable: GDP
Method: Least Squares
Date: 08/14/09 Time: 23:00
Sample: 1980 1996
Included observations: 17
Variable
Coefficient
C
0.845611
GAP
1.232316
GIP
0.606301
EX
1.181808
IM
-0.436874

Std. Error
1.687898
0.219174
0.130161
0.259626
0.175753

R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood
Durbin-Watson stat

Mean dependent var


S.D. dependent var
Akaike info criterion
Schwarz criterion
F-statistic
Prob(F-statistic)

0.999133
0.998844
0.317965
1.213219
-1.682500
1.720441

0.002084
0.000159

t-Statistic
0.500985
5.622535
4.658088
4.551961
-2.485723

Prob.
0.6254
0.0001
0.0006
0.0007
0.0287
28.42353
9.350102
0.786176
1.031239
3455.873
0.000000

[?] - Nu cch tnh thng k F = 10.78774, bc t do tng ng


vi kim nh F l bao nhiu?.
- Theo kim nh F v mc P-value bng 0.002, vic cho thm hai
bin EX v IM vo m hnh c ngha thng k khng?
- Dng kim nh T kim nh xem c cn a bin EX, IM
vo m hnh khng?
- Nhng kt lun trn c g thay i nu mc ngha bng 1%?

4.7 Kim nh v hai h s hi quy


Vi m hnh (4.1), kim nh

34

H0: 2 = 3
H1: 2 3

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

[Equation] View Coefficient Tests Wald Coefficient


Restrictions Ca s khai bo gi thuyt cn kim nh v cc h s:

Quy c nh s cc h s C(1), C(2), theo th t khai bo ca


phng trnh hi quy, do nu khi khai bo bin l C GAP GIP th
h s chn l C(1), h s GAP l C(2), GAP l C(3).
Ti ca s Wald Test: C(2) = C(3)
<Ok>
Kt qu kim nh bng kim nh Wald, kim nh F v 2.
Wald Test:
Equation: Untitled
Null Hypothesis: C(2) = C(3 )
F-statistic
7.199893
Chi-square
7.199893

Probability
Probability

0.017831
0.007291

[?] - S dng P-value, c th cho rng 2 = 3 hay khng?


- Tng t, kim nh gi thuyt GAP = 2*GIP

35

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

5 CC DNG M HNH
(Tip theo 4)
Tip tc vi b s liu BT1CH1, b s liu theo thi gian, cc bin s
c xu th tng theo thi gian.

5.1 Bin xu th thi gian


M hnh

GDPt = 1 + 2 GAPt + 3 GIPt + 4 t + ut (5.1)

Ca s lnh: GENR T = @TREND( )


Ca s lnh: LS GDP C GAP GIP T
Dependent Variable: GDP
Included observations: 17
Variable
C
GAP
GIP
T
R-squared
Sum squared resid

Coefficient
-1.894304
1.397422
0.683579
0.025211
0.997577
3.389751

Std. Error
4.039848
0.474727
0.116234
0.186117

t-Statistic
-0.468905
2.943631
5.881087
0.135460

F-statistic
Prob(F-statistic)

Prob.
0.6469
0.0114
0.0001
0.8943
1783.829
0.000000

Bng kim nh T tng ng, c th thy bin xu th thi gian l


khng c ngha trong m hnh.
[?] - Nu hi quy trc tip GDP theo ch mt bin xu th thi gian
T (thc hin yu cu ny nh mt bi tp), th bin GDP thc s
ph thuc T, nhng trong kt qu m hnh ny th bin T li
khng c ngha. C th gii thch iu nh th no?

36

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

5.2 Hi quy vi bin tr


Bin GDP c th ph thuc vo chnh n thi k trc .
M hnh (5.2): GDPt = 1 + 2 GAPt + 3 GIPt + 4GDPt 1 + ut
Hay:
GDP = 1 + 2 GAP + 3 GIP + 4GDP(1) + u

Ca s lnh: LS GDP C GAP GIP GDP(-1)


Dependent Variable: GDP
Included observations: 16 after adjusting endpoints
Variable
C
GAP
GIP
GDP(-1)
R-squared
Durbin-Watson stat

Coefficient
-2.463898
0.795588
0.317487
0.556071

Std. Error
1.350701
0.272947
0.110062
0.153006

0.998853
0.940028

t-Statistic
-1.824162
2.914805
2.884625
3.634316

F-statistic
Prob(F-statistic)

Prob.
0.0931
0.0130
0.0137
0.0034
3483.029
0.000000

[?] - GDP c ph thuc vo tr bc 1 ca n khng?


- Gii thch c lng h s ng vi bin tr
- H s xc nh so vi trc khi thm bin thay i th no?
- Tng t, thm bin tr bc 1 ca GAP, GIP vo m hnh
- Thm bin tr bc 2 ca GDP vo m hnh, kt qu th no?

5.3 Hi quy m hnh dng hm m


M hnh dng hm m Cobb-Douglas
M hnh

GDP = e1GAP 2 GIP 3 eut

(5.3)

Logarit hai v

ln GDP = 1 + 2 ln GAP + 3 ln GIP + ut

37

GDPt = et 1GAP
2 GIPt 3
t

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

Ca s lnh: LS LOG(GDP) C LOG(GAP) LOG(GIP)


Dependent Variable: LOG(GDP)
Included observations: 17
Variable
Coefficient
C
0.375308
LOG(GAP)
0.805312
LOG(GIP)
0.307511

Std. Error
0.231645
0.164321
0.079742

R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood
Durbin-Watson stat

Mean dependent var


S.D. dependent var
Akaike info criterion
Schwarz criterion
F-statistic
Prob(F-statistic)

Theo kt qu ny

0.996969
0.996536
0.018859
0.004980
45.03095
1.101466

t-Statistic
1.620189
4.900835
3.856333

Prob.
0.1275
0.0002
0.0017
3.298273
0.320444
-4.944817
-4.797780
2302.593
0.000000

GDP = e0.37531GAP0.80531GIP0.30751

[?] - Gii thch ngha kt qu hi quy


- Cc h s c ngha thng k khng?
- M hnh dng hm m gii thch bao nhiu % s bin ng ca
bin GDP, c gii thch c nhiu hn dng hm tuyn tnh
khng?

Hi quy m hnh GDP = e1GAP 2 GIP 3 EX t 4 IM t 5 eut


[?] - Hai bin mi a vo m hnh dng hm m c cn thit hay
khng? So snh vi m hnh dng tuyn tnh, m hnh theo dng
no gii thch c cho bin ph thuc GDP nhiu hn?

38

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

6 M HNH VI BIN GI
S dng tp BT1CH1 trong th mc SOLIEU
Xt mi quan h nhp khu ph thuc vo GDP c dng
IM = [H s chn] + [H s gc]GDP + u

6.1 Xc nh yu t nh tnh
V th im ca IM theo GDP
Ca s chnh [Eviews] Quick Graph Scatter GDP IM
12

10
8
6
4
2
0
15

20

25

30

35

40

45

50

grossdomesticproducts

Nhn xt thy giai on u 1980-1989 (ng vi 10 im bn tri)


th t dc hn giai on sau 1990-1996, yu t giai on l nh tnh,
s dng bin gi
t D l bin gi
D = 0 vi quan st 1980 1989
D = 1 vi quan st 1990 1996
M hnh
IM = 1 + 2GDP + 3 D + 4D.GDP + u (MH 6.1)
1

2GDP

Giai on u:

IM =

+u

Giai on sau:

IM = (1 + 3) + (2 + 4)GDP + u

Nu 3= 4 = 0 : hm hi quy l ng nht trong hai giai on

import of goodsandservices

39

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

6.2 t bin gi
Trong chng trnh Eviews, tn bin D khng c chp nhn, do
s dng tn l D1
Lnh: GENR D1 = 0

Ti ca s [Workfile] xut hin bin D1,


Nhy p vo D1, m ca s [Series] Edit+/Vi cc quan st t 1990 1996 i gi tr ca D1 thnh 1
Cch 2 nhp gi tr cho bin gi: dng khi s quan st nhiu, vic
nhp s liu kh khn:
Ti ca s [Workfile] chn Sample Ca s [Sample], ti
Sample range pairs ang c sn 1980 1996; i thnh 1990 1996.
Lnh: D1 = 1

Ca s [Workfile] Sample i li mu thnh 1980 1996.

6.3 Hi quy m hnh c bin gi


Lnh: LS IM C D1 GDP D1*GDP

Dependent Variable: IM
Sample: 1980 1996
Included observations: 17
Variable
C
D1
GDP
D1*GDP
R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid

Coefficient
-1.084655
-11.19851
0.137484
0.325480

Std. Error
1.342126
2.071545
0.060219
0.073081
L
o
g
lik
eli

t-Statistic
-0.808162
-5.405872
2.283088
4.453671
hood
DurbinWatson stat

Prob.
0.4335
0.0001
0.0399
0.0007
0.944354
0.931513
0.679590
6.003951

-15.27519
1.409782

Mean
dependent
var
S.D.
dependent

var
Akaike info criterion
Schwarz criterion
F-statistic
Prob(F-statistic)

40

3.251176
2.596830
2.267670
2.463720
73.54055
0.000000

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

[?] - Hm hi quy trong hai giai on? Gii thch ngha?


- Cc h s hi quy c ngha thng k khng?
- H s chn ca m hnh c khc nhau trong hai giai on
khng?
- Khi GDP tng mt n v, nhp khu giai on no tng ln
nhiu hn, nhiu hn bao nhiu?
- Hm hi quy c ng nht trong hai giai on khng?

Kim nh s ng nht bng kim nh F


[Equation] View Coefficient Tests Redundant Variables
Bin cn b: D1 D1*GDP
<Ok>
Kt qu sau khi b hai bin gi.
Redundant Variables: D1 D1*GDP
F-statistic
Log likelihood ratio

17.24819
22.02697

Probability
Probability

Test Equation:
Dependent Variable: IM
Included observations: 17
Variable
Coefficient
C
-3.794962
GDP
0.247898

Std. Error
0.964703
0.032334

R-squared
Sum squared resid

F-statistic
Prob(F-statistic)

0.796695
21.93584

0.000220
0.000016

t-Statistic
-3.933813
7.666868

Prob.
0.0013
0.0000
58.78087
0.000001

[?] - Thng k F ca kim nh thu hp hi quy bng bao nhiu?


- C nn b hai bin gi khi m hnh khng?
- Hm hi quy c ng nht trong hai giai on khng?

41

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

7 HIN TNG A CNG TUYN


Thc hnh vi b s liu BT1CH1

7.1 a cng tuyn hon ho


Xt m hnh

GDP = 1 + 2GAP + 3GIP + 4 NX t + (7.1)


ut

Vi NX l xut khu rng, NX t = EX t IM t


Lnh: GENR NX = EX IM
Lnh: LS

GDP C EX IM NX

Ca s Error Message vi thng bo:

M hnh c hin tng a cng tuyn hon ho nn cc tnh ton


khng thc hin c.
B bt bin NX khi phng trnh hi quy
Cc kt qu tnh ton by gi c th thc hin c

7.2 a cng tuyn khng hon ho


Xt m hnh
GDP = 1 + 2GAP + 3GIP + 4GAP 2 + 5GIP 2 +

ut

(7.2)
Lnh: LS GDP

C GAP GIP GAP^2 GIP^2

42

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

Dependent Variable: GDP


Included observations: 17
Variable
Coefficient
C
0.295351
GAP
1.134834
GIP
0.344117
GAP^2
0.028279
GIP^2
0.002412

Std. Error
5.731684
1.000746
0.322092
0.035942
0.006913

R-squared
Durbin-Watson stat

F-statistic
Prob(F-statistic)

0.998026
1.447594

t-Statistic
0.051529
1.133988
1.068381
0.786800
0.348937

Prob.
0.9598
0.2789
0.3064
0.4467
0.7332
1517.112
0.000000

[?] - S dng cc kim nh T, cho bit cc bin c lp c gii


thch cho bin ph thuc hay khng? Da trn cc kim nh ny,
hm hi quy c ph hp hay khng?
- H s xc nh bng bao nhiu?
- Bng kim nh F, cho bit hm hi quy c ph hp khng?
- Mu thun gia cc kim nh cho thy iu g?

Xt v quan h ton hc, bin GIP v GIP2, bin GAP v GAP2 khng
c quan h cng tuyn, nhng do thi k ly mu cha nn hin
tng a cng tuyn gia cc s liu vn xy ra.
Trong trng hp ny, cn b hai bin GAP2, GIP2 khi m hnh, hin
tng mu thun gia cc kim nh s khng cn.
Kim nh b bt bin GAP2, GIP2 cho kt qu sau, theo nn b hai
bin khi m hnh
Redundant Variables: GAP^2 GIP^2
F-statistic
1.377907 Probability
Log likelihood ratio
3.514419 Probability

0.289273
0.172526

43

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

7.3 Hi quy ph kim nh a cng tuyn


Vi v d trn, sau khi b hai bin GAP2, GIP2, c m hnh:
(7.3)
GDP = 1 +
GAP + 3GIP + ut

LS GDP

C GAP GIP

Dependent Variable: GDP


Included observations: 17
Variable
Coefficient
C
-2.395032
GAP
1.455290
GIP
0.674673

Std. Error
1.571602
0.199663
0.092429

R-squared
Durbin-Watson stat

F-statistic
Prob(F-statistic)

0.997573
1.205284

t-Statistic
-1.523944
7.288738
7.299395

Prob.
0.1498
0.0000
0.0000
2877.499
0.000000

M hnh khng c mu thun gia cc kim nh T v kim nh F.


kim nh chi tit v a cng tuyn, s dng hi quy ph:
Hi quy GAP theo GIP
GAP = 1 + 2GIP + vt

(7.4)

Dependent Variable: GAP


Included observations: 17
Variable
C
GIP
R-squared
Durbin-Watson stat

Coefficient
7.740618
0.454364
0.963363
0.623993

Std. Error
0.368769
0.022878

t-Statistic
20.99044
19.86005

Mean dependent var


Prob(F-statistic)

Prob.
0.0000
0.0000
14.39118
0.000000

[?] - Bin GAP c ph thuc tuyn tnh vo GIP khng? M hnh

(7.3) c a cng tuyn khng?


- a cng tuyn ny c phi a cng tuyn hon ho khng?
- Mc cng tuyn gia GAP v GIP trong mu ny mc
no?
- Tnh o Theil ca m hnh (7.3)?
t

44

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

8 HIN TNG PHNG SAI SAI S THAY I


S dng b s liu BT5EX trong th mc SOLIEU
C cc bin: M : cu tin danh ngha, Y: thu nhp thc t, R: li sut,
P l mc gi, C: h s chn

8.1 Hin tng


Xt m hnh

M i = 1 + 2Yi + 3P +
Ri + ui

Hi quy m hnh (9.1)


Lnh:
LS M C Y P R

(MH 8.1)

Bng kt qu hi quy.
Dependent Variable: M
Sample: 1963 1987
Included observations: 25
Variable
Coefficient
C
-52.33310
Y
0.288936
P
40.70030
R
-2.480736

Std. Error
14.97030
0.067958
7.712388
0.442728

R-squared
S.E. of regression
Durbin-Watson stat

Mean dependent var


F-statistic
Prob(F-statistic)

0.957870
5.024448
0.887349

t-Statistic
-3.495794
4.251667
5.277263
-5.603290

Prob.
0.0022
0.0004
0.0000
0.0000
26.55516
159.1525
0.000000

nhn nh v phng sai sai s, nh gi qua th phn d


[Equation] View Actual, Fitted, Residual Residual Graph
Qua th c th thy s dao ng khng ng u ca sai s quanh
gi tr trung bnh l 0. Hai ng t nt l gi tr (sai s chun

ca hi quy).

45

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

15

10

-5

-10
1965

1970

1975

1980

1985

M Residuals

8.2 Kim nh White


Kim nh White do Eviews thc hin da trn hi quy bnh phng
phn d (k hiu l RESID) theo bc nht v bc hai ca cc bin c
lp. C hai trng hp: kim nh khng c tch cho gia cc bin
c lp v kim nh c tch cho.
Kim nh khng c tch cho
ei2 = 1 + 2Yi + 3Yi 2 + 4 Pi + 5 Pi 2 + 6 Ri + 7 Ri2 + (8.2)
vi
H0: M hnh gc c phng sai sai s khng i (ng u)
H1: M hnh gc c phng sai sai s thay i (khng ng u)
Fqs =

qs2

= nR2

so snh vi F( k 1 ,nk )

so snh vi

(k 1)

[Equation] View Residual Test White heteroskedasticity

(no cross terms)

46

R n
1 R k 1

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

White Heteroskedasticity Test:


F-statistic
4.012181
Obs*R-squared
14.30433

Probability
Probability

Test Equation:
Dependent Variable: RESID^2
Method: Least Squares
Date: Time:
Sample: 1963 1987
Included observations: 25
Variable
Coefficient
C
840.8150
Y
-6.521801
Y^2
0.012623
P
-148.9686
P^2
62.13170
R
3.522892
R^2
-0.011481

Std. Error
665.8814
5.591946
0.008874
219.8589
192.4990
43.76667
1.786478

R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood
Durbin-Watson stat

Mean dependent var


S.D. dependent var
Akaike info criterion
Schwarz criterion
F-statistic
Prob(F-statistic)

0.572173
0.429564
29.26626
15417.25
-115.7780
1.799271

0.010027
0.026415

t-Statistic
1.262710
-1.166285
1.422498
-0.677565
0.322764
0.080493
-0.006426

Prob.
0.2228
0.2587
0.1720
0.5067
0.7506
0.9367
0.9949
21.20586
38.74929
9.822244
10.16353
4.012181
0.010027

47

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

[?] - Cho bit gi tr F-statistic = 4,012181 v Obs*R-squared =


14,30433 c tnh c th th no ?
- Qua cc thng k v P-value tng ng, thc hin kim nh
kt lun v phng sai sai s ca m hnh gc?
- Cc c lng h s ca m hnh (8.1) c phi l c lng tt
nht khng?
- Nu c lng trn cha phi tt nht, hy nu cch c
lng c kt qu tt hn.
Kim nh White c tch cho

[Equation] View Residual Test White heteroskedasticity


(cross terms)
[?] - Vit phng trnh hi quy ph ?
- Thc hin kim nh i vi kt qu ny.

8.3 Lu phn d v gi tr c lng


C th thc hin hi quy ph phn d theo cc bin c lp theo kim
nh Glejer, kim nh Park, kim nh da trn bin ph thuc.
thc hin ch ng cc hi quy ph, cn lu li cc gi tr cn thit
di dng cc bin s mi.
Lu phn d v gi tr c lng
Vi bng kt qu hi quy m hnh (8.1), ca s Equation:
[Equation] View Estimation Output
[Equation] Procs Make Residual Series
Ca s Make Residuals, tn ngm nh cho phn d l resid01, i
thnh E <Ok>, ng ca s Series E.

48

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

[Equation] Forecast Ca s Forecast, trong Forecast name


l tn ca gi tr c lng bin ph thuc M , c ngm nh l
MF, s dng tn ny.

Sau khi t chui gi tr phn d v gi tr c lng, trong ca s


[Workfile] xut hin hai bin mi l E v MF.

49

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

8.4 Kim nh bng hi quy ph


Phng sai sai s c thay th bi ei2 thay i theo cc gi thit khc
nhau. Cc kim nh Glejer, Park thc hin kim nh cho tng bin
c lp
Kim nh phng sai sai s thay i vi bin P
Kim nh Glejer
Hi quy ph: | ei |= 1 + 2i P + vi
Lnh: LS ABS(E) C P
Kt lun c PSSS thay i [?]
Hi quy ph: | ei |= 1 + 2 Pi + vi
Lnh: LS ABS(E) C P^0.5
Kt lun c PSSS thay i [?]
Kim nh Park
Gi thit: Var (ui ) =

i2

Pi ln ei =
2

+ 2 ln Pi + vi

Lnh: LS LOG(E) C LOG(P)


Kt lun c PSSS khng i [?]
Dng thu gn ca kim nh White
Hi quy ph: e2i = i1 + 2 P 2 + vi
Lnh: LS E^2 C P^2
Kt lun c PSSS thay i [?]
Tng t, kim nh gi thuyt phng sai sai s thay i theo cc
bin c lp Y, R. Qua cc hi quy ph, c th thy phng sai sai s
thay i theo P, theo Y, nhng khng thay i theo R.

50

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

Kim nh phng sai sai s thay i vi bin ph thuc


Gi thit:Var (ui ) =

i2

( E (M i

))

Hi quy ph: ei2 = 1 + 2M i2 + vi


Lnh: LS E^2 C MF^2
Kt lun c phng sai sai s thay i theo bin ph thuc.

8.5 Khc phc phng sai sai s thay i


M hnh (8.1) M i = 1 + 2Yi + 3P + 4 Ri + ui c phng sai sai s
thay i, qua cc hi quy ph, nhn thy s thay i theo bin P, Y,
hoc M 2 , khc phc da trn cc gi thit ny.
Khc phc theo bin P
T hi quy ph e2 = 1 + 2 P 2 + vi trong phn trn, c th cho rng gi
thit

i2

Pi 2 l ng, khc phc bng cch chia (8.1) cho Pi:

M i 1 Yi
P P P

Ri
P

LS M/P 1/P Y/P

Pi

(8.3)

R/P

Dependent Variable: M/P


Included observations: 25
Variable
1/P
Y/P
C
R/P
R-squared
Durbin-Watson stat

Coefficient
-13.38787
0.082868
54.34015
-1.055670
0.391639
0.576960

Std. Error
6.008009
0.032222
4.307226
0.303220

t-Statistic
-2.228337
2.571759
12.61604
-3.481534

Mean dependent var


Prob(F-statistic)

Prob.
0.0369
0.0178
0.0000
0.0022
52.40034
0.013650

xem m hnh mi (8.3) khc phc c hin tng phng sai


sai s thay i hay cha, s dng kim nh White

51

= 1 +2
i

+ 3 +
i

+i

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

Kim nh White khng c tch cho v c tch cho


White Heteroskedasticity Test: no cross terms
F-statistic
2.385495 Probability
Obs*R-squared
11.07370 Probability

0.071356
0.086125

White Heteroskedasticity Test: cross term


F-statistic
2.371617 Probability
Obs*R-squared
14.68208 Probability

0.067065
0.100047

[?] - M hnh (8.3) c phng sai sai s ng u hay thay i?


- Nu mc ngha l 10% th kt lun th no?
- Vi m hnh ny, c lng im mc thay i ca M khi Y
tng 1 n v? So snh vi kt qu t m hnh (8.1)
- c lng im mc thay i ca M khi P thay i 1 n v?
- Gii thch ngha kinh t ca m hnh mi?

Khc phc theo bin Y


Chia phng trnh (8.1) cho bin Y
Mi 1

P R u

Yi

Yi Yi Yi

Yi

LS M/Y 1/Y C

P/Y

(8.4)

R/Y

Khc phc theo bin ph thuc M


Chia phng trnh (8.1) cho bin M

Ri
M i

u
M i

(8.5)

Lu phng trnh ny khng c h s chn


LS M/MF 1/MF Y/MF P/MF R/MF
[?] - So snh kt qu (8.5) vi (8.3), (8.4) nh gi v hin
tng phng sai sai s thay i, h s xc nh, v c lng

cc h s?

52

+ 2 + 3i +

4 i

Mi 1 Y P
= 1
+ 2
M i i M M i

+ 4 +

Mi

+i

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

9 HIN TNG T TNG QUAN


S dng b s liu BT7NCY trong th mc SOLIEU.
C cc bin: CS : tiu dng khu vc dn c, Y: thu nhp thc t, C:
hng s, s liu ca Nigeria

9.1 Hin tng


Hi quy m hnh
LS CS C Y

(9.1)
CSt = 1 + 2 Yt + ut
<Start>

Bng kt qu hi quy.
Dependent Variable: CS
Sample: 1960 1986
Included observations: 27
Variable
Coefficient
C
155.2239
Y
0.597069

Std. Error
203.4712
0.060594

R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood
Durbin-Watson stat

Mean dependent var


S.D. dependent var
Akaike info criterion
Schwarz criterion
F-statistic
Prob(F-statistic)

0.795240
0.787050
364.1989
3316021.
-196.5103
0.462830

t-Statistic
0.762879
9.853648

Prob.
0.4527
0.0000
2037.449
789.2231
14.70446
14.80045
97.09438
0.000000

Theo kt qu hi quy ny, gi tr d ca kim nh Durbin-Watson bng


0.46238; vi gi tr dL = 1.302 v dU = 1.461 th d < dL m hnh c
hin tng t tng quan bc 1 dng.
[?] - M hnh c t tng quan bc 1 dng, c th c lng h
s t tng quan bc 1 bng bao nhiu?
- Hy nu 1 cch khc phc hin tng t tng quan bc 1
da trn thng k DW?

53

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

9.2 Kim nh Breusch-Godfrey


Kim nh t tng quan bc 1 ca m hnh (9.1) bng kim nh
Breusch-Godfrey, hi quy ph l:
et =
et =

( 1 +
( 1 +

2Yt
2Yt

)
)

+ 1et 1 + vt

(9.2)

+ vt

(9.3)

H0: 1 = 0: M hnh khng c t tng quan bc 1


H1: 1 0: M hnh c t tng quan bc 1
2

Fqs =

2
2

M hnh (9.2) c tr bc 1, s quan st bt i 1. Tuy nhin chng


trnh Eviews t ng thay gi tr thiu bng 0, do s quan st
vn c gi nguyn.
[Equation] View Residual Tests Residual Correlation LM
Test
Ca s [Lag specification] xc nh bc ca t tng quan cn
kim nh. Bc ngm nh l 2, cn kim nh t tng quan bc 1
[Lag specification] Lags to include: 1

<Ok>

R(9.2) R(9.3) n(9.2) k(9.2)


1 R(9.2)

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

Bng kt qu kim nh hin tng t tng quan bc 1 ca m


hnh (9.1) bng kim nh BG.
Breusch-Godfrey Seri al Correlation LM Test:
F-statistic
34.31433 Probability
Obs*R-squared
15.88781 Probability

Test Equation:
Dependent Variable: RESID
Method: Least Squares
Date: Time:
Presample missing value lagged residuals set to zero.
Variable
Coefficient
Std. Error
t-Statistic
C
-60.84700
133.6292
-0.455342
Y
0.021511
0.039844
0.539890
RESID(-1)
0.777523
0.132732
5.857844
R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood
Durbin-Watson stat

0.588437
0.554140
238.4630
1364750.
-184.5250
1.846319

Mean dependent var


S.D. dependent var
Akaike info criterion
Schwarz criterion
F-statistic
Prob(F-statistic)

0.000005
0.000067

Prob.
0.6530
0.5942
0.0000
-2.97E-13
357.1264
13.89074
14.03473
17.15717
0.000024

Lu : nhng thng tin trong phn cui ca bng kt qu l tng ng


vi m hnh hi quy ph (9.2).
[?] - Hy cho bit thng k F-statistic v Obs*R-squared c
tnh c th nh th no, bc t do tng ng l bao nhiu?
- Kim nh v kt lun v hin tng t tng quan bc 1?
- C th ly c lng h s t tng quan bc 1 bng bao nhiu
thng qua kim nh ny?
Tng t, thc hin kim nh t tng quan n bc 2.
[?] - Vi kim nh t tng quan bc 2, hi quy ph th no?

- Thc hin kim nh c th, c t tng quan bc 1, bc 2


hay khng?

55

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

9.3 Kim nh bng hi quy ph


Kim nh t tng quan da trn vic xem xt phn d et c ph
thuc vo cc tr ca n khng.
Kim nh t tng quan bc 1
Khng c h s chn
(9.4)
et = 1et 1 + vt
C h s chn

et =

(9.5)

+ 1et 1 +

vt

Cn lu li phn d
[Equation] View Estimation Output
[Equation] Procs Make Residual Series
[Make Residuals] Name of resid series: E
Hi quy khng c h s chn
Lnh:
LS
E E(-1)

Kt qu hi quy m hnh (9.4)


Dependent Variable: E
Sample(adjusted): 1961 1986
Included observations: 26 after adjusting endpoints
Variable
Coefficient
Std. Error
t-Statistic
E(-1)
0.770406
0.129372
5.954944
R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood

0.586418
0.586418
233.4985
1363039.
-178.1651

Mean dependent var


S.D. dependent var
Akaike info criterion
Schwarz criterion
Durbin-Watson stat

Prob.
0.0000
-5.380974
363.0810
13.78193
13.83032
1.801323

[?] - Phn d c ph thuc tr ca n khng?


- C th ly h s t tng quan bc 1 bng bao nhiu?

- Ti sao bng kt qu khng c thng tin F-statistic v P-value


ca kim nh F?

56

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

Hi quy c h s chn
LS E C E(-1)

[?] - Kt qu c ging vi hi quy khng c h s chn khng?

- Qua kim nh T v F, kt lun g v hin tng t tng


quan bc 1 ca m hnh gc.

9.4 Khc phc t tng quan


S dng phng trnh sai phn tng qut
Qua thng k DW v hi quy ph (9.4), (9.5), c lng h s tng
quan bc nht 0,77 , thay vo phng trnh sai phn tng qut
(9.6) nh sau:
CSt 0,77CSt 1 = 1(1 0.77) + 2 (Yt 0.77Yt 1) + (ut 0.77ut 1)
V ca s lnh
LS (CS 0.77*CS(-1)) C (Y 0.77*Y(-1))
Kt qu hi quy

Dependent Variable: CS-0.77*CS(-1)


Sample(adjusted): 1961 1986
Included observations: 26 after adjusting endpoints
Variable
C
Y-0.77*Y(-1)
R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood
Durbin-Watson stat

Coefficient
143.8042
0.465693

Std. Error
123.0936
0.141126

t-Statistic
1.168251
3.299833

0.312102
0.283440
234.1170
1315458.
-177.7032
1.720759

Mean dependent var


S.D. dependent var
Akaike info criterion
Schwarz criterion
F-statistic
Prob(F-statistic)

Prob.
0.2542
0.0030
520.6781
276.5709
13.82332
13.92010
10.88890
0.003013

57

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

Theo bng kt qu ny, m hnh sau khi i bin s (9.6) c c lng


h s chn l 143.8042, do c lng h s chn ca m hnh (9.1)
s l 1 = 143.8042 /(1 0.77) = 625.236 , c lng h s gc ca m
hnh gc 2 = 0.46569 .
[?] - Dng kim nh Durbin-Watson chng t m hnh (9.6)
khng cn t tng quan.
- Ti sao c lng h s chn 1 ca m hnh (9.1) li phi ly
c lng h s chn ca m hnh (9.6) chia cho (1 0.77)?
- Khi sai s chun Se( 1 ) s bng bao nhiu?
Dng kim nh Breusch-Godfrey kim nh m hnh (9.6), c:
Breusch-Godfrey Seri al Correlation LM Test:
F-statistic
0.429307 Probability
Obs*R-squared
0.476411 Probability

0.518829
0.490052

[?] - Kt qu ny cho bit m hnh (9.6) c t tng quan bc 1


hay khng?
S dng phng php Cochran-Orcutt

i cu lnh hi quy bng cch thm k hiu ca t tng quan bc


tng ng vo sau phng trnh hi quy
LS CS C Y
AR(1)

Dependent Variable: CS
Method: Least Squares
Sample(adjusted): 1961 1986
Included observations: 26 after adjusting endpoints
Convergence achieve d after 39 iterations
Variable
Coefficient
Std. Error
C
1290.375
864.3354
Y
0.320087
0.180066
AR(1)
0.895753
0.097838
R-squared
Adjusted R-squared

0.917399
0.910216

t-Statistic
1.492910
1.777612
9.155465

Prob.
0.1491
0.0887
0.0000

Mean dependent var


S.D. dependent var

2068.732
787.5967

58

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

S.E. of regression
Sum squared resid
Log likelihood
Durbin-Watson stat
Inverted AR Roots

235.9953
1280957.
-177.3577
1.884378
.90

Akaike info criterion


Schwarz criterion
F-statistic
Prob(F-statistic)

13.87367
14.01883
127.7230
0.000000

Bng kt qu cho thy phng php hi quy dng li sau 39 bc lp.


c lng cho h s t tng quan bc 1 c tnh bc cui bng
0.895735. Kim nh BG cho kt qu sau:
Breusch-Godfrey Seri al Correlation LM Test: AR(1)
F-statistic
0.074213 Probability
Obs*R-squared
0.087411 Probability

0.787839
0.767495

[?] - Bng kim nh DW v kim nh BG cho bit mc ch


khc phc t tng quan t c cha?
- c lng h s chn v h s gc bng bao nhiu, c khc so
vi dng OLS trc tip khng?
- H s xc nh c thay i khng?
- Vit phng trnh sai phn tng qut ng vi bc cui cng
ca m hnh. Khi c lng h s chn ca phng trnh sai
phn tng qut bng bao nhiu?

59

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

10 NH DNG M HNH
Bi thc hnh s 10 trnh by kim nh v dng hm trong mt m
hnh hi quy bng kim nh RamseyRESET v kim nh nhn t
Lagrange. Bi thc hnh ny cng tng hp mt s phng php khc
phc khuyt tt nhng bi trc nhm tm c nhng c lng tt
nht trn mt b s liu. hiu c ni dung ca bi thc hnh, cn
nm c cc k thut kim nh, mc ch, ngha v kt lun ca
n. Phn khc phc khuyt tt tng hp yu cu nm vng cc khi
nim, k thut trong tt c cc bi thc hnh trc.
S dng b s liu BT7NCY trong th mc SOLIEU

10.1 Kim nh Ramsey RESET


Hi quy m hnh

CSt = 1 + 2Yt + ut

(10.1)

LS CS C Y
Bng kt qu hi quy.
Dependent Variable: CS
Included observations: 27
Variable
Coefficient
C
Y
R-squared
Durbin-Watson stat

155.2239
0.597069
0.795240
0.462830

Std. Error

t-Statistic

Prob.

203.4712
0.060594

0.762879
9.853648

0.4527
0.0000

F-statistic
Prob(F-statistic)

97.09438
0.000000

Kim nh Ramsey RESET s dng hi quy ph, khi thm mt phn


t vo m hnh gc:
2

60

(10.2)

CSt =

+1 Y2 t

+ 1C St + ut

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

H0: 1 = 0: M hnh gc khng thiu bin, dng hm ng


H1: 1 0: M hnh gc thiu bin, dng hm sai
2

Fqs =

2
2

( 1 n, k( 1 0 .2 ))

[Equation] View Stability Test Ramsey RESET Test


[RESET Specification] Number of fitted terms: 1
S phn t mun thm vo, nhp l 1

Ramsey RESET Test:


F-statistic
Log likelihood ratio

0.348918
0.389707

Probability
Probability

Test Equation:
Dependent Variable: CS
Method: Least Squares
Sample: 1960 1986
Included observations: 27
Variable
Coefficient
C
-268.6193
Y
0.954119
FITTED^2
-0.000152

Std. Error
746.5686
0.607571
0.000257

R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood
Durbin-Watson stat

Mean dependent var


S.D. dependent var
Akaike info criterion
Schwarz criterion
F-statistic
Prob(F-statistic)

0.798175
0.781356
369.0360
3268502.
-196.3154
0.428978

0.560248
0.532453

t-Statistic
-0.359805
1.570384
-0.590693

Prob.
0.7221
0.1294
0.5602
2037.449
789.2231
14.76410
14.90809
47.45732
0.000000

61

R(10.2) R(10.1) n k(10.2)


1 R(10.2)

so snh vi F

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

[?] - Hy nu chi tit cch tnh gi tr F-statistic = 0,34918 trong


bng, v cho bit bc t do tng ng bng bao nhiu?
- Theo kim nh ny, m hnh gc c thiu bin khng?
Khi mun kim nh bng cch thm 2 nhn t vo m hnh gc, phng
trnh hi quy ph:
2

(10.3)

Gi thuyt H0: H0: 1 = 2 = 0


[?] - Thc hin kim nh khi thm 2 phn t, v kt lun v dng
hm ca m hnh gc?

10.2 Kim nh nhn t Lagrange (kim nh 2)


Hi quy ph
2

Tng qut

m+1

+ vt (10.4)

H0: M hnh gc c dng hm ng


H1: M hnh gc c dng hm sai
2

Trng hp n gin
n gin

Lu li phn d l E v gi tr c lng l CSF


[Equation] View Estimation Output
[Equation] Procs Make Residual Series
[Make Residuals] Name of resid series: E
[Equation] Forecast Forecast name: CSF

(10.5)

62

CSt =

+1 2Y

)t +

1C St + 2 C St + ut

et =

+ 12Y

et =

+1 Y2

)t +

)t +

1CSt + ... +

1C St + vt

CSt

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

Hi quy ph
Lnh: LS E C Y CSF^2

Dependent Variable: E
Included observations: 27
Variable

Coefficient

Std. Error

t-Statistic

Prob.

C
Y
CSF^2

-423.8432
0.357051
-0.000152

746.5686
0.607571
0.000257

-0.567722
0.587669
-0.590693

0.5755
0.5622
0.5602

R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood
Durbin-Watson stat

[?] - Tnh

0.014330
-0.067809
369.0360
3268502.
-196.3154
0.428978

qs2

Mean dependent var


S.D. dependent var
Akaike info criterion
Schwarz criterion
F-statistic
Prob(F-statistic)

-2.97E-13
357.1264
14.76410
14.90809
0.174459
0.840967

thc hin kim nh, bc t do tng ng l

bao nhiu?
- Theo kim nh ny, m hnh gc c dng hm ng hay
khng?
- Thc hin kim nh vi hi quy ph sau v cho kt lun
2

10.3 Khc phc khuyt tt tng hp

Quay li vi m hnh hi quy CSt = 1 + 2Yt + (10.1)


ut

[?] Gii thch ngha ca m hnh

(10.6)

- Hi quy m hnh, cho bit m hnh c nhng khuyt tt no?


- Nu cc cch khc phc cc khuyt tt ca m hnh?

63

et =

+1 Y2

)t +

1C St + 2 C St + vt

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

Dependent Variable: CS
Sample: 1960 1986
Included observations: 27
Variable
Coefficient
C
155.2239
Y
0.597069

Std. Error
203.4712
0.060594

R-squared
Durbin-Watson stat

Mean dependent var


Prob(F-statistic)

2037.449
0.000000

Probability
Probability

0.006503
0.009789

0.795240
0.462830

White Heteroskedasticity Test:


F-statistic
6.256641
Obs*R-squared
9.253033

t-Statistic
0.762879
9.853648

Prob.
0.4527
0.0000

Breusch-Godfrey Seri al Correlation LM Test: AR(1)


F-statistic
34.31433 Probability
Obs*R-squared
15.88781 Probability

0.000005
0.000067

Ramsey RESET Test: number of fitted terms: 1


F-statistic
0.348918 Probability
Log likelihood ratio
0.389707 Probability

0.560248
0.532453

M hnh c cc khuyt tt: Phng sai sai s thay i, t tng quan


bc 1. Thc hin khc phc cc khuyt tt .
Khc phc t tng quan bng cch thm bin tr
Thm tr bc 1 ca bin ph thuc vo m hnh, m hnh mi khng
dng c kim nh DW:
CSt = 1 + 2Yt + 2CSt 1 + ut (10.7)
LS CS C Y CS(-1)

Dependent Variable: CS
Sample(adjusted): 1961 1986
Included observations: 26 after adjusting endpoints

Variable
C
Y
CS(-1)

Coefficient
3.962031
0.207495
0.695319

Std. Error
122.4302
0.064345
0.094013

64

t-Statistic
0.032362
3.224707
7.396025

Prob.
0.9745
0.0038
0.0000

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

R-squared
Durbin-Watson stat

0.937124
1.919159

Mean dependent var


Prob(F-statistic)

2068.732
0.000000

Probability
Probability

0.034049
0.043502

Breusch-Godfrey Seri al Correlation LM Test:


F-statistic
0.045571 Probability
Obs*R-squared
0.053745 Probability

0.832923
0.816670

Ramsey RESET Test:


F-statistic
Log likelihood ratio

0.197454
0.156478

White Heteroskedasticity Test:


F-statistic
3.188330
Obs*R-squared
9.823814

1.766355
2.007940

Probability
Probability

M hnh vn cn phng sai sai s thay i, cn khc phc


Trng hp 1
Khc phc phng sai sai s thay i bng cch chia cho c lng
bin ph thuc
C St C tS C tS

+ 3

C St 1 + ut
C St
CS t

Lu li gi tr c lng
[Equation] Forecast Forecast name: CSM
LS CS/CSM 1/CSM Y/CSM CS(-1)/CSM

(10.8)

Dependent Variable: CS/CSM


Sample(adjusted): 1961 1986
Included observations: 26 after adjusting endpoints
Variable
1/CSM
Y/CSM
CS(-1)/CSM

Coefficient
23.65519
0.254084
0.609406

Std. Error
79.66907
0.059616
0.098079

t-Statistic
0.296918
4.262025
6.213392

Prob.
0.7692
0.0003
0.0000

R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood

0.325043
0.266351
0.087196
0.174871
28.13101

Mean dependent var


S.D. dependent var
Akaike info criterion
Schwarz criterion
Durbin-Watson stat

65

CSt

1 Y
= 1 2

1.001633
0.101801
-1.933155
-1.787990
1.687418

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

White Heteroskedasticity Test:


F-statistic
1.886912
Obs*R-squared
9.707915

Probability
Probability

0.135595
0.137504

Breusch-Godfrey Seri al Correlation LM Test:


F-statistic
0.716728 Probability
Obs*R-squared
0.820183 Probability

0.406335
0.365127

Ramsey RESET Test:


F-statistic
Log likelihood ratio

0.872215
0.859623

0.026481
0.031277

Probability
Probability

M hnh khng c h s chn, Eviews khng tnh thng k F ca kim


nh v s ph hp, h s xc nh c th khng mang ngha ng.
Trng hp 2
Khc phc phng sai sai s thay i bng cch chia cho CS(-1)
CSt

Yt

CSt 1

CSt 1

C St 1

+ 3 +

ut
CSt 1

(10.9)

LS CS/CS(-1) 1/CS(-1) Y/CS(-1) C


Dependent Variable: CS/CS(-1)
Sample(adjusted): 1961 1986
Included observations: 26 after adjusting endpoints
Variable
Coefficient
Std. Error
1/CS(-1)
40.67407
82.29139
Y/CS(-1)
0.266193
0.060099
C
0.580444
0.106325
R-squared
Sum squared resid
Durbin-Watson stat

0.470931
0.194990
1.728394

White Heteroskedasticity Test:


F-statistic
1.701609
Obs*R-squared
6.364257

t-Statistic
0.494269
4.429221
5.459150

Prob.
0.6258
0.0002
0.0000

Mean dependent var


F-statistic
Prob(F-statistic)

1.038130
10.23630
0.000661

Probability
Probability

0.187270
0.173547

Breusch-Godfrey Seri al Correlation LM Test: AR(1)


O
bs*R-squared
F-statistic

0.553661
0.638264

Probability 0.464700
Probability 0.424340
Ramsey RESET Test:
F-statistic
Log likelihood ratio

2.380814
2.671606

Probability
Probability

66

= 1

0.137097
0.102153

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

Trng hp 3
Khc phc phng sai sai s thay i bng cch chia cho Y
Yt Yt

CS t 1

Yt

Yt

LS CS/Y 1/Y C CS(-1)/Y

(10.10)

Dependent Variable: CS/Y


Sample(adjusted): 1961 1986
Included observations: 26 after adjusting endpoints
Variable
Coefficient
Std. Error
1/Y
-2.478002
74.42575
C
0.253066
0.060676
CS(-1)/Y
0.626413
0.095424
R-squared
Sum squared resid
Durbin-Watson stat

0.666755
0.072154
1.636999

White Heteroskedasticity Test:


F-statistic
1.463834
Obs*R-squared
5.668846

t-Statistic
-0.033295
4.170761
6.564513

Prob.
0.9737
0.0004
0.0000

Mean dependent var


F-statistic
Prob(F-statistic)

0.649882
23.00917
0.000003

Probability
Probability

0.248651
0.225282

Breusch-Godfrey Seri al Correlation LM Test: AR(1)


F-statistic
0.965274 Probability
Obs*R-squared
1.092829 Probability

0.336544
0.295845

Ramsey RESET Test:


F-statistic
Log likelihood ratio

0.482943
0.440476

0.509304
0.595043

Probability
Probability

[?] - Kim nh cc khuyt tt ca m hnh (10.8), (10.9), (10.10)


- So snh nh gi cc m hnh , xc nh m hnh tt nht?

- Vi m hnh tt nht, phn tch tc ng ca thu nhp Y, chi tiu


k trc CS(-1) n chi tiu cng k CS?

C St 1
= 1

+ 3

+67t

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

68

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

HNG DN TI CHNG TRNH EVIEWS4 V S LIU


Mt s sinh vin c thc mc v vic ti xung (download) chng
trnh Eviews, do phn ny hng dn chi tit cng on ny.
1. Ti chng trnh v s liu t trang mng
Ti trang mng khoa Ton kinh t: www.mfe.edu.vn chn mc Th
vin, ri mc D liu phn mm.

Trong trang ny c phn Chng trnh cho thc hnh, c lin kt


EVIEWS4, nhn chut tri vo lin kt ti v, hoc nhn chut
phi v chn Save link as ti v.
File ti v l file nn dng zip: Eviews4_2010.zip.

69

HNG DN THC HNH EVIEWS 4 - BI DNG HI - KHOA TON KINH T - HKTQD

2. Gii nn th mc chng trnh v s liu


Hai file ti v l file nn, cha th s dng ngay. Vi h iu hnh
WindowsXP tr i, c th m file nn xem ni dung trc tip,
nhng cha phi l gii nn, do cha th chy chng trnh c.
Ti th mc cha hai file nn, nhn chut phi vo 1 file nn, v chn
gii nn (Extract files hoc Extract Here)

Gii nn c hai file, c th mc Eviews4_2010 v trong c th


mc SOLIEU cng 3 th mc d liu l DATA, DATA2, DATA3, v
cc file chng trnh.

70