Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

SAS 3: Inputting data manually for Odds Ratios and Relative Risk Last week, you learned how to read an excel file into SAS. There are other ways to get data into SAS. For instance, if you already have...

1 answer below »

SAS 3: Inputting data manually for Odds Ratios and Relative Risk
Last week, you learned how to read an excel file into SAS. There are other ways to get data into SAS. For instance, if you already have your 2x2 table ready and you just want SAS to calculate either your Odds Ratio or your Relative Risk, you can input the data directly into SAS using a function called datelines. Here is an example of how data lines works. Note in the code below the data is called GORDIS, and the input are delineated by the $ telling the data what each column represents
DATA gordis ;
        INPUT exposed $ disease $ patients ;
DATALINES ;
        exposed disease 50
        exposed none    50
        not_exp disease 25
        not_exp none    75
;
PROC FREQ DATA = gordis ;
  TABLES exposed*disease / RELRISK RISKDIFF;
  WEIGHT patients ;
RUN ;
1. Run the above program and screenshot the results. You will now put that into a word document as part of your submission.
2. Now look up your own example of a 2x2 table. Create your own code and screenshot the code as well as the result. You want to change the labels of the graph to reflect your own data yet. You also should change the name of the data file.

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.
Answered 2 days After Jan 12, 2022

Solution

Subhi answered on Jan 15 2022
125 Votes
ANSWER 1
DATA gordis ;
INPUT exposed $ disease $ patients ;
DATALINES ;
exposed disease 50
exposed none 50
not_exp disease 25
not_exp none 75
;
PROC FREQ DATA = gordis ;
TABLES exposed*disease / RELRISK RISKDIFF;
WEIGHT patients ;
RUN ;
    The SAS System
The FREQ Procedure
            Frequency
    Percent
    Row Pct
    Col Pct
        Table of exposed by disease
    exposed
    disease
    
    disease
    none
    Total
    exposed
        50
    25.00
    50.00
    66.67
        50
    25.00
    50.00
    40.00
        100
    50.00
    Â 
    Â 
    not_exp
        25
    12.50
    25.00
    33.33
        75
    37.50
    75.00
    60.00
        100
    50.00
    Â 
    Â 
    Total
        75
    37.50
        125
    62.50
        200
    100.00
    Statistics for Table of exposed by disease
    Column 1 Risk Estimates
    Â 
    Risk
    ASE
    (Asymptotic) 95%
Confidence Limits
    (Exact) 95%
Confidence Limits
    Row 1
    0.5000
    0.0500
    0.4020
    0.5980
    0.3983
    0.6017
    Row...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here