This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Res Ec 797A: Forecasting Order Of Topics And Readings For Lecture 20 (November 14, 2011) Source Pageg s) Top'c Material Distributed Last Class But Not Covered Enders 182, 211,212 BM 90
BM 91
GHJ 706 BM single, unnumbered SAS PROC REG
and
PROC ARIMA
(two pages of estimation) Augmented DF equations: 4.23, 4.24, and 4.25 (p. 182);
(Compare to equations 4.20, 4.21, and 4.22 on p. 181)
Augmented explanation given on pages 211212.
(Distributed last class) Testing For A Unit Root In Three Simple Unaugmented
Situations On any regression output, the calculated tvalue uses a value
of zero for the population regression coefficient under H0 true. Table 21.11: Quarterly data on nondurable consumption: “C”
(Distributed last class) Write the “C” series in terms of Equation 4.25 Start out easy: Use PROC REG on an ADF model. Get coefficients
and estimated residuals. Are the estimated residuals white noise?
Use the Ljung Box Q—statistic in PROC ARIMA. Material For Today’s Class SAS The ARIMA Procedure Condensed SAS documentation on PROC ARIMA (two pages) SAS % DFTEST
User’s (Pages 951952)
Guide BM single, unnumbered SAS %DFTEST runs
output (two BM pages) (Distributed in class) SAS Macro to do DickeyFuller tests on any of our models,
represented by Equations 4.20, 4.21, 4.22, 4.23, 4.24, and 4.25. (Pay attention to the “TREND” option on page 952).
(Distributed in class) I relate the “TREND” option to Equations 4.20, 4.21, and 4.22. Using the %DFI‘EST Macro to do unit root tests. Compare the
estimation results with PROC REG results above Source Page! 5) Topic Assignment Your two related variables: Testing for unit roots for each
8 (Due November 23, 2011)
SAS (three BM pages) %DFI‘EST program setup in SAS to do six different models
output (All six are different specifications than the two presented last class). .Relevant output: tau pvalues are circled on pages 2 and 3.
.Compare circled items with the unit root tests that we initially do on a series when we use the Time Series
Forecasting System in ETS. (ETS results are presented below). SAS (five pages) Solutions/Analysis/Time Series Forecasting System:
ETS . Apply to the Nondurable Consumption (C) series.
output . Pay attention to the unit root tests initially performed on C. What do the test results mean? Do they suggest a model?
. Sequentially click on the different bars. Notice that they
provide the same results as the %DFI‘EST Macro directly above.
. Conclusion: Unit root test results performed on a variable
in ETS are based on a model — either Enders’equation 4.2.1
or 4.2.4. That is, tests are based on a model that transforms
the original variable, uses an intercept, and uses any number
of deterministic regressors. So, much is done for you. But none of
these considers incorporating deterministic trend. To accommodate
deterministic trend, one must construct a custom model in ETS. BM (two pages) ETS instructions for developing a custom model:
. Bernie’s C series again
. All steps are presented to guide you in Assignment 8.
When a custom model is fit, DF pvalues are reported only for the
residuals of the estimated model. To get the correct DF pvalue on the
lagged coefficient in a custom model, one must use %DFTEST. We may not cover this set of instructions because it gives the
same results as ordinary least squares. Instead, we will move directly
to a paper by Elder and Kennedy that presents a strategy for testing for a unit root. Please read their paper and the BM pages below
for next class. Elder and Testing for Unit Roots: What Should Students Be Taught?
Kennedy paper (Distributed in class). (Please read this paper before next class). DFTEsT Macva 5A5 Users (:1th
page ’52. TREND =0 \ I'lz Spgd‘hc‘b 1k: decree. 0* Jefcvminkl'h
Tvcnﬁ 'mc‘mled in ‘I’kc mold TREND: 0:
inch)“ ho ddcrmmls‘hc 1'0““ and
(159:9:5 ‘I’hc Series has a 0 mean.
u c 47.0
o '5( ) Ay+ 3714+?) TREND1L:
mdwks an id'ercepf fen...  {mold ‘5 L4,:1I) Ayf: a04 37H" «5+
TRENP= 2'
Specific, am mhvacpf and a “new
1’st frond farm.
_. medal is (4.213181): «Ody mhe" *data df; infile 'a:\table21.1.1'; Us'w‘ 0] AF‘tegf macro in
input year 01 02 03 c4; 3 0 "proc print data=df; . k i,
run; do UVH“, V00 +65 5
data df1; set df; drop c1~c4; c=c1; output; c=c2; output; c=c3; output; c=c4; output; run; data df1; set df1; time=0+_n_; drop year; *proc print data = df1; run; data df2; ‘ .hmc Cd‘ 1)
set df1; Cd: {r (£0731th ) C I ' ‘
Chum); on additional
cd=dif(c); . . .
cd1=1ag1 (cd) ; Adamant;
Y€5V¢5$°r %dftest (df2,c,ar=1,outstat=results,trend=2 );
proc print data=results; %dftest (df2,c,ar=4,outstat=results1,trend=2 );
proc print data=results1; World 35: Cd _ *( oonsi‘aﬂ') CLTime’ ad“).
I 6M7.
(0H3 \=\a _
3 (AH ) {ou rtam :m‘
Ad" Minis" '14 {caressﬂs " % dHcs’t (M2,, 6, (xv.1, 0015141: YCSUH'S , ‘Yvendzz ) Obs _TYPE_ _STATUS_ _DEPVAR_ _NAME_ _MSE_ Intercept AR_V time
1 OLS 0 Converged AR_V 569.689 181.58 1 0.7786
2 COV 0 Converged AR_V Intercept 569.689 3793.92 . 15.6288
3 COV 0 Converged AR_V time 569.689 15.63 . 0.0691
4 COV 0 Converged AR_V DLAG_V 569.689 1.75 . 0.0073
5 COV 0 Converged AR_V AR_V1 569.689 0.64 . 0.0026 Obs DLAG_V AR_V1 _NOBS_ _TAU_ _TREND_ _DLAG_ _PVALUE_ 1 0.08214 0.14643 134 2.89020 2 1 0.16901
2 1.74642 0.63519 134 2.89020 2 1 0.16901
3 0.00732 0.00261 134 2.89020 2 1 0.16901
4 0.00081 0.00031 134 2.89020 2 1 0.16901
5 0.00031 0.00715 134 2.89020 2 1 0.16901 0 d";  1 ‘\' ‘
C) Ci Jhﬂ£§t ( 2"'l C5 (”V"‘*’J‘YQESU\‘ES ’ ‘1='\ck  :1.) Obs _TYPE_ _STATUS_ _DEPVAR_ _NAME_ _MSE_ Intercept AR_V time DLAG_V
1 OLS 0 Converged AR_V 561.851 _129;ﬁz_ 1 _Jlggggi £t£§§2§
2 COV 0 Converged AR_V Intercept 561.851 4486.84 . 18.8735 2.08461
3 ‘ COV 0 Converged AR_V time 561.851 18.87 . 0.0846 0.00890
4 COV 0 Converged AR_V DLAG_V 561.851 2.08 . 0.0089 0.00097
5 COV 0 Converged AR_V AR_V1 561.851 0.53 . 0.0024 0.00026
6 COV 0 Converged AR_V AR_V2 561.851 0.70 . 0.0028 0.00034
7 COV 0 Converged AR_V AR_V3 561.851 0.71 . 0.0026 0.00034
8 COV 0 Converged AR_V AR_V4 561.851 1.14 . 0.0044 0.00054 Obs AR_V1 AR_V2 AR_V3 AR_V4 _NOBS_ _TAU_ _TREND_ _DLAG_ _PVALUE_ 1  0.13139 0.06573 0.19642 0.01892 131 l2.76481 2 1
2 ' 0.52379 0.70403 0.70615 1.13562 131 2.76481 2 1 0.21  3 0.00239 0.00233 0.00264 0.00445 131 2.76481 2 1 0.21299
4 0.00026 0.00034 0.00034 0.00054 131 2.76481 2 1 0.21299
5 0.00762 0 00070 0.00013 0 00103 131 2.76481 2 1 0 21299
6 0 00070 0.00740 0.00060 0.00020 131 2.76481 2 1 0.21299
7 0.00018 0.00060 0.00761 0.00030 131 2.76481 2 1 0 21299
3 0 00103 0.00020 o.00030 0.00791 131 2.76481 2 1 0.21299 University of Massachusetts
Department of Resource Economics RESEC 797A Fall 20]]
Assignment 8 UNIT ROOTS Test for the possibility of a unit root in each of your two related variables with an augmented
DickeyFuller test on each series. Use the SAS® code provided to you in previous handouts as a
starting point. Follow the testing strategies that we will discuss in class, as outlined in the paper by Elder and Kennedy. A reasonable procedure is to start with a general model and simplify. A practical problem is how
many lags to include in your augmented model. You may want to start with three lags for annual
data, 12 for quarterly data, and 36 for monthly data and pare down the lag length based on the
size of the test statistic(s) presented below. There is a different strategy for paring down depending on whether the variable is nonseasonal
or seasonal. Regarding the strategy for paring down the lag length of a nonseasonal variable, the tstatistic
on the last lag to be omitted should be insigniﬁcant, and the residuals from the ADF regression
should be white noise (as evidenced by their Q statistic). Using seasonal data, the process is a bit different. With quarterly data, you could start with three
years of lags (p = 12). If the tstatistic on lag 12 is insigniﬁcant (at 5 percent, for example) and if
the F—statistic indicates that lags 912 are also insigniﬁcant, move to lags 18. Repeat the process
for lag 8 and lags 58 until a reasonable lag length has been determined. A similar process is
followed for monthly data. I trust that everyone knows how to set up the appropriate Ftest. (It is also known as the Chow
test). If you do not know how set up the F test, see me immediately, and I’ll show you. Be sure to do a white noise test on the residuals each time you confnm that a lag or set of lags
should be eliminated according to the tests suggested above. By the way, all of this is presented in the second edition of Enders on page 192. Be aware that tstatistics for yearly lags may be insigniﬁcant due to collinearity. Thus, it may be
that you eliminate all of your ADF regressors except one if all are highly collinear. For seasonal
variables, you run into the same problem, but the Ftest performed on groups will prove valuable.
I don’t want you to get embroiled in this issue. Instead, pay attention to the residuals being white
1101se. Explain and comment on your ﬁndings. Are these results consistent with your earlier ﬁndings
about stationarity using the ARIMA modeling approach? Comment (brieﬂy).  data ﬂf; 2 izzfile 'a:\table21.11'; 070 DFTESY Macvo
‘ t 1 2 3 4; . ' .
i253; éiiztcda:a=:f;c . Six di‘HCVe'd‘ adjmﬁﬂiea $F¢{' Cd‘l‘dn5
run; data an; . R», «ﬁcnﬁou 1'0 Tau P~Va\v<s cirokd set df; drop 0104; 0'“ “eff N9 Punt; '
c=c1; output; c=c2; output; 0:03; output; c=c4; output; run; data df1; set df1;
time=0+_n_;
drop year;
*proc print data = df1;
run; data df2; set df1;
cl=lag(c);
cd=dif(c);
cdl=lag1(cd); 9sdftest (df2,c,ar=0,outstat=results,trend=1 ); Cd 3 s (Quhgofﬁ‘JA’dd’ﬁV‘midlﬁf‘“
proc print data=resu1ts; t‘OWIGyﬁ5) %dftest (df2,c,ar=1,outstat=resu1ts1,trend=1 );
proc print data=resu1ts1; %dftest (df2,C,aP=2,outstat=resultsz,trend=1 );
proc print data=resu1t32; %dftest (df2,c,ar=3,outstat=resu1tsa,trend=1 );
proc print data=resu1t33; %dftest (df2,c,ar=4,outstat=results4,trend=1 );
proc print data=results43run; %dftest (df2,c,ar=5,outstat=resu1t85,trend=1 );
proc print data=resu1tss; run; ‘ Sec ‘7. 957. of
SAS/E‘S US$35 GWEN
Vevs'wm [9, 2nd EdXﬁon COMPQN; Un'ﬂ’ V001, Ted ResuHs .. c'urded on nexlr.
*Wo 87‘1"}5‘5 " \N'x’rh Windows: Sahﬁansl Ana\7515/ TMCSem: 1 n _
E 0 t _ P
T E e 0 _ T _ V
¥ A p N r L N _ R0 A
Y T v A 0 cA A 0 ,T E L
OP 0 A M 8 9R G B A N U
DE 8 R E E p_ _ S U 0 E s _ _ _ tV V 1 OLS 0 Converged AR_V 611.333 7.598 1 0.000055 135 —.0092992 1 2 COV 0 Converged AR_ Intercept 611.333 276.052 . 0.097590 135 —.0092992 1
3 COV 0 Converged AR_V DLAG_V 0.95543 ' 0.95543
611.333 ~0.098 . 0.000035 135 .0092992 1 1 0.95543 I
_ _ n
S D t _
_ T E_ e D _ T_
T A PN _ r L 'A N _ RD
Y T V A M C A A R 0 T E L
OP 0 AM 3 eR G _ B A NA
bE 3 HE E p_ _ v s 0 DG
5. _ __ ’_ tV v 1 1 OLS 0 Converged AR_V
2 COV 0 Converged AR_V
3 COV 0 Converged AR_
4 COV 0 Converged AR_. 603.468 5.585 1 0.000261 0.11703 134 0.044033 1 1 0.96018
Intercept 603.468 276.817 . 0.097883 0.04778 134 0.044033 1 1 0.96018 603.468 0.098 0.000035 0.00004 134 0.044033 1 1 0.9601E
603.468 0.048 . 0.000037 0.00747 134 0.044033 1 1 0.9601 Obs _TYP E_ _STATUS‘_ _DEPVAR_ _NAME_ _MSE_ Intercept AR_V DLAG_V
1 OLS 0 Converged AR_V _ 609.874 7.254 ~1 0.00039
2 COV 0 Converged AR_V Intercept 609 . 874 284.261 . 0 . 10064
3 COV 0 Converged AR_V DLAG_V 609.874 0.101 . 0.00004
4 COV 0 Converged AR_V AR_y1 609.874 0.063 . 0.00004
5 00v 0 Converged AR_V AR_V2 609 . 874 0 .069 . 0 . 00004
Obs AR_V1 AR_V2 _NOBS_ _TAU_ _TREND_ _DLAG_ _PVALUE_
1 0.12129 0.032110 133 0.064813 1 1 0.94997
2 0.06260 0.068953 133 0 .064813 1 1 0 .94997
3 0 . 00004 0 .000044 133 0 .064813 1 1 0 .94997
4 0.00777 0}000841 133 0.064813 1 1 0.94997
5 0.00084 0.007714 133 0.064813 1 1 Obs _TYPE_ 1 OLS
2 COV
3 cov
4 cov
5 cov
6 cov
Obs AR_V1 1 0.10878
2 0.04882
3 0 00003
4 0.00747
5 0.00085
6 0 00015 Obs 4TYPE_
OLS 0
cov 0
00v 0
00v 0
cov 0
00v 0
00v 0 umonoMt Obs AR_v2 0.039206
0.076063
.0.000044
0.000823
0.007677
0.000727
0.000056 Nam#(DNA dOOOOO HSTATUS_ Converged
Converged
Converged
Converged
Converged
Converged A8y2 0.041171
0.080170
0.000045
—0.000846
0.007596
0.000683 STATUS_ Converged
Converged
Converged
Converged
Converged
Converged
Converged An_v3 0.17168
0.12301
0.00006
0.00027
0.00073
0.00791
0.00046 _DEPVAR_ _NAME_ _ _ Intercept AR_V DLAG v
AR_V 585.102 13.444 1 0.002933
AR_V Intercept 585.102 278.080 0 098645
AR_V DLAG_V 585 102 0 099 0.000036
AR_V AR_V1 585 102 0.049 0.000035
AR_V AR_V2 585 102 0.080 0 000045
AR_V AR_v3 585.102 0.103 0.000057
AR_V3 _NOBS_ _IAU_ _TREND_ _DLAG_ _PVALUE_
0.16090 132 0 49091 1 1 0.88832
0.10255 132 '0.49091 1 1 0.88832
0.00006 132 0.49091 1 1 0.88832
0.00015 132 0.49091 1 1 0.88832
0.00068 132 0.49091 1 1 0.88832
0.00765 132 0 49091 1 1 0 88832
_DEPVAR_ _NAME_ MSE_ Intercept AR_V DLAG_V AR_V1
AR_v 590.740 13.588 1 0.00279 0.10947
AR_V Intercept 590.740 288.406 o.10253 0.00533
AR_V 0LA6_v 590.740 0.103 0.00004 0.00001
AR_v AR_y1 590.740 0.005 0.00001 0.00794
AR_V AR_y2 590.740 0.076 0.00004 0.00082
AR_V An_v3 590.740 0.123 0.00006 0.00027
AR_v AR_v4 590.740 0.150 0.00007 0.01121
AR_y4 _NOBS_ _TAU_ _TREND DLAG_ _PVALUE_
0.06061 131 0.45793 1 1 0.89452
0.15003 131 0.45793 1 1 0.89452
0.00007 131 0.45793 1 1 0 89452
0.00121 131 0.45793 1 1 0.89452
0.00006 131 0.45793 1 1 0.89452
0.00046 131 0.45793 1 1 0.89452
0.00807 131 0.45793 1 1 0.89452 Windows ' Soiu‘i'icms / Am\75;5 I Time Sarita
(COMPOY’C YCSU‘if) 0n ‘FO“OWI'VI9 Yaqgs wﬁh
DLdYv‘ies‘i' comyu’fev 7“,)“. ms ) C White Noise Tests  Unit Root Tests i . i .01 .001
Signiﬁcance Probabilities Signiﬁcance Probabilities White Noise Tests Unit Root Tests 1 . 1 .01 .001
Signiﬁcance Probabilities Signiﬁcance Probabilities onbab\\\t\/ \1q\u€g
La.) 9,: 0.00m
Recommenlaﬂow {0r Curran? View E Lhuwj —BOX CH Siuavc 510M511” ( L05 9) S‘gvﬁgicqnca Probabﬂi‘b’Z 0.00m
‘ Condushn : {0,05 significance.)
Ty", quﬁocovvdaﬁavys 0% ‘435 5. “ma“
3 Covﬁaim' values: ch‘n awc
~5‘3¢3wifim’£\1 diHercn’I {ram zem. White Noise Tests Unit Root Tests Signiﬁcance Probabilities Signiﬁcance Probabilities 333“}{icancc Vrobabﬂi‘b' 10.955‘S
CancWﬁon : (0.05 shylﬁaamc)
366:5 may be honS‘akCOnavy. RCLWNChAaﬁon '.
DKﬁcume series 0" wukd ’fvan . Solutions/Analysisl'l‘ime Series Forecasting System
Example and Directions I want to run an augmented DickeyFuller model using the nondurable consumption data found in Table 21.11 on page 706 of Learning and Practicing Econometrics by Griffiths,
Hill, and Judge. I develop a model with four deterministic regressors, an intercept, and a time trend. I do
this to demonstrate that estimation results using the Windows environment are the same
as when I the %DFTEST SAS macro. I begin by developing all of the necessary variables within a separate SAS program. The
variables are all defined in terms of nondurable consumption, which I label (0). My
regression will be cd = f(intercept, c1, time, cdll, cdlZ, cdl3, and cdl4). These are the
same variable names used in previous SAS programs. Output indicates that usable
observations are numbers 6 through 136. This amounts to 131 observations. 1. After running the program, I get into the Solutions/Analysis/Time Series Forecasting
System. 2. In the Time Series Forecasting dialog box, I click “Browse...”. 3. In the Data Set Selection dialog box, I click the “Work” library. Then I click the
appropiate SAS data set. Mine is DF2. So, I click DF2. Notice that once I click DF2,
my TIME ID variable, which I named TIME in my original program, pops up. 4. I click OK. I am now in the Time Series Forecasting dialog box. I click Develop
Models. I see a list of all the time series variables that I developed in my original SAS
program. These are all of the variables that are in file DF2. Notice that everything is
there to do my augmented DickeyFuller run. 5. I go to the long, white, blank rectangular box to the right of the label “Variable2” at the
top of the screen. In this blank box, I insert the variable name for my dependent
variable. My dependent variable is cd. I click cd in the white “Time Series Variables”
box. It then appears in the white box to the right of “Variable:”. I then click Ok. 6. I am now in the Develop Models dialog box. I should be concerned about my “Fit
Range” and my “Evaluation Range.” However, since I simply want to compare my
eventual clickand—shoot model results with my previous %DFTEST macro results, I
am ignoring this important issue here. 7. I click “No models” "within the Develop Models dialog box. Upon doing so, I am faced with a number of options. My choice is “Fit Custom Model...” I click on this option after it is highlighted. I am now in the Custom Model Speciﬁcation dialog box. Oh Boy!! Here we go!! 9. I notice that my dependent variable is specified at the top and to the right of “Series:”.
I notice that “Intercept” is checked. Unfortunately, the “Predictors” box is blank. I
remedy this by clicking “Add ...” at the bottom. Then I click “Regressors. . .”. Upon
doing so, all of my choices appear before my eyes. 00 10. I click my first regressor variable (cl). After it is highlighted, I click Ok. When I see it
show up in the “Predictors” box, which means that it is there for use as a predictor
variable, I click “Add. . to add the next predictor variable. I click “Regressors” and
repeat the process individually for cdll, cd12, cdl3, and cdl4. (In summary, the process
is “Add,” “Regressors,” highlight the selected regressor, and “0k.” 11. One item is missing in my list of predictors — Time. I click “Add...” Next I highlight
and click “Linear Trend”. At the top of my Custom Model Specification dialog box, I
see my model specified to the right of “Model:”. It looks fine to me. So I click 0k in
the lower left hand comer. 12. I am now in the “Regressor Time Range Warning” dialog box. This happens because I
lose observations at the beginning due to lagging, and I am only interested in the
mechanics of model development. SAS is kind enough to warn me and to let me know
that my estimation range is being amended. Now, having read this I click 0k. 13. I see my model in simple arithmetic form in the Develop Models dialog box. I also see
the RMSE. I compare this value with my PROC REG Root MSE. Darn! A bit off!
Why? I go to the tool bar at the top and click “View”. Then I click “Parameter
Estimates.” I read what “Regressor Warnings” has to say, and I click 0k. 14. Noticing that several things are ﬂying before my eyes, I’m eventually in the Model
Viewer dialog box. My eyes peruse the numbers. They correspond with the results of
PROC REG and %DFI‘EST. 15. Again I click “View” and look at the results of my Prediction Error Tests. I see that my
estimated residuals do not fail the white noise tests. I also reject the null hypothesis
that my estimated residuals have a unit root. My residuals test to be stationary. This is
good. 16. Unfortunately, I do not have a DickeyFuller test result for my coefficient on cl. C:\Bemie\797\augmented df eg.doc ...
View
Full Document
 Fall '11
 BernardMorzuch

Click to edit the document details