/* Homework 5 St 708 Spring 2000 We have talked about identifying models from their ACF and PACF functions. Here are 6 theoretical ACF-PACF pairs, the SAS code to graph each and a template to put 6 graphs to a page. (You may want to save this template code) 1. Identify the model for each of these AND give the AR and MA parameters (clearly you can't find the innovations variance from this information). 2. The inverse autocorrelation function, IACF, of an ARMA(p,q) series is defined to be the ACF of the ARMA(q,p) series you get by reversing sides with the operators. Thus, the IACF of the AR(1) series Y(t) = .8 Y(t-1) + e(t) is the ACF of the MA(1) series X(t) = e(t) - .8 e(t-1). It might help to think of the second as a "dual" model of the first. Compute the IACF of series 2. 3. For the Y(t) series number 1, compute coefficients B1 B2 B3 such that B1 Y(1) + B2 Y(2) + B3 Y(3) is the best linear predictor of Y(5) (2 step ahead predictor). This file is available as HW5.SAS in our course locker */ data left; input LAG ACF1 PACF1 ACF2 PACF2 ACF3 PACF3 ; cards; 0 1.00000 1.00000 1.00000 1.00000 1.00000 1.00000 1 0.00924 0.00924 0.90000 0.90000 -0.80000 -0.80000 2 0.04743 0.04735 0.81000 0.00000 0.64000 0.00000 3 0.05396 0.05323 0.72900 0.00000 -0.51200 0.00000 4 0.04957 0.04676 0.65610 0.00000 0.40960 0.00000 5 0.04222 0.03695 0.59049 0.00000 -0.32768 0.00000 6 0.03480 0.02752 0.53144 0.00000 0.26214 0.00000 7 0.02825 0.01972 0.47830 0.00000 -0.20972 0.00000 8 0.02277 0.01376 0.43047 0.00000 0.16777 0.00000 9 0.01828 0.00942 0.38742 0.00000 -0.13422 0.00000 10 0.01465 0.00635 0.34868 0.00000 0.10737 0.00000 11 0.01173 0.00423 0.31381 0.00000 -0.08590 0.00000 12 0.00939 0.00279 0.28243 0.00000 0.06872 0.00000 13 0.00751 0.00182 0.25419 0.00000 -0.05498 0.00000 14 0.00601 0.00118 0.22877 0.00000 0.04398 0.00000 15 0.00481 0.00076 0.20589 0.00000 -0.03518 0.00000 16 0.00385 0.00049 0.18530 0.00000 0.02815 0.00000 17 0.00308 0.00031 0.16677 0.00000 -0.02252 0.00000 18 0.00246 0.00020 0.15009 0.00000 0.01801 0.00000 19 0.00197 0.00013 0.13509 0.00000 -0.01441 0.00000 ; data right; input ACF4 PACF4 ACF5 PACF5 ACF6 PACF6 ; cards; 1.0 1.00000 1.00000 1.00000 1.00000 1.00000 -0.5 -0.50000 0.86597 0.86597 -0.60606 -0.60606 0.0 -0.33333 0.50477 -0.98010 0.12121 -0.38897 0.0 -0.25000 0.01680 0.00000 0.00000 -0.24900 0.0 -0.20000 -0.46592 0.00000 0.00000 -0.15556 0.0 -0.16667 -0.81538 0.00000 0.00000 -0.09441 0.0 -0.14286 -0.94148 0.00000 0.00000 -0.05579 0.0 -0.12500 -0.81521 0.00000 0.00000 -0.03225 0.0 -0.11111 -0.47509 0.00000 0.00000 -0.01831 0.0 -0.10000 -0.01565 0.00000 0.00000 -0.01025 0.0 -0.09091 0.43880 0.00000 0.00000 -0.00568 0.0 -0.08333 0.76775 0.00000 0.00000 -0.00311 0.0 -0.07692 0.88639 0.00000 0.00000 -0.00169 0.0 -0.07143 0.76742 0.00000 0.00000 -0.00092 0.0 -0.06667 0.44715 0.00000 0.00000 -0.00049 0.0 -0.06250 0.01458 0.00000 0.00000 -0.00026 0.0 -0.05882 -0.41326 0.00000 0.00000 -0.00014 0.0 -0.05556 -0.72290 0.00000 0.00000 -0.00007 0.0 -0.05263 -0.83452 0.00000 0.00000 -0.00004 0.0 -0.05000 -0.72244 0.00000 0.00000 -0.00002 ; data all; merge left right; proc greplay nofs; igout=work.gseg; delete _all_; ** clear out the existing graphics catalog ***; proc gplot data=all; plot (acf1--pacf6)*lag/hminor=0 vminor=0 vref=0; symbol1 v=dot h=2 i=join w=3 c=black; *** How to create and use a template of panels ***; proc greplay tc=tempcat nofs igout=work.gseg; tdef six des='Six panels' 1/ llx = 0 lly = 68 ulx = 0 uly = 99 urx = 48 ury = 99 lrx = 48 lry = 68 2/ llx = 52 lly = 68 ulx = 52 uly = 99 urx =100 ury = 99 lrx =100 lry = 68 3/ llx = 0 lly = 34 ulx = 0 uly = 65 urx = 48 ury = 65 lrx = 48 lry = 34 4/ llx = 52 lly = 34 ulx = 52 uly = 65 urx =100 ury = 65 lrx =100 lry = 34 5/ llx = 0 lly = 0 ulx = 0 uly = 32 urx = 48 ury = 32 lrx = 48 lry = 0 6/ llx = 52 lly = 0 ulx = 52 uly = 32 urx =100 ury = 32 lrx =100 lry = 0; template =six; treplay 1:gplot 2:gplot1 3:gplot2 4:gplot3 5:gplot4 6:gplot5 ; treplay 1:gplot6 2:gplot7 3:gplot8 4:gplot9 5:gplot10 6:gplot11 ; *** careful naming if you dont clear all graphs first!! ***; run ;