Click here to see the SAS code.
Click here to see the example.

---------------------------------------------------------------

Sometimes the built-in reflines aren't adequate or practical.

In this case, I wanted to use data-driven reflines, and I only
wanted them to go up to the data line segment.



data anno_ref; set wages end=last;  /* end=last identifies the last obsn of data set */
by unadjusted notsorted; /* this allows you to test for 1st obsn of each by-group, first.unadjusted */
if
 first.unadjusted /* 1st obsn of by-group */
 or
 last /* very last obsn of data set */
 then do;
  xsys='2'; x=date;
  function='move'; ysys='1'; y=0; output;
  function='draw'; line=33; ysys='2'; y=adjusted; color='gray55'; when='a'; output;
  end;
run;



Back to Samples Index