Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Manga Guide To Databases

Authors: Mana Takahashi, Shoko Azuma, Co Ltd Trend

1st Edition

1593271905, 978-1593271909

More Books

Students also viewed these Databases questions

Question

Define and state the purpose of FICA taxes.

Answered: 1 week ago

Question

Why has Negotiating Women, Inc. focused its attention on women?

Answered: 1 week ago