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:
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:
|53618||Male||Asian or Pacific Islander||70||93739||Stroke|
|919573||Female||Black or African American||74||93723||HIV/AIDS|
|1822122||Male||Asian or Pacific Islander||54||93757||Suicide|
|1426055||Male||American Indian or Alaskan Native||96||93718||Heart Disease|
|612470||Male||Other||76||93754||Injury or Accident|
|413670||Female||Hispanic or Latino||77||93714||Heart Disease|
|713042||Male||Black or African American||50||93706||Suicide|
|1986752||Female||Asian or Pacific Islander||100||93739||Injury or Accident|
|1566577||Female||Hispanic or Latino||70||93709||Cancer|
|1570077||Male||Asian or Pacific Islander||33||93729||Stroke|
|802018||Female||American Indian or Alaskan Native||101||93746||Stroke|
|491306||Male||Hispanic or Latino||71||93756||Stroke|
|1691948||Male||American Indian or Alaskan Native||98||93712||Alzheimer’s Disease|
|261943||Female||Hispanic or Latino||82||93762||Suicide|
|1078037||Male||Other||51||93732||Injury or Accident|
|1687145||Male||Hispanic or Latino||67||93740||Injury or Accident|
|1828457||Female||Hispanic or Latino||40||93704||Injury or Accident|
|1665604||Male||Asian or Pacific Islander||86||93752||Diabetes|
|527835||Female||Black or African American||66||93709||COPD|
|1358203||Female||Hispanic or Latino||99||93748||Cancer|
|1646540||Female||Asian or Pacific Islander||35||93751||Cancer|
|611127||Male||Black or African American||82||93708||Cancer|
|1222037||Male||Asian or Pacific Islander||45||93735||Alzheimer’s Disease|
|1228892||Male||American Indian or Alaskan Native||94||93754||Injury or Accident|
|491329||Male||Hispanic or Latino||90||93701||Stroke|
You are going to title your excel file DeathStatsFake. You will title your sheet example1.
- Login to SAS Studio
- Under Server Files and Folders Click on Files (Home)
- Click the Up Arrow with a half of a rectangle on top of it.
- When your mouse hovers over it you will see the phrase upload
- Find the excel file you made, and upload that file.
- You will now see DeathStatsFake.xlsx appear under Files (Home)
- Take a Screenshot to verify you have uploaded the document
- Double click on the DeathStatsFake.xlsx, click on code/results
- You will see the import code to pull it off your computer into SAS
- SAS should call your content WORK.IMPORT1
- 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.
- Click on DeathSTATSFake Tab
- Using your cursor, highlight the following results
PROC IMPORT DATAFILE=REFFILE
PROC CONTENTS DATA=WORK.IMPORT1; RUN;
Once highlighted, click the little running man
- Now you have loaded the data to start manipulating it.
- Click the Program 1 tab and enter the following code
PROC FREQ DATA=WORK.IMPORT1 order=data;
tables Gender*CauseofDeath / chisq;
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.
- Please take a screenshot of your frequency table and add it to a word document.
- To run a frequency of just one variable the following code should be applied
PROC FREQ DATA=WORK.IMPORT1 order=data;
- Please take a screen shot of the results from the example proc freq above and add it to the word document for this assignment
- The proc means procedure can be run simple enough by typing in
PROC MEANS DATA=WORK.IMPORT1;
- Please take a screenshot of your proc means results.
- 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 by EssayPro