Longitudinal data 3

Author: Xuanqian Xie

data bb;

    set ccc;     

    format  N r1000 5.0;

    N=r1000; output bb;

      N=r1000-se;  if N>0 then N=N; else N=0; output bb;

      N=r1000+se;  output bb;

      keep year r1000 N;


/* Set the graphics environment */  


goptions reset=all cback=white border htext=10pt htitle=12pt;   

/* Define the axis characteristics */

   axis1 offset=(5,5)label=("Year" ) minor=none;                                                                                                                 

   axis2 label=(angle=90 "N of Event / Year") minor=none ;                                                                                                             

   title ;

/* Define the symbol characteristics */

   symbol1 interpol=hiloctj color=blue line=2;                                                                                         

   symbol2 interpol=none color=blue value=dot height=1.5;


/* Plot the error bars using the HILOCTJ interpolation */                                                                               

/* and overlay symbols at the means. */                                                                                                

proc gplot data=bb; 

   format year ye.;

   plot n*year r1000*year / overlay haxis=axis1 vaxis=axis2;