data rdu; do i=1 to 7; input year @; end; do mon = 1 to 12; input month $ @; do y=1 to 7; year=1994+y; input passengers @; pass=.; passengers=passengers/100000; if date <'01sep01'd then pass = passengers; date=mdy(mon,1,year); format date monyy.; output; end; end; do mon = 1 to 12; do y=8 to 9; year=1994+y; passengers = .; pass=.; month=" "; date=mdy(mon,1,year); format date monyy.; output; end; end; cards; 1995 1996 1997 1998 1999 2000 2001 January 473866 438769 444273 604342 525949 588991 769132 February 452978 495525 488746 484586 541346 723692 748445 March 496525 577078 594879 474051 676799 904590 934275 April 496668 568622 578303 619307 717688 910042 962570 May 483988 601281 597733 629110 716144 943408 936657 June 490760 572415 580874 626209 832487 960126 996445 July 501678 546671 585606 660466 877412 981588 1034162 August 530381 537172 584438 629912 823848 922491 891104 September 464065 442677 518738 569238 699273 800379 454679 October 528141 571488 615449 666858 871891 928389 624452 November 519052 521129 569094 640275 855823 907360 . December 499033 545044 566741 615831 803115 867329 . ; proc sort; by date; data RDU; set RDU; if date > '31aug01'd then X=.994**(date-'01sep01'd); else X=0; proc reg noprint; model passengers=date X; output out=outreg P=Preg; proc glm noprint; class mon; model passengers=mon date X/solution; output out=out1 predicted = p L95=L U95=U; proc print data=out1 (firstobs=80 obs=85); var p pass; run; data out1; set out1; if passengers>0 then do; L=.; U=.; end; goptions reset=all; * goptions targetdevice = pscolor; %macro arrow; SS=size; size= 2; XX=X+8; YY=Y; alpha= atan(-1*slope/AR); put @20 "Using alpha = " alpha; X=xx -r*cos(alpha+theta); Y=YY-AR*r*sin(alpha+theta); output; X=XX -r*cos(alpha-theta); Y=YY-AR*r*sin(alpha-theta); output; X=XX; Y=YY; output; size=ss; %mend; data anno; drop XX YY; Xsys="2"; YSYS="2"; theta=.4; r=120; AR=(1300000-300000)/('01jan04'd-'01jan95'd); *aspect ratio*; function = "label"; Text = " Sept. 11, 2001"; color="black"; position='5'; size=1.5; style="centB"; X='01jan99'd; Y =1200000; output; function="move"; X='01jul00'd; output; function ="draw"; X='01sep01'd; size=4; output; slope=0; %arrow; function = "label"; Text = "Actual"; color="red"; position='2'; size=1.6; style = "centB"; X='01jan97'd; Y = 900000; output; function="move"; X='01jan97'd; output; function ="draw"; Y=824000; X='01oct98'd; size=4; output; X='10may99'd ; output; slope = 0; %arrow; function = "label"; Text = "Model"; color="blue"; position='2'; size=1.6; style="centB"; X='01jan97'd; Y = 800000; output; function="move"; X='01jan97'd; output; function ="draw"; Y=724000; X='01aug97'd; size=4; output; X='01may98'd; output; %arrow; function = "label"; Text = "Prediction" ; color="green"; position='2'; size=1.6; style="centB"; X='01jan03'd; Y = 430000; output; position=5; Text= "Intervals"; output; function="move"; X='01mar00'd; output; function ="draw"; Y=3400000; X='01aug03'd; size=4; output; X='01aug04'd; output; %arrow; data anno; set anno; Y=Y/100000; proc gplot; plot Y*X; proc print data=anno; run; proc gplot annotate=anno data=out1; plot (preg p passengers L U )*date/overlay href='11sep01'd vaxis=axis1; symbol1 v=none i=join w=4 c=black; symbol2 v=dot i=join w=4 c=blue; symbol3 v=none i=join w=4 c=red; symbol4 v=none i=join w=4 c=green r=2; title "Passengers at RDU Airport"; axis1 label=(rotate=0 angle=90 font=centb height=1.5); label preg ="Passengers x 100,000"; run;