Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started