Essay Writer » Essay Blog » Healthcare Essays Help » SAS Assignment 1: Getting data into SAS

SAS Assignment 1: Getting data into SAS

SAS Assignment 1: Getting data into SAS

Manual input: in this first assignment you will be inputting several different data files into SAS and manipulating them. First, you will show that you are capable of copying my code directly and then you will find your own data and show that you can input the information.

Screenshot procedure: https://www.take-a-screenshot.org/

You will need to all of the code here and then print screen on all of your code and results screens and paste them into a word document for submission:

Part 1:

Almost every organization has excel. It is the defining feature in both government and non-governmental organizations. Because SAS is not accessible in this the academic version, you can now manipulate your organization’s data in very interesting and dynamic ways using SAS.

I want you to create an excel spreadsheet. In this Excel spreadsheet you will make 6 columns that include the following:

PatientIDGenderRaceethnicityAgeDeathZipCodeCauseofDeath
53618MaleAsian or Pacific Islander7093739Stroke
919573FemaleBlack or African American7493723HIV/AIDS
1822122MaleAsian or Pacific Islander5493757Suicide
1754826FemaleOther9793747Stroke
1426055MaleAmerican Indian or Alaskan Native9693718Heart Disease
612470MaleOther7693754Injury or Accident
796328MaleWhite, Non-Hispanic3893758Stroke
413670FemaleHispanic or Latino7793714Heart Disease
713042MaleBlack or African American5093706Suicide
1986752FemaleAsian or Pacific Islander10093739Injury or Accident
1014879FemaleOther5793732Heart Disease
1566577FemaleHispanic or Latino7093709Cancer
1570077MaleAsian or Pacific Islander3393729Stroke
802018FemaleAmerican Indian or Alaskan Native10193746Stroke
1403169FemaleWhite, Non-Hispanic8693754HIV/AIDS
491306MaleHispanic or Latino7193756Stroke
290641MaleOther5993739Cancer
1691948MaleAmerican Indian or Alaskan Native9893712Alzheimer’s Disease
261943FemaleHispanic or Latino8293762Suicide
1078037MaleOther5193732Injury or Accident
1687145MaleHispanic or Latino6793740Injury or Accident
715678MaleOther9593715Stroke
367647FemaleOther3693760Stroke
1828457FemaleHispanic or Latino4093704Injury or Accident
1665604MaleAsian or Pacific Islander8693752Diabetes
527835FemaleBlack or African American6693709COPD
1358203FemaleHispanic or Latino9993748Cancer
114125FemaleOther5893757Heart Disease
1646540FemaleAsian or Pacific Islander3593751Cancer
770455FemaleWhite, Non-Hispanic6993760Cancer
611127MaleBlack or African American8293708Cancer
1222037MaleAsian or Pacific Islander4593735Alzheimer’s Disease
1816314FemaleOther6393708Diabetes
1228892MaleAmerican Indian or Alaskan Native9493754Injury or Accident
491329MaleHispanic or Latino9093701Stroke

You are going to title your excel file DeathStatsFake. You will title your sheet example1.

  1. Login to SAS Studio
  2. Under Server Files and Folders Click on Files (Home)
  3. Click the Up Arrow with a half of a rectangle on top of it.
  4. When your mouse hovers over it you will see the phrase upload
  5. Find the excel file you made, and upload that file.
  6. You will now see DeathStatsFake.xlsx appear under Files (Home)
  7. Take a Screenshot to verify you have uploaded the document
  8. Double click on the DeathStatsFake.xlsx, click on code/results
  9. You will see the import code to pull it off your computer into SAS
  10. SAS should call your content WORK.IMPORT1
  11. We will be using WORK.IMPORT1 to perform the next series of tasks

Part 2: Manipulating your data

In this next part, you will be exploring your data within SAS. We will be using several procedures to verify that you can input the data codes correctly and get your own output.

  1. Click on DeathSTATSFake Tab
  2. Using your cursor, highlight the following results

PROC IMPORT DATAFILE=REFFILE

DBMS=XLSX

OUT=WORK.IMPORT1;

GETNAMES=YES;

RUN;

PROC CONTENTS DATA=WORK.IMPORT1; RUN;

Once highlighted, click the little running man

  1. Now you have loaded the data to start manipulating it.
  1. Click the Program 1 tab and enter the following code

PROC FREQ DATA=WORK.IMPORT1 order=data;

tables Gender*CauseofDeath / chisq;

run;

The results should be a table that is comparing the variable gender by cause of death. Each one of these variables is categorical therefore we want to run a chisquare or chisq to see if there is a relationship between gender and cause of death.

  1. Please take a screenshot of your frequency table and add it to a word document.
  1. To run a frequency of just one variable the following code should be applied

PROC FREQ DATA=WORK.IMPORT1 order=data;

tables Gender;

RUN;

  1. Please take a screen shot of the results from the example proc freq above and add it to the word document for this assignment
  1. The proc means procedure can be run simple enough by typing in

PROC MEANS DATA=WORK.IMPORT1;

RUN;

  1. Please take a screenshot of your proc means results.
  2. Based on your data from the chi-square distribution what can you say about the results? How does this compare to primary peer-reviewed publications on the topic? Please compose your response in 250 words and have it at the end of your word document in appropriate APA form and style.

 

Last Updated on May 11, 2019

Don`t copy text!
Scroll to Top