/* Homework 3 1. Work problem 24 page 106. For the series Yt = 1.2 Y-.36 Ye , the autocovariances have the form Gamma(h) = (A+Bh)*(.6)**h. Also our notes on page 31 show weights Y(t) = Sum j=0 to infinity of (1+j)(.6)e(t-j) for this series. Find the smallest M for which (1+X)*(.6)**X 0. Make a quick check by running this program after changing M: */ data a; M= 0.001; x=0; fx=1; bound=M; output; do x=0.2 to 5 by .2; fx=(1+x)*0.6**x; bound = M*0.8**x; output; end; proc gplot; plot fx*x bound*x/overlay; symbol1 v=dot i=join c=red; symbol2 v=none i=join c=green; run; /* 2. Work problem 4 page 102. Also run this SAS program and explain why it is of interest in the context of this problem. */ data a; do a = -3 to 3 by .1; do B = -3 to 3 by .1; rho = (A+A*B)/(1+A*A+B*B); output; end; end; proc g3d; plot A*B=rho; plot a*b=rho/rotate=80 tilt=80; run; /* 3. Run this program and explain why the results are so different when the recursions are almost the same. Notice the handy lagging method (SAS also has a lag function). Will either series X or Y converge? If so, to what limit? */ data a; X2=0; X1=1;X=0; Y2=0; Y1=1;Y=0; output; do t=1 to 100; Y = 1.5*Y1 - 0.499*Y2; X = 1.5*X1 - 0.501*X2; output; ** lagging step***; Y2=Y1; Y1=Y; X2=X1; X1=X; end; proc print data=a(obs=10); proc gplot; plot Y*t X*t/overlay; run; do t=1 to 100; Y = 1.5*Y1 - 0.499*Y2; X = 1.5*X1 - 0.501*X2; output; Y2=Y1; Y1=Y; X2=X1; X1=X; end; proc print data=a(obs=10); proc gplot; plot Y*t X*t/overlay; run;