You are on page 1of 29

Humboldt Universitt zu Berlin Institut fr Statistik und konometrie

D. Markovic

A uide to !"ie#s
Based on a Practical Guide by R. R. Johnson Professor of Economics, The University of San Die o

A $uide to !"ie#s

&

%S &''&(&'')

%S &''&(&'')

A $uide to !"ie#s

ontents

1. An Overview of Regression Analysis.............................................................................................................4 Creating an EViews workfile..............................................................................................................4 Entering data into an EViews workfile...............................................................................................5 Importing data from a spreadsheet......................................................................................................5 Generating new variables in EViews..................................................................................................6 Creating a group in EViews................................................................................................................6 Running a simple regression............................................................................................................... 2. Displaying numerical and graphical results of a Regression Analysis.........................................................9 !ispla"ing the des#riptive statisti#s for a group of variables..............................................................$ !ispla"ing the simple #orrelation #oeffi#ients between all pairs of variables in a group.................%& Running a simple regression ............................................................................................................%% !o#umenting the results....................................................................................................................%% !ispla"ing the table and a graph of the a#tual' fitted and residuals for a regression........................%( . !ypothesis testing........................................................................................................................................1 Cal#ulating #riti#al t values and appl"ing the de#ision rule..............................................................%) Cal#ulating #onfiden#e intervals.......................................................................................................%4 *erforming the t+test of the simple #orrelation #oeffi#ient ...............................................................%4 *erforming the ,+test of overall signifi#an#e....................................................................................%5 4. Autocorrelation " !eteroscedasticity........................................................................................................1# Creating a residual series from a regression model...........................................................................%6 *lotting the error term to dete#t auto#orrelation................................................................................%6 Estimation of the first order auto#orrelation #oeffi#ient ..................................................................% Graphing to dete#t heteros#edasti#it"................................................................................................%.esting for heteros#edasti#it"+/hite0s test.......................................................................................%/eighted least s1uares......................................................................................................................%$ 2eteros#edasti#it" Corre#ted 3tandard Errors...................................................................................(& $. %imultaneous &'uations..............................................................................................................................21

%S &''&(&'')

A $uide to !"ie#s

1.

An Overview of Regression Analysis


In t*is section+ ,reatin an !vie#s #orkfile !nterin data into an !vie#s #orkfile Im-ortin data from a s-reads*eet $eneratin ne# variables in !vie#s ,reatin a rou- in !"ie#s .unnin a sim-le re ression

