options ps=54 ls=80; goptions reset=all dev=pdf gsfname=output gsfmode=replace; title 'RPD - Example 11.4,11.7 -- Menhaden Fish Catch'; data one; input year 1-4 catch 9-14 vessels 23-25 pressure 39-44; year=year-1900; cards; 1964 409.4 76 282.9 1965 463.1 82 335.6 1966 359.1 80 381.3 1967 317.3 76 404.7 1968 373.5 69 382.3 1969 523.7 72 411.0 1970 548.1 73 400.0 1971 728.2 82 472.9 1972 501.7 75 447.5 1973 486.1 65 426.2 1974 578.6 71 485.5 1975 542.6 78 536.9 1976 561.2 81 575.9 1977 447.1 80 532.7 1978 820.0 80 574.3 1979 777.9 77 533.9 ; run; proc reg; model catch = year; output out=two student=student; filename output 'rpd11_4sas.pdf'; symbol1 c=black l=1 i=join v=dot; proc gplot; plot student*year / vref=0; run; data three; set two; lagstudent=lag(student); run; filename output 'rpd11_7sas.pdf'; symbol1 v=dot i=none; proc gplot; plot student*lagstudent / vref=0 href=0; run; proc reg data=one; model catch = vessels; output out=foury r=e; run; proc reg data=one; model pressure = vessels; output out=fourx r=u; run; data four; merge fourx foury; run; filename output 'rpd11_9sas.pdf'; symbol1 v=dot i=none; proc gplot; plot e*u / vref=0 href=0; run; quit;