Longitudinal Data And Sas / Edition 1

Paperback (Print)
Buy New
Buy New from BN.com
$27.24
Used and New from Other Sellers
Used and New from Other Sellers
from $25.01
Usually ships in 1-2 business days
(Save 24%)
Other sellers (Paperback)
  • All (12) from $25.01   
  • New (8) from $28.97   
  • Used (4) from $25.01   

Overview

Working with longitudinal data introduces a unique set of challenges. Once you've mastered the art of performing calculations within a single observation of a data set, you're faced with the task of performing calculations or making comparisons between observations. It's easy to look backward in data sets, but how do you look forward and across observations? Ron Cody provides straightforward answers to these and other questions. Longitudinal Data and SAS details useful techniques for conducting operations between observations in a SAS data set. For quick reference, the book is conveniently organized to cover tools-an introduction to powerful SAS programming techniques for longitudinal data; case studies-a variety of illuminating examples that use Ron's techniques; and macros-detailed descriptions of helpful longitudinal data macros. Beginning to intermediate SAS users will appreciate this book's informative, easy-to-comprehend style. And users who frequently process longitudinal data will learn to make the most of their analyses by following Ron's methodologies.
Read More Show Less

Editorial Reviews

From The Critics
This book for beginning to intermediate SAS users details techniques for conducting operations between observations in a SAS data set. Early chapters introduce SAS programming techniques for longitudinal data, while later chapters present case studies and detailed descriptions of longitudinal data macros. Cody is a professor and researcher at the Robert Wood Johnson Medical School. Annotation c. Book News, Inc., Portland, OR (booknews.com)
Read More Show Less

Product Details

  • ISBN-13: 9781580259248
  • Publisher: SAS Institute Inc.
  • Publication date: 10/15/2001
  • Edition description: New Edition
  • Edition number: 1
  • Pages: 208
  • Sales rank: 700,973
  • Product dimensions: 7.50 (w) x 9.25 (h) x 0.44 (d)

Table of Contents

List of Programs ix
Preface xvii
Acknowledgments xix
1 The RETAIN Statement
Introduction 1
Demonstrating a DATA Step with and without a RETAIN Statement 1
Generating Sequential SUBJECT Numbers Using a Retained Variable 7
Using a SUM Statement to Create SUBJECT Numbers 9
Demonstrating That Variables Read with a SET Statement Are Retained 10
A Caution When Using a RETAIN Statement 11
2 The LAG and DIF Functions
Introduction 13
Using the LAG Function to Compute Differences 13
Demonstrating Some Related Functions: LAG2, LAG3, and So Forth 16
Demonstrating the DIF Function 17
3 FIRST. and LAST. Temporary Variables
Introduction 19
How to Create FIRST. and LAST. Temporary Variables 19
Using More Than One BY Variable 22
A Simple Application Using FIRST. and LAST. Variables 24
4 Flags and Counters
Introduction 27
Using a Flag Variable to Determine If a Particular Event Ever Occurred in Any One of Several Observations for Each Subject 27
Counting the Number of Positive Outcomes for Each Patient 29
5 Summarizing Data Using PROC MEANS and PROC FREQ
Introduction 33
Using PROC MEANS to Output Means to a Data Set 34
Comparing CLASS and BY Statements with PROC MEANS 37
Computing Other Descriptive Statistics 38
Automatically Naming the Variables in the Output Data Set 40
Demonstrating an Alternative Way to Select Specific Descriptive Statistics for Selected Variables 41
Adding Additional Variables to the Summary Data Set Using an ID Statement 42
Specifying More Than One CLASS Variable 44
Selecting Multi-Way Breakdowns Using the TYPES Statement 47
Using the PROC MEANS CHARTYPE Option to Simplify the _TYPE_ Interpretation 49
Comparing PROC MEANS and PROC FREQ for Creating an Output Data Set Containing Counts 50
Counting Frequencies for a Two-Way Table 52
6 Using PROC SQL with Longitudinal Data
Introduction 55
Creating a Demonstration Data Set 55
A Simple SQL Query 57
Using PROC SQL to Count Observations within a BY Group 58
Demonstrating a HAVING Clause 59
Using PROC SQL to Create a Macro Variable 60
Using a Summary Function to Compute Group Means 62
7 Restructuring SAS Data Sets Using Arrays
Introduction 65
Creating a New Data Set with Several Observations per Subject from a Data Set with One Observation per Subject 66
Another Example of Creating Multiple Observations from a Single Observation 69
Going from One Observation per Subject to Many Observations per Subject Using Multidimensional Arrays 72
Demonstrating the Use of a Multidimensional Array 74
An Alternative Program 77
Another Example of a Multidimensional Array 78
8 Restructuring SAS Data Sets Using PROC TRANSPOSE
Introduction 81
Going from One Observation to Several Observations 81
Another Example of Creating Multiple Observations from a Single Observation 84
Going from One Observation per Subject to Many Observations per Subject 86
Creating a Data Set with One Observation per Subject from a Data Set with Multiple Observations per Subject 88
9 Study One: Operations on a Clinical Database
Introduction 94
Description of the Clinical Data Set 94
Selecting the First or Last Visit for Each Patient 95
Computing Differences between the First and Last Visits 97
Another Method of Computing Differences between the First and Last Visits 99
Computing Differences between Every Visit 100
Counting the Number of Visits for Each Patient (DATA Step Approach) 101
Counting the Number of Visits for Each Patient (PROC FREQ) 103
Counting the Number of Visits for Each Patient (PROC MEANS) 103
Counting the Number of Visits for Each Patient (PROC SQL) 104
Selecting All Patients with n Visits (DATA Step Approach) 105
Selecting All Patients with n Visits (PROC FREQ Approach) 106
Selecting All Patients with Two Visits (Using PROC SQL) 107
Selecting All Patients with Two Visits (Using SQL in One Step) 107
Using PROC SQL to Create a Macro Variable 108
Computing Summary Statistics for Each Patient (Using PROC MEANS) 109
Computing Summary Statistics for Each Patient (Using PROC SQL) 110
Adding a Value from the First Visit to Each Subsequent Visit 111
Looking Ahead: Making a Decision about the Current Observation Based on Information in the Next Observation 114
Using Flags to Ascertain Vitamin Use 117
Using PROC FREQ to Ascertain Vitamin Use 118
Counting the Number of Routine Visits for Each Patient 119
10 Study Two: Operations on Daily Weather Data and Ozone Levels
Introduction 121
The OZONE Data Set 121
Computing Weekly Averages 122
Using the MOD Function to Group Data Values 125
Computing a Moving Average for a Single Variable 127
11 Study Three: Producing Summary Reports on a Library Data Set
Introduction 129
Computing the Number of Books per Patron Visit and by Library 130
Computing the Number of Patrons by Day of Week and Library 134
Generating a Table of LC Categories by Age Group and Overall 135
12 Useful Macros
Introduction 141
Listing All or Part of a Data Set 141
Computing Differences between Successive Observations 143
Computing Differences between the First and Last Observations per Subject 145
Computing a Moving Average 147
Computing Cell Means and Counts 149
Counting the Number of Observations per Subject 151
Appendix List of Data Files and SAS Data Sets
The TEST_SCORES Data Set 153
The CLINICAL Data Set 154
The CLIN_FIRST Data Set 156
The OZONE Data Set 157
The LIBRARY Data Set 160
Index 165
Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)