Data set+ /*e -er ca-ita dis-osable income in 0ear t 11111.. data listing Annual data on -er ca-ita consum-tion of beef /*e -rice of beef in 0ear t 11 file:beef.xls

,reatin an !"ie#s #orkfile


If data sets are not in !"ie#s data format2 0ou3ll need to create an !"ie#s #orkfile and to eit*er enter or import t*e data into t*e created #orkfile. /o create a ne# #orkfile do t*e follo#in ste-s+ Select File/New/Workfile on t*e !"ie#s menu bar Set t*e %orkfile Frequency to Annual Since t*e observations are from t*e -eriod 456'745892 set t*e Start date to 456' and t*e End date to 4589. :nce 0ou *ave selected a--ro-riate ran e click OK. !"ie#s #ill create an untitled #orkfile and #ill dis-la0 t*e #orkfile #indo# in t*e main #ork area of t*e !"ie#s screen. /*e #orkfile #indo# dis-la0s t#o -airs of numbers+ one for t*e Range and t*e second for t*e current #orkfile Sample.

%S &''&(&'')

A $uide to !"ie#s

!nterin data into an !"ie#s #orkfile


/o enter t*e -er ca-ita dis-osable income in 0ear t into t*e ne#l0 created #orkfile follo# t*e ste-s bello#+ Select Ob ect/New Ob ect!/Serie! from t*e main menu or t*e #orkfile menu2 enter " in t*e Name for :b<ect and click OK. All of t*e observations in t*e series #ill be assi ned to t*e missin value code =>A3. /o enter t*e data2 double click on t*e name of t*e series ?I@ and click edit#/$ on t*e series #indo# menu bar. /*e numbers can be entered into t*e table to re-lace >A3s -ressin Enter after eac* entr0. After t*e c*an es are done2 click edit #/$ on t*e series #indo# menu bar to save t*e c*an es and eAit t*e edit function. /*e series #indo# can be closed b0 clickin t*e button in t*e u--er ri *t corner of t*e series #indo#. /o save t*e c*an es2 click Sa%e on t*e #orkfile menu bar.

Im-ortin data from a s-reads*eet


,lick &roc!/"mport/Read 'e(t$)otu!$E(cel on t*e #orkfile menu bar Select t*e file location2 select E(cel *+,(l!- for t*e file t0-e and click Open. Bill in .pper left data cell A& ?t*is is t*e location of t*e first data@2 and in t*e field Name! for !erie! or Number.. enter eit*er b &2 or &. >ote t*at #*en 0ou enter t*e number of t*e series2 !"ie#s #ill enter t*e names of t*e series t*at are -rinted in t*e ro# above eac* data series. ,lick OK to com-lete t*e im-ort -rocess.

%S &''&(&'')

A $uide to !"ie#s

$eneratin ne# variables in !"ie#s


/*e data on t*e -er ca-ita dis-osable income are iven in t*ousands of dollars. Det3s assume t*at from t*e some reason it #ould be better if t*ese data re in dollars. /*e ne# variable #*ic* #e #ill name "/ #ill be t*erefore 4''' I. /o enerate "/2 click 0enr on t*e #orkfile menu and enter t*e formula+ I4EIF4'''

,lick OK and t*e ne# variable named I4 #ill a--ear in t*e #orkfile #indo#.

,reatin a rou- in !"ie#s


!"ie#s -rovides s-ecialised tools for #orkin #it* rou- of variables. Bollo# t*ese ste-s to create a rou- ob<ect containin t*e data on t*e -er ca-ita dis-osable income7I42 -er ca-ita consum-tion of beef7B and t*e -rice of beef7G+ /o create a rou- ob<ect for t*e I42 B and G data2 *old do#n 1trl button and click on eac* of t*ese variable names and t*en select S2ow from t*e #orkfile toolbar. /o name a rou-2 click Name or Ob ect/Name on t*e enter 3"/& in t*e name to identif0 ob<ect7#indo#. rou- menu bar and t*en

/o save t*e c*an es in 0our #orkfile2 click Sa%e on t*e #orkfile menu bar.

%S &''&(&'')

A $uide to !"ie#s

.unnin a sim-le re ression


.e ression estimation in !"ie#s is -erformed usin eHuation ob<ect in !"ie#s2 follo# t*ese ste-s+ t*e eHuation ob<ect. /o create an

Select Ob ect!/NewOb ect/Equation from t*e #orkfile menu. !nter t*e name of t*e eHuation7 eq/ in t*e Name for :b<ect7#indo# and click OK. !nter t*e de-endant variable ?B7 consum-tion of beef@2 t*e constant? , @ 2 and t*e inde-endent variables ?G7-rice of beef2 I47 t*e income@ in t*e Equation !pecification, It is im-ortant to enter t*e de-endant variable firstI Select t*e estimation Met*od+ DS J Deast SHuares ?>DS and A.MA@ and click OK to vie# t*e !"ie#s Deast SHuares re ression out-ut table+

%S &''&(&'')

A $uide to !"ie#s

Explanation of the statistics given in the EViews estimation output window


1oefficient7 t*e estimated coefficients. /*e least sHuares re ression coefficients are com-uted b0 t*e standard :DS formula Standard Error 7 re-orts t*e estimated standard errors of t*e coefficient estimates. /*e standard errors measure t*e statistical reliabilit0 of t*e coefficient estimates7t*e lar er t*e standard errors2 t*e more statistical noise in t*e estimates. /*e standard errors of t*e estimated coefficients are t*e sHuare roots of t*e dia onal elements of t*e coefficient covariance matriA. Kou can vie# t*e #*ole covariance matriA b0 c*oosin "ie#(,ovariance MatriA. t$Stati!tic!7 t*e ratio of an estimated coefficient to its standard error2 is used to test t*e *0-ot*esis t*at a coefficient is eHual to zero. /o inter-ret t*e t7statistic2 0ou s*ould eAamine t*e -robabilit0 of observin t*e t7statistic iven t*at t*e coefficient is eHual to zero. &robability7 t*e -robabilit0 of dra#in a t7statistic as eAtreme as t*e one actuall0 observed2 under t*e assum-tion t*at t*e errors are normall0 distributed2 or t*at t*e estimated coefficients are as0m-toticall0 normall0 distributed. $iven a -7value2 0ou can tell at a lance if 0ou re<ect or acce-t t*e *0-ot*esis t*at t*e true coefficient is zero a ainst a t#o7sided alternative t*at it differs from zero. Bor eAam-le2 if 0ou are -erformin t*e test at t*e CL si nificance level2 a value lo#er t*an '.'C is taken as evidence to re<ect t*e null *0-ot*esis of a zero coefficient. If 0ou #ant to conduct a one7sided test2 t*e a--ro-riate -robabilit0 is one7*alf t*at re-orted b0 !"ie#s. Summar0 Statistics R$!quared7 measures t*e success of t*e re ression in -redictin t*e values of t*e de-endent variable #it*in t*e sam-le. In standard settin s2 ma0 be inter-reted as t*e fraction of t*e variance of t*e de-endent variable eA-lained b0 t*e inde-endent variables. /*e statistic #ill eHual one if t*e re ression fits -erfectl02 and zero if it fits no better t*an t*e sim-le mean of t*e de-endent variable. It can be ne ative for a number of reasons. Ad u!ted R$!quared7 -enalises t*e for t*e addition of re-ressors #*ic* do not contribute to t*e eA-lanator0 -o#er of t*e model. /*e . & is never lar er t*an t*e 2 can decrease as 0ou add re-ressors2 and for -oorl0 fittin models2 ma0 be ne ative. Standard Error of t2e Regre!!ion7 a summar0 measure based on t*e estimated variance of t*e residuals. )og )ikeli2ood7 t*e value of t*e lo likeli*ood function ?assumin evaluated at t*e estimated values of t*e coefficients. normall0 distributed errors@

4urbin$Wat!on Stati!tic7 measures t*e serial correlation in t*e residuals. As a rule of t*umb2 if t*e D% is less t*an &2 t*ere is evidence of -ositive serial correlation. /*e D% statistic in our out-ut is ver0 close to one2 indicatin t*e -resence of serial correlation in t*e residuals. /*ere are better tests for serial correlation. In /estin for Serial ,orrelation2 #e discuss t*e M7 statistic2 and t*e Breusc*7$odfre0 DM test2 bot* of #*ic* -rovide a more eneral testin frame#ork t*an t*e Durbin7%atson test. Akaike "nformation 1riterion7 often used in model selection for non7nested alternatives7smaller values of t*e AI, are -referred. S2war5 1riterion7 an alternative to t*e AI, t*at im-oses a lar er -enalt0 for additional coefficients F$Stati!tic7 from a test of t*e *0-ot*esis t*at of t*e slo-e coefficients ?eAcludin t*e constant2 or interce-t@ in a re ression are zero. &rob*F$!tati!tic-7 is t*e mar inal si nificance level of t*e B7est. If t*e -7value is less t*an t*e si nificance level 0ou are testin 2 sa0 '.'C2 0ou re<ect t*e null *0-ot*esis t*at all slo-e coefficients are eHual to zero.

%S &''&(&'')

A $uide to !"ie#s

2.

Displaying numerical and graphical results of a Regression Analysis


In t*is section+ Dis-la0in t*e descri-tive statistics for a rou- of variables Dis-la0in t*e sim-le correlation coefficients bet#een all -airs of variables .unnin a sim-le re ression Documentin t*e results Dis-la0in t*e table and a ra-* of t*e actual2 fitted and residuals for a re ression

Data set+ Denn03s restaurant data11111.. denny.wf1 K7 $ross sales volume >7 /*e number of direct market com-etitors #it*in a t#o mile radius of t*e Dann03s location G7 /*e number of -eo-le livin #it*in ) miles radius of t*e Denn03s location I7 /*e avera e *ouse*old income of t*e -o-ulation measured in G /*e oal is to determine t*e best location for t*e neAt Denn03s restaurant2 #*ere Denn03s is a &;7* famil0 restaurant c*ain. /*is can be ac*ieved b0 buildin a re ression model to eA-lain ross sales a s a function of location. %it* t*e iven model2 buildin and location costs2 t*e o#ners of Denn03s s*ould be able to make a decision.

Dis-la0in t*e descri-tive statistics for a rou- of variables


,reate an !"ie#s rou- for Denn03s restaurant data ?*old do#n 1trl button2 click on K2 >2 G and I2 select S2ow from t*e #orkfile toolbar and click OK@ . >ame t*e data rou- NdennyO. ,lick 6iew/4e!cripti%e Stat!/"ndi%idual Sample! on t*e vie# t*e descri-tive statistics for rou- Ndenny. rou- menu bar to

/o save t*e table2 click Free5e on t*e rou- menu bar and define t*e name for created ob<ect b0 clickin Name on t*e #indo# menu bar. Explanation of the some of statistics given in the descriptive statistics table: Kurtosis- measures the peakdness or flatness of the distribution of the series Jarque-Bera is a test statistic for testing whether the series are normally distributed. he test statistic measures the difference of the skewness and kurtosis of

%S &''&(&'')

A $uide to !"ie#s

4'

the series with those from the normal distribution. !nder the null hypothesis of a normal distribution" the #ar$ue-%era statistic is distributed as with & degrees of freedom. Probability is the probability that #ar$ue-%era statistic exceeds 'in absolute value( the observed value under the null hypothesis of a normal distribution.

Dis-la0in t*e sim-le correlation coefficients bet#een all -airs of variables in a rou :-en t*e rou- created in -revious section ?N dennyO@ b0 double clickin name of t*e rou- in t*e #orkfile menu. t*e

,lick 6iew/1orrelation!/&airwi!e Sample! on t*e rou- #indo# menu bar to dis-la0 t*e sim-le correlation coefficients bet#een all -airs of variables included in t*e rou- ob<ect. /o save t*e results click click Free5e on t*e rou- menu bar and define t*e name for created ob<ect b0 clickin Name on t*e #indo# menu bar.

%S &''&(&'')

A $uide to !"ie#s

44

.unnin a sim-le re ression


Here is a one more #a0 of estimatin coefficients of t*e re ression model+ Double click on t*e name of t*e rou- in t*e #orkfile menu Select &roc!/7ake Equation on t*e rou- menu bar. !"ie#s #ill automaticall0 c*oose t*e first variable from t*e rou- as de-endant variable and ot*ers as inde-endent. Kou can c*an e t*is b0 res-ecification of variables. After c*oosin !stimation settin s click OK. /o name t*e eHuation click >ame on t*e eHuation menu bar2 enter t*e name and click :P.

Documentin t*e results


If 0ou closed eHuation #indo# b0 an0 reason2 for documented 0ou need to *ave eHuation #indo# o-en. ettin re ression results

$et t*e eHuation #indo# o-en ?click t#o times on t*e name of t*e eHuation in t*e #orkfile menu@ ,lick 6iew/Repre!entation! on t*e eHuation menu bar to et t*e follo#in +

Estimation !ommand" ##################### $S % P & ' ! Estimation E(uation" ##################### % # !)*+,P - !).+,& - !)/+,' - !)0+ Substituted !oefficients" ##################### % # 1./20334/350,P 6 7150.350/77,& - *..457.//7*,' - *1.*7..0.55

%S &''&(&'')

A $uide to !"ie#s

4&

Dis-la0in t*e table and a ra-* of t*e actual2 fitted and residuals for a re ression
Bor ettin tabular or ra-*ical inter-retation of results 0ou #ould need first to *ave eHuation #indo# o-en Bor dis-la0in t*e table of t*e actual2 fitted and residuals for a re ression click 6iew/Actual8Fitted8Re!idual/Actual8Fitted8Re!idual 'able and 0ou s*ould et somet*in like t*e fi ure belo#+

Bor dis-la0in a ra-* of t*e actual2 fitted and residuals for a re ression click 6iew/Actual8Fitted8Re!idual/Actual8Fitted8Re!idual 0rap2

%S &''&(&'')

A $uide to !"ie#s

4)

3.

Hypothesis testing
In t*is section+ ,alculatin critical t values and a--l0in t*e decision rule ,alculatin confidence intervals Gerformin t*e t7test of t*e sim-le correlation coefficient Gerformin t*e B7test of overall si nificance

Data set+ Denn03s restaurant data11111.. denny.wf1 Before -erformin above named -rocedures2 it is advisable to create one table for storin all results. /o create a table named *0-ot*esisQtestin t0-e table hypothesis_testing in t*e command #indo# and -ress Enter+

>ote t*at for sin le cells in a table matriA notation is valid.

,alculatin critical t values and a--l0in t*e decision rule


/o com-ute t*e two tailed critical t7value for t*e CL si nificance level and to assi n t*is result to t*e first cell of t*e table hypothesis)testing t0-e t*e follo#in command in t*e command #indo# and -ress Enter+ hy8othesis9testin )*,*+#:(tdist).752,)eq01.@regobs-eq01.@ncoef++ /o com-ute t*e one tailed critical t7value for t*e CL si nificance level and to assi n t*is result to t*e second cell of t*e table hypothesis)testing t0-e t*e follo#in command in t*e command #indo# and -ress Enter+

%S &''&(&'')

A $uide to !"ie#s

4;

*0-ot*esisQtestin ?&24@ERHtdist?.5C2?e$*1.+regobs-e$*1.+ncoef@@ It is advisable to -ut a descri-tion of t*e result in t*e cell neAt to t*e result. /o do t*is2 *ave in mind t*at for t*e table cells2 matriA notation is valid and t0-e eac* teAt #it*in Huotation marks ?N O@. Bor eAam-le2 to -rint t*e descri-tion of t*e first calculated variable t0-e t*e follo#in in t*e command #indo# and -ress Enter+ hy8othesis9testin )*,.+#;t6critical, t<o tailed test, 2= si nificance level; Note that when you have one command in the command window, the next one you dont have to really ty e but to sim le correct the existing one and than to ress !nter.

,alculatin confidence intervals


/o calculate t*e lower %alue for t2e 9:; confidence inter%al for t*e -o-ulation coefficient ?t*e first inde-endent variable in our eH'4 listin @ and to assi n t*e result to t*e t*ird cell of t*e table hypothesis)testing enter t*e follo#in command in t*e command #indo# and -ress Enter+
*0-ot*esisQtestin )/,*+#e(1*.:coefs)*+6):(tdist).72,)e(1*.:re obs6e(1*.:ncoef+++,e(1*.:stderrs)*+

/o calculate t*e upper %alue for t2e 9:; confidence inter%al for t*e -o-ulation coefficient ?t*e first inde-endent variable in our eH'4 listin @ and to assi n t*e result to t*e fourt* cell of t*e table hypothesis)testing enter t*e follo#in command in t*e command #indo# and -ress Enter+
*0-ot*esisQtestin )0,*+#e(1*.:coefs)*+-):(tdist).72,)e(1*.:re obs6e(1*.:ncoef+++,e(1*.:stderrs)*+

Gerformin t*e t7test of t*e sim-le correlation coefficient


/o calculate t*e !imple correlation coefficient and to assi n it to t*e fift* cell of t*e table hypothesis)testing2 t0-e t*e follo#in in t*e command #indo# and -ress Enter. hy8othesis9testin )2,*+#:cor)y,8+ /o convert t*e sim-le correlation coefficient bet#een K and G into a t7value and to store it into a table hypothesis)testing t0-e t*e follo#in in t*e command #indo# and -ress Enter+ hy8othesis9testin )3,*+#):cor)y,8+,)):obs)y+6.+>.2++?))*6:cor)y,8+>.+>.2+ /o calculate t*e critical t7value for t*e t7distribution #it* >7& de rees of freedom ?> is t*e number of observations@ and to store it in t*e sevent* cell of t*e table t0-e t*e follo#in in t*e command #indo# and -ress Enter+ hy8othesis9testin )5,*+#:(tdist).752,):obs)y+6.++

%S &''&(&'')

A $uide to !"ie#s

4C

Gerformin t*e B7test of overall si nificance


/*e B7statistics test t*e *0-ot*esis t*at all of t*e slo-e coefficients eAcludin t*e constant are zero. /*e null *0-ot*esis can be re<ected if t*e calculated B7statistics eAceeds t*e critical B7value at a c*osen si nificance level. /o calculate t*e F$!tati!tic for t*e Denn03s restaurant data and to store result in ro# ei *t of t*e table hy othesis"testing t0-e t*e follo#in into t*e command #indo# and -ress Enter+ hy8othesis9testin )4,*+#e(1*.:f To calculate the 2% critical F-value for t*e Denn03s restaurant data and to store result in ro# nine of t*e table hy othesis"testing t0-e t*e follo#in into t*e command #indo# and -ress Enter+ hy8othesis9testin )7,*+#:(fdist).72,e(1*.:ncoef6*,e(1*.:re obs6e(1*.:ncoef+ Settin t*e table o-tions If 0ou *ave successfull0 com-leted ste-s from t*e -revious section 0ou s*ould *ave a table hy othesis"testing <ith all results and the descri8tion of results. %ou noticed 8robably that the table cells are to narro< to ive a nice results visualisation. To chan e the table o8tions try the buttons from the table <indo< menu ) Font, InsDel,Width@+. %our table should contain the follo<in results"

%S &''&(&'')

A $uide to !"ie#s

46

4.

Autocorrelation
In t*is section+

Heteroscedasticity

,reatin a residual series from a re ression model Glottin t*e error term to detect autocorrelation !stimation of t*e first order autocorrelation coefficient $ra-*in to detect *eteroscedasticit0 /estin for *eteroscedasticit07%*ite3s test %ei *ted least sHuares Heteroscedasticit0 corrected standard errors

Data set+ /*e -etroleum consum-tion data 11111.. ,-..wf1 G,:>7 -etroleum consum-tion in t*e I7t* state ?millions of B/Us@ .!$7 motor ve*icle re istration in t*e I7t* state ?t*ousands@ /AS7 t*e asoline taA rate in t*e I7t* state ?cents -er allon@

,reatin a residual series from a re ression model


Hold 1trl and select &1ON8 RE08 'A<. ?Ga0 al#a0s attention t*at t*e first selected variable is t*e de-endant variable. :rder of t*e successive variables is not im-ortant.@ /*e fastest #a0 no# to estimate t*e model is to pre!! t2e rig2t mou!e button2 select Open/A! Equation and -ress Enter. Select Name on t*e eHuation #indo# menu bar and enter eq:/ for t*e name of t*e eHuation results. /o create a ne# series for t*e residuals2 select &roc!/7ake Re!idual !erie! on t*e eHuation menu bar. In t*e Make .esiduals #indo# select Ordinary residual t0-e2 >ame t*e residual series error! and -ress Enter.

Glottin t*e error term to detect autocorrelation


:-en t*e eq:/ #indo# b0 double clickin in t*e #orkfile #indo#

%S &''&(&'')

A $uide to !"ie#s

49

Select 6iew/Actual8 Fitted8Re!idual/Re!idual 0rap2 on t*e eHuation #indo# menu bar or o-en t*e residual series named error and select 6iew/ 0rap2/)ine

/o *ave t*is fi ure saved 0ou s*ould first -ress Free5e on t*e ra-* #indo#. /*en 0ou can name it b0 -ressin Name,
*.11 411 011 1 6011 6411 2 *1 *2 .1 .2 /1 /2 01 02 21 P!A& Residuals

!stimation of t*e first order autocorrelation coefficient


Select Ob ect!/New Ob ect/Equation on t*e #orkfile menu bar2 t0-e for t*e eHuation name Autocorr2 in t*e !Huation s-ecification #indo# enter Error! 1 Error! *$/- and -ress Enter. Kou s*ould et t*is as an out-ut+

%S &''&(&'')

A $uide to !"ie#s

48

$ra-*in to detect *eteroscedasticit0


/o make a sim-le scatter ra-* of an error a ainst RE0 *old 1trl and select first RE0 and t*an error from t*e !"ie#s #orkfile. &re!! rig2t mou!e button and select Open/A! 0roup. Brom t*e rou#indo# menu select 6iew/0rap2/Scatter/!imple Scatter. /o save t*e fi ure use t*e -revious eA-lanations ?Breeze and t*an >ame@. Bor cratin ra-* of error a ainst /AS use t*e same -rocedure b0 re-lacin RE0 #it* 'A<.
*.11 411 011 1 6011 6411 1 2111 *1111 REG *2111 .1111 *.11 411 011 1 6011 6411 0 3 4 *1 TBC *. *0 *3

/estin for *eteroscedasticit07%*ite3s test


:-en eq:/ from t*e !"ie#s #orkfile and select 6iew/Re!idual 'e!t!/W2ite =etero!ceda!ticity *cro!! term!-. /*e variable denoted #it* Ob!+R$!quared is t*e %*ite test statistic. It is com-uted as t*e number of observations times .& from t*e test re ression. It is as0m-toticall0 distributed as a & #it* de rees of freedom eHual to t*e number of slo-e -arameters. /*e critical CL & value can be calculated b0 t0-in t*e follo#in formula in !"ie#s command #indo#+

%S &''&(&'')

ER R A R S

ERR AR S

A $uide to !"ie#s

45

/+$chis$'.01"1@ /*e formula ScalarE+$chis$'p"@ finds t*e value Scalar suc* t*at -rob?& #it* de rees of freedom is 4Scalar@E-. /*e result #ill a--ear in t*e bottom left corner of t*e !"ie#s #indo#+ Scalar>//,:?:@9?A9BC. Since t*e %*ite test statistic *as a value of )).&&C6; #*at is reater t*an t*e CL critical & value #e can re<ect t*e null *0-ot*esis t*at t*ere is no *eteroscedasticit0.

%ei *ted least sHuares


Select Ob ect!/New Ob ect/Equation on t*e #orkfile menu bar and name t*e eHuation W)S. !nter &1ON RE0 'A< 1 in t*e eHuation s-ecification #indo# and select t*e Option! button. ,*eck t*e Weig2ted )S/'S) boA 2 t0-e //RE0 for a #ei *t and -ress OK. >o# 0ou can estimate t*e eHuation b0 -ressin :P in t*e !Huation s-ecification #indo#. Kou s*ould et t*e follo#in table as a result+

%S &''&(&'')

A $uide to !"ie#s

&'

Heteroscedasticit0 ,orrected Standard !rrors


Select Ob ect!/New Ob ect/Equation on t*e #orkfile menu bar and name t*e eHuation =1SE. !nter &1ON RE0 'A< 1 in t*e eHuation s-ecification #indo# and select t*e Option! button. ,*eck t*e =etero!ceda!ticity 1on!i!tent 1oefficient 1o%ariance! boA and select W2ite o-tion. >o# 0ou can estimate t*e eHuation b0 -ressin :P in t*e !Huation s-ecification #indo#. ,om-are t*e !stimation out-ut from t*e uncorrected :DS re ression #it* t*e Heteroscedasticit0 ,onsistent ,ovariance out-ut. >ote t*at t*e coefficients are t*e same but t*e uncorrected std. !rror is smaller. /*is means t*at t*e Heteroscedasticit0 ,onsistent ,ovariance met*od *as reduced t*e size of t*e t7statistics for t*e coefficients.

%S &''&(&'')

A $uide to !"ie#s

&4

!.

"imultaneous #$uations

.tand-alone Exercise

At t*is -oint 0ou s*ould be alread0 #ell versed in dealin #it* re ression models b0 usin !"ie#s. ,oncernin !"ie#s -ossibilities2 t*ere is not muc* to learn *ere. /*e onl0 ne# detail is estimation of t*e t#o7sta e least sHuares model. /o -erform /SDS met*od2 0ou s*ould set in t*e !Huation S-ecification #indo# for t*e estimation met*od 'S)S$'wo$Stage )ea!t Square!*'SN)S and AR7A- . Have in mind t*at t*ere must be at least as man0 instruments ?-redetermined variables@ as t*ere are coefficients in t*e eHuation s-ecification.

/*e oal of t*is eAercise is to ive 0ou an idea *o# it looks in a real #orld settin #*ere 0ou su--ose to eit*er create or inter-ret t*e model before a--l0in an0 of econometric soft#are3s. Havin in mind t*at 0ou ma0 not be -racticed in dealin #it* suc* a task #e #ill tr0 to *el- 0ou #it* a Huestions as a uideline for correct -erformin of t*e t#o sta e least sHuares re ression met*od. /*e model 0ou3ll be usin is t*e naTve Pe0nesian macroeconomic model of t*e U.S. econom0. /*is model is defined b0 t*e follo#in eHuations s0stem+

%S &''&(&'')

A $uide to !"ie#s

&&

Kt E ,:t U It U $t U >St KDt E Kt 7 /t ,:t E ' U 4KDt U &,:t J4 U 4t It E ) U ;Kt U Crt74 U &t rt E 6 U 9Kt U 8Mt U )t

?4@ ?&@ ?)@ ?;@ ?C@

/*e variables from t*is s0stem are+ K J $ross Domestic Groduct?$DG@ in 0ear t ,:7 /otal -ersonal consum-tion in 0ear t I7 /otal ross -rivate domestic investment in 0ear t $7 $overnment -urc*ases of oods and services in 0ear t >S7 >et eA-orts of oods and services in 0ear t KD7 Dis-osable income in 0ear t /7 r7 /aAes in 0ear t /*e interest rater ?0ield on commercial -a-er@ in 0ear t

M7 /*e mone0 su--l0 in 0ear t /*e data ?measured in billions of 4589 dollars@ are from 456; to 455;. /*e0 are stored in t*e !"ie#s #orkfile macroeconom,wf/.

%S &''&(&'')

A $uide to !"ie#s

&)

Dour ta!k!E

Kour -rimar0 oal is to a--l0 &SDS met*od to a naTve linear Pe0nesian macroeconomic model of t*e US. !conom0. /*erefore2 0ou don3t *ave to necessaril0 ans#er t*e follo#in Huestions. But2 t*e0 could uide 0ou to a better understandin of simultaneous eHuations s0stems. Ho# man0 eHuations from t*e above iven s0stem *ave stoc*astic c*aracterV $o carefull0 trou * to t*e eHuations and tr0 to find out #*ic* error terms could cause simultaneit0 biasV %*ic* variables from t*e s0stem are endo enous variables and #*ic* are -redetermined variablesV Ho# man0 reduced form eHuations need to be createdV Dook carefull0 t*e data iven in t*e file and t*e variables in simultaneous eHuations s0stem. ,alculate t*e missin variables. Bind :DS estimate of t*ose endo enous variables #*ic* a--ear on t*e left side of stoc*astic eHuations. Bind !"ie#s estimate of t*e reduced7form eHuations and name t*em Sta eQ:ne'42 Sta eQ:neQ'&1.. Gerform t*e second sta e of t*e &SDS met*od usin !vie#s. !stimate &SDS re ression usin !"ie#s /SDS met*od. ,om-are t*e :DS estimates2 :DS t#o sta e results and !vie#s /SDS.

%S &''&(&'')

A $uide to !"ie#s

&;

.tand-alone Exercise .olution

Ho# man0 eHuations from t*e above iven s0stem *ave stoc*astic c*aracterV :nl0 in t*ree eHuations stoc*astic error term ?@ a--ears. /*erefore2 t*ere are ) stoc*astic eHuations #*ile ot*er t#o are identities. $o carefull0 trou * to t*e eHuations and tr0 to find out #*ic* error terms could cause simultaneit0 biasV Birst #e #ill re#rite t*e eHuation ?)@ as+

1Ot E ' U 4?Kt J/t@U &,:t J4 U /t


Det3s look no# t*e s0stem+

?6@

Dt E 1Ot U It U $t U >St

?9@

1Ot E ' U 4Dt J 4/tU &,:t J4 U /t "t E ) U ;Dt U Crt74 U Ft rt E 6 U 9Kt U 8Mt U )t

?8@ ?5@ ?4'@

a@ If / increases in a -articular time -eriod2 ,: #ill also increase. b@ If ,: increases K #ill also increase because of t*e eHuation ?9@ c@ If K increases in t*e eHuation ?9@ it also increases in t*e eHuation ?8@ #*ere it is an eA-lanator0 variable. /*e similar #ill *a--en if F increases in a -articular time -eriod+ d@ If F increases in a -articular time -eriod2 I #ill also increase. e@ If I increases K #ill also increase because of t*e eHuation ?9@ f@ If K increases in t*e eHuation ?9@ it also increases in t*e eHuation ?5@ #*ere it is an eA-lanator0 variable. Det3s look no# t*e eHuation ?4'@. If F increases in a -articular time -eriod2 t*is #ill cause r to increase2 but increase in r #ill not c*an e an0t*in in t*e s0stem because it a--ears onl0 in t*is eHuation. ?In eHuation ?5@ a--ears rt74 not rtI@. /*is leads us to t*e conclusion t*at t*e eHuation ?4'@ doesn3t belon to t*e simultaneous s0stem.

%S &''&(&'')

A $uide to !"ie#s

&C

%*ic* variables from t*e s0stem are endo enous variables and #*ic* are -redetermined variablesV Havin in mind t*at t*e eHuation ?C@ doesn3t belon to t*e simultaneous s0stem2 #e can eAclude variables rt and Mt from t*e furt*er anal0ses. /*e endo enous variables are t*ose #*ose c*an e im-licates c*an es in t*e #*ole s0stem causin ot*er variables to c*an e but2 t*e c*an e is circular2 oin back to t*e causal variable. Bor eAam-le2 if ,: c*an es t*is #ill cause K to c*an e ?eHuation ?4@@ and t*is #ill cause KD to c*an e ?eHuation ?&@@ and from t*e eHuation ?)@ it follo#s t*at t*is c*an e #ill cause ,: to c*an e2 our causal variable. So2 t*e endo enous variables are Kt2 ,:t2 KDt and It. It is a bit easier to ans#er t*e Huestion #*ic* variables are -redetermined because t*e0 a--ear onl0 once in t*e s0stem. /*ese are $t2 >St2 /t 2 ,:t74 and rt74. Ho# man0 reduced form eHuations need to be createdV /*ere are t#o endo enous variables ?Kt and KDt@ #*ic* a--ear on t*e ri *t *and side of stoc*astic eHuations. /*erefore2 #e need to create onl0 t#o reduced form eHuations+ KDt E f4?$t2 >St2 /t 2 ,:t742 rt74@ Kt E f&?$t2 >St2 /t 2 ,:t742 rt74@ Dook carefull0 t*e data iven in t*e file and t*e variables in simultaneous eHuations s0stem. ,alculate t*e missin variables. /*e missin variables are / and >S and t*e0 can be calculated usin eHuations ?4@ and ?&@. Bind :DS estimate of t*ose endo enous variables #*ic* a--ear on t*e left side of stoc*astic eHuations. Kour out-ut s*ould contain t*e follo#in results+ Estimation E(uation" ##################### !A # !)*+,%D - !).+,!A)6*+ - !)/+ Substituted !oefficients" ##################### #$ % 0.&1'()'*+(,-. / 0.('111)+1*(,#$0-11 - +).10&(1*+2 Estimation E(uation" ##################### ' # !)*+,% - !).+,R)6*+ - !)/+ Substituted !oefficients" ##################### 3 % 0.1'(14+14)1,- - &.'+44(0'*,50-11 / +*.2&*+)'24

%S &''&(&'')

A $uide to !"ie#s

&6

Bind !"ie#s estimate of t*e reduced7form eHuations and name t*em Sta eQ:ne'42 Sta eQ:neQ'&1.. Bs mentioned above, there are t<o reduced form e(uations to be created. The first one should be a function of a variable %D )because %D is a endo enous variable <hich a88ears on the ri ht side of a stochastic e(uation+ and all 8redetermined variables" %D # !)*+,G - !).+,&C - !)/+,T - !)0+,!A)6*+ - !)2+,R)6*+ - !)3+

The second reduced form e(uations should be a function of a variable % and all 8redetermined variables" % # !)*+,G - !).+,&C - !)/+,T - !)0+,!A)6*+ - !)2+,R)6*+ - !)3+

%S &''&(&'')

A $uide to !"ie#s

&9

Gerform t*e second sta e of t*e &SDS met*od usin !"ie#s. !stimation results from t*e first sta e of t*e &SDS met*od s*ould be substituted in s0stem eHuations ?)@ and ?;@ . !"ie#s estimation out-ut tables are iven bello#. ,:t E ' U 4WDt U &,:t J4 U 4t It E ) U ;Wt U Crt74 U &t

%S &''&(&'')

A $uide to !"ie#s

&8

!stimate &SDS re ression usin !"ie#s /SDS met*od. !"ie#s can estimate bot* sta es of t*e &SDS met*od simultaneousl0. Kou *ave onl0 to s-ecif0 0our de-endent variable2 inde-endent variables and t*e list of instruments. In order to estimate ,:2 follo#in t*e eHuation ?&@ s*ould result in+

Dariable %D !A)6*+ !

!oefficient 1.00*3/5725*4/ 1.201/1457*/00 6.0.5/1*0/7/5*

