Points: 12
The purpose of this exercise is to get you familiar with the SAS system in writing a fairly simple SAS program. You may want to look at the example program (shown as a Word document in the Week 1 folder) to determine the SAS code to write.
What to hand in? As a Word document, include the SAS code and any SAS output that is requested. Please cut and paste appropriate output rather than submitting your entire SAS output file. Be sure to specifically answer all questions that are in ITALICS.
1. Consider the following dataset on 10 adults.
ID Gender State Age Height Weight
001 M NE 50 68 155
002 F NE 23 60 101
003 M NE 65 72 220
004 F IA 35 65 133
005 M NE 15 71 166
006 M IA 48 69 170
007 F IA 40 61 112
008 F NE 48 65 143
009 F NE 27 63 128
010 F NE 51 66 150
Note: Age (years), height (inches), weight (pounds)
a. (3 points) Write a SAS program that reads in the data within the program and creates a SAS dataset called PATIENTS. Name the variables ID, Gender, State, Age, Height, and Weight. ID, Gender, and State are character variables; Age, Height, and Weight are numeric variables.
b. (1 point) Display the values of the variables using PROC PRINT. Verify the variables have been read in correctly. Include the output from PROC PRINT here.
c. (1 point) Use PROC FREQ to tabulate the number of men and women, and the number of patients from each state. Include the output from PROC FREQ here.
d. (3 points) Use PROC MEANS to compute summary statistics for age, height and weight. What is the mean and standard deviation for each of these variables?
e. (1 points) Go back into the DATA step and add a variable named BMI:
BMI = Body mass index formula for weight (lbs) and height (inches)
703 x weight (lbs) / [height (in)]2
The SAS code to define this variable:
bmi=(703*weight)/height**2;
f. (1 points) Add at least 2 comments in your program utilizing the 2 ways you can write comments in SAS to document what you are doing in the program.
g. (1 point) Use PROC PRINT to verify the new variable was computed correctly. Include the output from PROC PRINT here.
h. (1 point) Use PROC MEANS to compute summary statistics for the BMI. Include the output from PROC MEANS here.
Optional: To gain practice saving your programs and opening a SAS code file
i. Save your program to the PC (using the File menu to a path/folder you will remember) or to SAS OnDemand (with the Save program icon). Give it the name Intro. It will automatically have a .sas extension.
j. Exit SAS after you have saved your program. Then enter SAS again and bring in the program that you saved by selecting Open Program under the File menu (PC SAS) or selecting the program from Server Files and Folders (SAS OnDemand).
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme