Introduction to Statistical Computing and Data Management
BIOS 511

Fall 2015
CHAPTER 7. The Macro Language
a.
b.
c.
d.
e.
Introduction
Macro variables
Macros
Conditional execution, macro functions, and other topics
DATA step interface: CALL SYMPUT
1
AN INTRODUCTION TO THE SAS MACRO LANGUAGE
What is the SAS macro language?
! A tool
Introduction to Statistical Computing and Data Management
BIOS 511

Fall 2015
BIOS 511 Lab 8
You can use DATA steps or PROC steps, as appropriate, throughout this lab. Please feel free
to surround your entire code with ODS RTF and ODS RTF CLOSE or ODS PDF and ODF PDF
CLOSE statements to write the output to an RTF or PDF file instea
Introduction to Statistical Computing and Data Management
BIOS 511

Fall 2015
SOLVD
QUALITY OF LIFE FORM
r
COVER SHEET
VRF:S
B
ION
/
91
FORM: SL
INSTRUCTIONS:
This form isto
Annual Visit) and the
Quality of Life Fore.
to the clinic center.
See the SOLVD General
IDENTIFYING INFORMATION
Date of visit:
B. Last Nase:
Day
C. First H
Introduction to Statistical Computing and Data Management
BIOS 511

Fall 2015
BIOS 511 Midterm 2015
All data sets needed for the exam are available from the course sakai site in the Resources, Midterm
folder. This exam has a total of 160 points. Recall that the midterm constitutes 35% of your course
grade. Ground rules for this exa
Introduction to Statistical Computing and Data Management
BIOS 511

Fall 2015
Reading List for Chapter 8 (PROC TABULATE)
Chapter 8 of the course notes
pp. 126135, 170171, and 174175, Little SAS Book (4th edition) or
pp. 124133, 170171, and 174175, Little SAS Book (5th edition)
Chapter 18, Learning SAS by Example
Recommended b
Introduction to Statistical Computing and Data Management
BIOS 511

Fall 2015
Reading List for Chapter 9 (Reading and Writing Text Files with SAS)
Chapter 9 of the Course Notes
Chapter 2 and pages 284289, Chapter 9 and pages 118119 and 292293, Little
SAS Book 4th edition
Chapter 2 and pages 302307, Chapter 10 and pages 116117
Introduction to Statistical Computing and Data Management
BIOS 511

Fall 2015
Reading List for Module 7 (The Macro Language)
Chapter 7 of Course Notes
Chapter 7 in The Little SAS Book
READ THIS!
Chapter 25 in Learning SAS by Example
Chapter 10 in Statistical Programming in SAS
Paper SAS Macro Programming for Beginners by Slaughter
Introduction to Statistical Computing and Data Management
BIOS 511

Fall 2015
CHAPTER 9
Reading and Writing Text Files with SAS
a. Introduction to using text files with SAS
b. Reading text files with the INPUT statement; also, the INPUT function
c. Writing text files with the PUT statement; also, the PUT function
d. Customized repo
Introduction to Statistical Computing and Data Management
BIOS 511

Fall 2015
BIOS 511 Homework #9
As you complete this assignment, remember to follow the homework guidelines. Be sure
to turn in your log and output files. All needed datasets are in the course datasets zip
file. Be sure that your SAS OPTIONS statement for this assig
Introduction to Statistical Computing and Data Management
BIOS 511

Fall 2015
BIOS 511 Homework #7
As you complete this assignment, remember to follow the homework guidelines. Be sure to turn
in your log and output files. All needed datasets are in the course datasets zip file.
This homework is worth 100 points and is due in class
Introduction to Statistical Computing and Data Management
BIOS 511

Fall 2015
Homework #10  Output Sent to PDF, RTF, and HTML Destinations
Part I
Table 1
Car Origin
Median City
MPG
Asia
21
Europe
19
USA
18
All
20
Job HW10.SAS run by STUDENT'S NAME on 18NOV15 at 19:39
Homework #10  Output Sent to PDF, RTF, and HTML Destinations
Pa
Introduction to Statistical Computing and Data Management
BIOS 511

Fall 2015
BIOS 511 Homework #8
As you complete this assignment, remember to follow the homework guidelines. Be sure to turn
in your log and output files. All needed datasets are in the course datasets zip file.
This homework is worth 125 points and is due in class
Introduction to Statistical Computing and Data Management
BIOS 511