Std. Error 1.*2/4/7/332*7 1.*3.77754*412 /0.71./.407.0

t6Statistic ..45155//5/0* /./*054..74./ 61.51422.4/4445

Prob. 1.1155*/0//*5433 1.11.20.043.4434 1.040027507..5

!vie#s &SDS estimation of I is analo to t*e above eA-lained. In t*e eHuation #indo# 0ou s*ould enter variables accordin to t*e eHuation ?;@ ? I K r ?74@ , @ #*ile instrument list s*ould remain t*e same. If 0ou *ave done t*is correctl0 0ou3ll et t*e follo#in result+
Dariable % R)6*+ ! !oefficient 1.*3/47*5*3*25 62.3./02.4.//5 //.710441/537 Std. Error 1.1177.37.57407* /.*17.422/154 0*.*0//*4/0/2 t6Statistic *3.2174*.*/77 6*.41427734./5 1.4.01355*31.* Prob. 2.573**202307e6*3 1.14*.3045/*020 1.0*34325/7.10

,om-are t*e :DS estimates2 :DS t#o sta e results and !"ie#s /SDS. Bor bot* endo enous variables #*ic* a--ear on t*e left side of stoc*astic eHuations '23-total personal consumption in year t and 4-total gross private domestic investment in year t( #e a--lied t*ree estimation met*ods+ :DS2 /SDS :DS and !"ie#s &SDS. In order to com-are t*ese results #e -lace all of t*em in one !"ie#s #indo# ?look t*e fi ure bello#@. :n t*e left side are result for variable ,: and on t*e ri *t side are results for variable I.

%S &''&(&'')

A $uide to !"ie#s

&5

,om-arison summar0+ ,oefficient estimated usin /SDS :DS and !"ie#s &SDS met*ods are identical ,oefficient estimated usin :DS met*od are lar er t*an t*ose from /SDS :DS and !"ie#s &SDS met*ods. /*is confirms *0-ot*esis t*at :DS encounters bias ?simultaneit0 bias@ Standard errors in t*e !"ie#s &SDS met*od are smaller t*an t*ose from /SDS :DS met*od. /*e reason for t*is is t*at t*e second sta e of t*e :DS i nores runnin of t*e first one. Accordin to t*e A.H Studenmund ?NUsin !conometrics2 Addison %esle0 Don man2 -.;84@ to et accurate estimated standard errors and t7scores t*e estimation s*ould be done on a com-lete &SDS -ro ram.

%S &''&(&'')

You might also like