SAS 4: Graphing Prevalence
We are going to work on how to graph annual prevalence rates for the purposes of evaluating and comparing different countries trends. We are going to use the datelines function to input some data from a variety of different sources. This data is fictitious, but at the end of this assignment, you will be asked to collect and aggregate your own data on a disease of your choosing.
DATA HIVDATA ;
   INPUT Country $ Year $ HIVPrev ;
DATALINES ;
   USA XXXXXXXXXX
   USA XXXXXXXXXX
   USA XXXXXXXXXX
   USA XXXXXXXXXX
   Nigeria XXXXXXXXXX
   Nigeria XXXXXXXXXX
   Nigeria XXXXXXXXXX
   Nigeria XXXXXXXXXX
RUN ;
Then we are going to craft a line graph to look at all the trends across the different years between these two countries.
PROC SORT
   DATA=WORK.HIVDATA(KEEP=Year HIVPrev Country)
   OUT=WORK.SORTTempTableSorted
   ;
   BY Year;
RUN;
SYMBOL1
   INTERPOL=JOIN
   HEIGHT=10pt
   VALUE=NONE
   LINE=1
   WIDTH=2
Â
   CV = _STYLE_
;
SYMBOL2
   INTERPOL=JOIN
   HEIGHT=10pt
   VALUE=NONE
   LINE=1
   WIDTH=2
Â
   CV = _STYLE_
;
Legend1
   FRAME
   ;
Axis1
   STYLE=1
   WIDTH=1
   MINOR=NONE
Â
;
Axis2
   STYLE=1
   WIDTH=1
   MINOR=NONE
Â
Â
;
TITLE;
TITLE1 "HIV Prevalence per 100,000 Population as reported by WHO, XXXXXXXXXX";
FOOTNOTE;
FOOTNOTE1 "APA Reference Should go Here";
PROC GPLOT DATA = WORK.SORTTempTableSorted
;
PLOT HIVPrev * Year    =Country
Â
    VAXIS=AXIS1
Â
   HAXIS=AXIS2
Â
FRAMEÂ Â Â LEGEND=LEGEND1
;
RUN;
1. Screen shot your results and input them into a word document.
2. You are going to select a disease. Using the data lines you are going to input some type of geographic variable (Country, Zip code, or State). You are going to have three columns of information Geography, Year, Incidence or Prevalence rate.
Your title should accurately reflect what your graph represents. In footnote1 you will need to include in APA all the references that you used to make the table.