{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# hw0 - major d Use PROC MEANS to compute summary statistics...

This preview shows page 1. Sign up to view the full content.

SAS Practice Exercise This exercise will get you started in SAS by writing a simple program. Open SAS with a blank (new) editor window. Follow the example in lesson 1 for the programming statements required. This example is similar. 1. Consider the following dataset on 6 students. Student ID Gender Major Exam 1 Exam 2 001 M BIO 80 84 002 M EPI 75 73 003 F EPI 90 86 004 M BIO 83 85 005 F EPI 94 94 006 F EPI 88 84 a. Write a SAS program that reads in the data within the program. Name the variables StudentID , Gender , Major , Exam1 , and Exam2 . StudentID, Gender, and Major are character variables; Exam1 and Exam2 are numeric variables. b. Display the values of the variables using PROC PRINT. Make sure the variables have been read in correctly. c. Use PROC FREQ to tabulate the number of men and women, and the number in each
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: major. d. Use PROC MEANS to compute summary statistics for exam 1 and exam 2. What is the average score for each exam? e. Go back into the DATA step and add one variable named final which is the average of exam1 and exam2. The line of code for this is: final = (exam1 + exam2)/2; f. Use PROC PRINT to verify the new variables were computed correctly. g. Use PROC MEANS to compute summary statistics for the final grade. h. Save your program to your computer. Give it the name exercise1. It will automatically have a .sas extension. i. Exit SAS after your have saved your program. Then enter SAS again and bring in the program that you saved....
View Full Document

{[ snackBarMessage ]}