Question: This exercise will get you started in SAS by writing a simple program. Open SAS with a blank (new) editor window. Turn in a Word

 This exercise will get you started in SAS by writing a

This exercise will get you started in SAS by writing a simple program. Open SAS with a blank (new) editor window. Turn in a Word document of your SAS program/code. Make sure you include answers to all italicized questions. 1. Consider the following dataset on 6 students. 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 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. This exercise will get you started in SAS by writing a simple program. Open SAS with a blank (new) editor window. Turn in a Word document of your SAS program/code. Make sure you include answers to all italicized questions. 1. Consider the following dataset on 6 students. 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 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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!