Fall 2015
I[
,
'
,SOLVD

ELIGIBILITY VISIT FORM
VERSION C / 12281987
FORM:
INSTRUCTIONS:
VERSION:
S7J7
F
F
VISIT:
This form is to be used only at Visit 1, the SOLVD Eligibility Visit.
Print clearly when entering a response in the appropriate boxes. For multiple
Introduction to Statistical Computing and Data Management
BIOS 511

Fall 2015
f~,
w i:
SOLVD
I~
BASELINE VISIT FORM
~
VERSION C / 12281987
FORM:
INSTRUCTIONS:
(screen 1 of 12 )
VISIT:
1
(SBF page 1 of 7 )
OPTIONAL DATA FOR LOCAL CLINIC USE ONLY
A. IDENTIFYING INFORMATION
Today's Date:
VERSION:
This form is to be used only at Visi
Introduction to Statistical Computing and Data Management
BIOS 511

Fall 2015
CHAPTER 9
Reading and Writing Text Files with SAS
a. Introduction to using text files with SAS
b. Reading text files with the INPUT statement; also, the INPUT function
c. Writing text files with the PUT statement; also, the PUT function
d. Customized repo
Introduction to Statistical Computing and Data Management
BIOS 511

Fall 2015
Chapter 8
PROC TABULATE
Introduction and syntax
Constructing basic tables
Improving table appearance
More complex tables and percentages, including use of indicator
variables and dummy variables
Miscellaneous topics
o
Controlling the order of formatted CL
Introduction to Statistical Computing and Data Management
BIOS 511

Fall 2015
Chapter 6: Combining and Managing SAS Datasets
Handling multiple input datasets with the SET and MERGE
statements
SAS special variables
Transposing and aggregating datasets
Reshaping SAS datasets
Data library management
1
Multiple Input Datasets
Dat
Introduction to Statistical Computing and Data Management
BIOS 511

Fall 2015
Table with no STYLE= attributes
DEPT
FURS
COST
COST
N
Sum
SHOES
PRICE COST
Sum
N
COST
All
PRICE COST
Sum
Sum
PRICE
Sum
N
COST
Sum
CLERK
AGILE
2
392.00 1290.00
11
390.08
814.60
13
782.08 2104.60
BURLEY
4
830.02 2599.90
5
163.04
314.85
9
993.06 2914.75
CLEV
Introduction to Statistical Computing and Data Management
BIOS 511

Fall 2015
Grading Criteria for BIOS 511 Term Project
Program correctness
o Are variables and data sets created correctly? Is logic applied
correctly throughout the program?
o Do tables and graphs display the information that they are meant to
show according to the
Introduction to Statistical Computing and Data Management
BIOS 511

Fall 2015
BIOS 511 Final Project
Instructions for an Analysis of Your Own Data
If you are using your own data, email me a brief analysis proposal by Wednesday, November
18. I will return any comments to you some time the following day, so you can get started
quickl
Introduction to Statistical Computing and Data Management
BIOS 511

Fall 2015
BIOS 511 Final Project, 2015
Instructions for an Analysis of Instructor Provided Data
A. INTRODUCTION
Heart failure, also known as congestive heart failure or CHF, simply means that your
heart cant pump enough blood to meet your bodys needs. Symptoms can
Introduction to Statistical Computing and Data Management
BIOS 511

Fall 2015
BIOS 511 Final Project General Instructions
The BIOS 511 final project involves applying the methods covered in BIOS 511 to a real
research problem and preparing a paper describing your work.
You can use the data and related project description uploaded t
Introduction to Statistical Computing and Data Management
BIOS 511

Fall 2015
BIOS 511 Lab 11
Please feel free to surround your entire code with ODS RTF and ODS RTF CLOSE or ODS PDF
and ODF PDF CLOSE statements to write the output to an RTF or PDF file instead of the
default listing or html destinations. Data sets for parts I and I
Introduction to Statistical Computing and Data Management
BIOS 511

Fall 2015
BIOS 511 Lab 12 on Macros
Please feel free to surround your entire code with ODS RTF and ODS RTF CLOSE or ODS PDF
and ODF PDF CLOSE statements to write the output to an RTF or PDF file instead of the
default listing or html destinations. All needed data s
Introduction to Statistical Computing and Data Management
BIOS 511

Fall 2015
BIOS 511 Lab 9 on DO and ARRAY groups
For all parts, use arrays and DO loops whenever appropriate. Please feel free to surround
your entire code with ODS RTF and ODS RTF CLOSE or ODS PDF and ODF PDF CLOSE
statements to write the output to an RTF or PDF fi
Introduction to Statistical Computing and Data Management
BIOS 511

Fall 2015
BIOS 511 Lab 10
Please feel free to surround your entire code with ODS RTF and ODS RTF CLOSE or ODS PDF
and ODF PDF CLOSE statements to write the output to an RTF or PDF file instead of the
default listing or html destinations. All datasets are included i
Introduction to Statistical Computing and Data Management
BIOS 511

Fall 2015
BIOS 511 Homework #10
As you complete this assignment, remember to follow the homework guidelines. Be sure to turn in
your log and output files. All needed datasets are in the course datasets zip file.
This homework is worth 100 points and up to 20 extra