Assignment 5 on Introduction to Statistical Computing | STAT 321, Assignments of Statistics

Material Type: Assignment; Professor: Davenport; Class: INTRO TO STATISTICAL COMPUTING; Subject: Statistics; University: Virginia Commonwealth University; Term: Unknown 1989;

Typology: Assignments

Pre 2010

Uploaded on 02/10/2009

koofers-user-8v5
koofers-user-8v5 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
STAT 321 - Assignment 5
a. For the following problem, you are to create a data step that will read the data and create a
temporary SAS data set. Use whatever input style you desire. Use informats, formats, and labels
freely. Create a printing (using PROC PRINT) of the data set's variable values making use of titles.
Elderly persons often sustain injuries due to falls. In an attempt to understand the frequency
and diversity of the number of falls among the elderly residing in a nursing home, records were
reviewed for a period of one year. The number of falls for several patients was entered in the
(raw data) file: falls.txt (this data set is on the L-drive and can be downloaded from the Stat
321 web site). Place this data set to an appropriate directory on your computer.
Create a SAS program that will read this data using an “infile” statement into a temporary SAS
data set. In addition to printing the data, provide a horizontal bar chart of the number of falls.
You may use the default chart provided by the procedure, PROC Chart. Also, make
appropriate use of “titles” in the procedures.
b. On the L-drive or on the Stat 321 web site (under “Homework > hw05), there are two files called
“Gorman_Toman.txt” and “Gorman_Toman1.txt”. Download these two files to your pc. The
Gorman_Toman1.txt file is a simple ASCII DOS text file that presents information about the data and
the variables that are in the data set. The other file contains the data (space delimited).
1) Write a SAS program to input this data using an INFILE statement (that is, do not use the “in-
stream” input method). Also create a permanent SAS data set that contains this data set. Place
this permanent SAS data set in the SAS data set library of your choosing on your machine.
2) Attach a label (of your choosing) to each variable.
3) Use PROC PRINT to provide a printed listing of the data.
4) In addition to the usual material that your hand in, include a printed version of the SAS log
showing that the permanent SAS data set was indeed created.
5) Using a SET statement, access this permanent SAS data set and run PROC CONTENTS.
c. On the L-drive or on the Stat 321 web site (under “Homework > hw05), there is a permanent SAS
data set called “Grades_SAS_Data_Set” (the actual name of the file is grades.sas7bdat). Download
this SAS data set to your pc and place it in your SAS data library.
This data set is the data base for a distance learning class broadcast from the University of TV.
There were several remote sites that logged on and took the course, and there were varying
numbers of students at the remote sites. Also provided in the data set are the grades on four
examinations and a homework average.
1) Using a SET statement, access this permanent SAS data set and run PROC CONTENTS. Be
sure to use the “label” option in the print statement so that the labels are printed and print the
data in landscape mode (option ls =120;).
pf2

Partial preview of the text

Download Assignment 5 on Introduction to Statistical Computing | STAT 321 and more Assignments Statistics in PDF only on Docsity!

STAT 321 - Assignment 5

a. For the following problem, you are to create a data step that will read the data and create a temporary SAS data set. Use whatever input style you desire. Use informats, formats, and labels freely. Create a printing (using PROC PRINT) of the data set's variable values making use of titles.

Elderly persons often sustain injuries due to falls. In an attempt to understand the frequency and diversity of the number of falls among the elderly residing in a nursing home, records were reviewed for a period of one year. The number of falls for several patients was entered in the (raw data) file: falls.txt (this data set is on the L-drive and can be downloaded from the Stat 321 web site). Place this data set to an appropriate directory on your computer.

Create a SAS program that will read this data using an “infile” statement into a temporary SAS data set. In addition to printing the data, provide a horizontal bar chart of the number of falls. You may use the default chart provided by the procedure, PROC Chart. Also, make appropriate use of “titles” in the procedures.

b. On the L-drive or on the Stat 321 web site (under “Homework > hw05), there are two files called “Gorman_Toman.txt” and “Gorman_Toman1.txt”. Download these two files to your pc. The Gorman_Toman1.txt file is a simple ASCII DOS text file that presents information about the data and the variables that are in the data set. The other file contains the data (space delimited).

  1. Write a SAS program to input this data using an INFILE statement (that is, do not use the “in- stream” input method). Also create a permanent SAS data set that contains this data set. Place this permanent SAS data set in the SAS data set library of your choosing on your machine.
  2. Attach a label (of your choosing) to each variable.
  3. Use PROC PRINT to provide a printed listing of the data.
  4. In addition to the usual material that your hand in, include a printed version of the SAS log showing that the permanent SAS data set was indeed created.
  5. Using a SET statement, access this permanent SAS data set and run PROC CONTENTS.

c. On the L-drive or on the Stat 321 web site (under “Homework > hw05), there is a permanent SAS data set called “Grades_SAS_Data_Set” (the actual name of the file is grades.sas7bdat). Download this SAS data set to your pc and place it in your SAS data library.

This data set is the data base for a distance learning class broadcast from the University of TV. There were several remote sites that logged on and took the course, and there were varying numbers of students at the remote sites. Also provided in the data set are the grades on four examinations and a homework average.

  1. Using a SET statement, access this permanent SAS data set and run PROC CONTENTS. Be sure to use the “label” option in the print statement so that the labels are printed and print the data in landscape mode (option ls =120;).

Answer the following questions:

(a) How many students were there in this class? (b) How many distance-learning sites were taking this course?

  1. Form a subset of this SAS data set (a temporary data set) that consists of the VCU students. Print a listing of all of these students with some form of identification and the results of examination # 1. Also determine the average grade on examination # 1 for the VCU students.