Teaching statistics and the SAS System

Similar documents
Inter-Rater Agreement in Medical Studies: Analysis Tools within the SAS System

Graphically Enhancing the Visual Presentation and Analysis of Univariate Data Using SAS Software

Applied Regression Modeling: A Business Approach

Introductory SAS example

Using SAS Macro to Include Statistics Output in Clinical Trial Summary Table

ABSTRACT. The SAS/Graph Scatterplot Object. Introduction

Multiple Graphical and Tabular Reports on One Page, Multiple Ways to Do It Niraj J Pandya, CT, USA

SAS/AF FRAME Entries: A Hands-on Introduction

BASING AN ECONOMIC INFORMATION SYSTEM ON SAS MARTIN HXRNQVIST AB VOLVO-DATA

/********************************************/ /* Evaluating the PS distribution!!! */ /********************************************/

Chapter 1 Introduction. Chapter Contents

SparkLines Using SAS and JMP

Lab 3 (80 pts.) - Assessing the Normality of Data Objectives: Creating and Interpreting Normal Quantile Plots

Chapter 28 Saving and Printing Tables. Chapter Table of Contents SAVING AND PRINTING TABLES AS OUTPUT OBJECTS OUTPUT OBJECTS...

EXST SAS Lab Lab #6: More DATA STEP tasks

Chapter 27 Saving and Printing Graphics

Effective Forecast Visualization With SAS/GRAPH Samuel T. Croker, Lexington, SC

Contents of SAS Programming Techniques

SAS CLINICAL SYLLABUS. DURATION: - 60 Hours

PharmaSUG Paper TT10 Creating a Customized Graph for Adverse Event Incidence and Duration Sanjiv Ramalingam, Octagon Research Solutions Inc.

THIS IS NOT REPRESNTATIVE OF CURRENT CLASS MATERIAL. STOR 455 Midterm 1 September 28, 2010

Chapter 25 Editing Windows. Chapter Table of Contents

Writing SAS/AF Applications that run in both an Interactive and Batch Environment

A Juxtaposition of Tables and Graphs Using SAS /GRAPH Procedures

Graphical Techniques for Displaying Multivariate Data

STAT 503 Fall Introduction to SAS

Using SAS to Analyze CYP-C Data: Introduction to Procedures. Overview

Tips and Tricks in Creating Graphs Using PROC GPLOT

Creating Population Tree Charts (Using SAS/GRAPH Software) Robert E. Allison, Jr. and Dr. Moon W. Suh College of Textiles, N. C.

Quick Results with the Output Delivery System

THIS OLD HOUSE WITH SAS

5b. Descriptive Statistics - Part II

Data Standardisation, Clinical Data Warehouse and SAS Standard Programs

SUGI 29 Posters. Paper A Group Scatter Plot with Clustering Xiaoli Hu, Wyeth Consumer Healthcare., Madison, NJ

Creating Macro Calls using Proc Freq

The Evolution of a SAS/GRAPH Application Jenine Eason, AutoTrader.com, Atlanta, GA

SAS/GRAPH Blues? SAS/FRAME to the Rescue Kathy Shelley, Iowa State University, Ames, Iowa

HOW TO DEVELOP A SAS/AF APPLICATION

CREATING THE DISTRIBUTION ANALYSIS

Using SAS/GRAPH Software to Create Graphs on the Web Himesh Patel, SAS Institute Inc., Cary, NC Revised by David Caira, SAS Institute Inc.

Tips to Customize SAS/GRAPH... for Reluctant Beginners et al. Claudine Lougee, Dualenic, LLC, Glen Allen, VA

A SAS Macro for Producing Benchmarks for Interpreting School Effect Sizes

Using MACRO and SAS/GRAPH to Efficiently Assess Distributions. Paul Walker, Capital One

A Generalized Procedure to Create SAS /Graph Error Bar Plots

Programming Gems that are worth learning SQL for! Pamela L. Reading, Rho, Inc., Chapel Hill, NC

MICROSOFT EXCEL 2007 ADVANCED

Chapter 13 Introduction to Graphics Using SAS/GRAPH (Self-Study)

Graphics. Chapter Overview CHAPTER 4

Data Analyst Nanodegree Syllabus

A SAS Macro to Generate Caterpillar Plots. Guochen Song, i3 Statprobe, Cary, NC

STAT:5400 Computing in Statistics

Creating Maps in SAS/GRAPH

Data Annotations in Clinical Trial Graphs Sudhir Singh, i3 Statprobe, Cary, NC

Routing Output. Producing Output with SAS Software CHAPTER 6

Easing into Data Exploration, Reporting, and Analytics Using SAS Enterprise Guide

ODS and Web Enabled Device Drivers: Displaying and Controlling Large Numbers of Graphs. Arthur L. Carpenter and Richard O. Smith Data Explorations

CHAPTER 7 Using Other SAS Software Products

An alternative view.

A Format to Make the _TYPE_ Field of PROC MEANS Easier to Interpret Matt Pettis, Thomson West, Eagan, MN

Data Analyst Nanodegree Syllabus

Arthur L. Carpenter California Occidental Consultants

General Guidelines: SAS Analyst

PHARMACOKINETIC STATISTICAL ANALYSIS SYSTEM - - A SAS/AF AND SAS/FSP APPLICATION

Automate Clinical Trial Data Issue Checking and Tracking

Choosing the Right Procedure

Using Templates Created by the SAS/STAT Procedures

SAS is the most widely installed analytical tool on mainframes. I don t know the situation for midrange and PCs. My Focus for SAS Tools Here

Using The System For Medical Data Processing And Event Analysis: An Overview

Coders' Corner. Scaling Mount GCHART: Using a MACRO to Dynamically Reset the Scale Nina L. Werner, Dean Health Plan, Inc., Madison, WI.

SAS/GRAPH Introduction. Winfried Jakob, SAS Administrator Canadian Institute for Health Information

New Visualization in V8.2

1 Introducing SAS and SAS/ASSIST Software

OASUS Spring 2014 Questions and Answers

SAS Structural Equation Modeling 1.3 for JMP

Data Driven Annotations: An Introduction to SAS/GRAPH s Annotate Facility

Techdata Solution. SAS Analytics (Clinical/Finance/Banking)

Parallel processing techniques for performance improvement for SAS processes: Part II Viraj R Kumbhakarna, JPMorgan Chase & Co.

EXST3201 Mousefeed01 Page 1

Then Log-odds with respect to a baseline category (eg, the last category) exp( ß ji = 0j + 1j X 1i + + kj X ki ) 1 + J 1 X exp( 0` + i`x 1i + + kj X k

THE IMPACT OF DATA VISUALIZATION IN A STUDY OF CHRONIC DISEASE

Using Macros to Construct Overlaid Contour Plots For Response Surface Optimization

CREATING THE ANALYSIS

Chapter 41 SAS/INSIGHT Statements. Chapter Table of Contents

Generating Participant Specific Figures Using SAS Graphic Procedures Carry Croghan and Marsha Morgan, EPA, Research Triangle Park, NC

SAS Graphs in Small Multiples Andrea Wainwright-Zimmerman, Capital One, Richmond, VA

Bluman & Mayer, Elementary Statistics, A Step by Step Approach, Canadian Edition

SAS Online Training: Course contents: Agenda:

Coders' Corner. Paper ABSTRACT GLOBAL STATEMENTS INTRODUCTION

Statistics and Data Analysis. Paper

Create Flowcharts Using Annotate Facility. Priya Saradha & Gurubaran Veeravel

ODS The output delivery system

Teaching univariate measures of location-using loss functions

Multiple Forest Plots and the SAS System

Picturing Statistics Diana Suhr, University of Northern Colorado

THE UNIVERSITY OF BRITISH COLUMBIA FORESTRY 430 and 533. Time: 50 minutes 40 Marks FRST Marks FRST 533 (extra questions)

General Certificate of Secondary Education Digital Technology. Unit 5 Digital Development Practice MARK SCHEME

CREATING A SUMMARY TABLE OF NORMALIZED (Z) SCORES

Want Quick Results? An Introduction to SAS/GRAPH Software. Arthur L. Carpenter California Occidental Consultants

WEB MATERIAL. eappendix 1: SAS code for simulation

Want to Do a Better Job? - Select Appropriate Statistical Analysis in Healthcare Research

Transcription:

Teaching statistics and the SAS System Ass. Prof. Dipl.Ing. Dr. Barbara Schneider Institute for Medical Statistics, University of Vienna,Vienna, Austria Abstract This presentation offers ideas and examples for using the SAS System in teaching statistics to students in medicine and to physicians. Two parts will be discussed. The first part describes features already available in the SAS System. The second part introduces an educational application. This application is a visual demonstration of elementary statistical notion. Topics such as the influence of changing the parameters of a distribution on the shape of the distribution and the variability of a point estimator are discussed. The demonstration is developed on a PC (Windows) using Base SAS, SAS/GRAPH, SAS/INSIGHT and SAS/AF. SAS Version 8.1 SAS code will be shown. The presentation is aimed at people who are interested or involved in teaching statistics Objectives Teaching statistics can be a very tough job especially when the students are non statisticians or mathematicians. For example physicians are interested in results from data analyses. But before using a software package one has to be familiar with at least some basic methodoligical concepts and ideas of probability theory and statistics. Students very often experience a course in statistics as too theoretical. Therefore it is desirable to make the course more concrete.

Visualization is an excellent tool to obtain more insight on those topics that are difficult to illustrate with pen and paper. An application that serves as a companion for a statistical course must be user friedly. Because the attention of the application must be focused as much as possible on the content of the demonstration, the handling of the package must be very simple. The student is desired to take an active role. He has to determine the reading time and learning time himself. He should be able to try out things that are too difficult to try out by pen and paper or things that require too much arithmetical work. In this context simulations together with graphical presentation are powerful techniques to explain statistical concepts clearly. Examples The first example introduces a feature already available in the SAS System. Example1: This example demonstrates how SAS/INSIGHT can be used right now in teaching basic concepts of linear regression analysis without further programming effort. Open SAS/INSIGHT and create a new dataset (see Fig.1,WORK.A): A : independend variable, B: dependent variable. Choose Analyze from the menu and select Fit(YX). Load B into the Y-Variable field and A into the X-Variable field then click OK. Resize the windows as shown in Fig.1. Make shure to have the model equation displayed.

Fig. 1 Then change the value of variable B in observation 5 from 6 to 10 and press the enter key. The students are able to observe how the regression line and simultaneously the model equation change (Fig. 2). So, students can repeat this step several times exploring the rules of linear regression in a dynamic way.

Fig. 2 The following examples show how SAS can be used for teaching AF FRAME technology Example2: The influence of changing the parameters of a binomial distribution on the shape of the distribution: A SAS program is built to construct the binomial distribution. This program is wrapped up into an AF FRAME to make it available to students not familiar with the SAS programming language. The frame (Fig. 3) consists of 2 Version 6 (V6) input fields to transfer the parameters of a binomial distribution to the SCL code (SAS Component Language). Graphic text controls left to the input fields

describe the fields. p: is the probability of the outcome of the Bernoulli trial. N: represents the number of independent Bernoulli trials. 2 pushbuttons (V8 pushbutton controls) are used to submit the SCL code or to go back to another frame (not discussed in the paper). A chart control displays the graph ( probability function) in the data table object below the graph, the probability function is displayed numerically (I: number of outcomes, x: probability). To run the application you simply have to fill in the 2 parameters and press the submit button. Fig. 3 To control the application SCL code has to be written: pushbutton1: /* refers to the pushbutton labled submit */

call notify('tab1','_set_dataset_',''); /* resets the data table */ submit continue; /* in this block the SAS code which produces the probability function is wrapped up */ options nonumber nodate; title; %let p=&p; /* the macro variables are set to the value of the input field */ %let n= &N; data b; label x="p(x=i)" y="p(x<=i)" y1="p(x>=)" ; do i=0 to &n; y=probbnml(&p,&n,i); if i=0 then do; x=probbnml(&p,&n,i); end; if i>0 then do; x=probbnml(&p,&n,i)-probbnml(&p,&n,i-1); end; y1=x+1-probbnml(&p,&n,i) ; output; end; data b1; label i="i" x="p(x=i)"; format i 5. x 6.5 ; set b; keep i x;

title "p=&p, N=&n"; endsubmit; /* the submit block ends */ /* the following statements display the generated dataset into the chart control and the data table object */ CHART1.DataSet='work.b'; CHART1.viewmode='3D'; CHART1.xvariable='i'; CHART1.yvariable='x'; call notify('tab1','_set_dataset_','work.b1'); return; This application can easily be extended for the comparison of two binomial distributions. The same technical concept can be used for demonstrating any other distribution (e.g. normal distribution) Example3: Demonstrating the variability of the mean of the normal distribution : A simulation is used to explain how to interpret the standard error of the mean. The SAS program that facilitates the simulation is again wrapped up into an AF frame application (Fig.4). The frame consists of 4 input field controls, facilitating the same functionality as in example 2, labled with graphic text controls left to the input fields. mu: expectation of the normal distribution, sigma: the standard deviation, number of samples generated and the sample size within each sample. Further there are 2 pushbuttons and a graph output control which displays the generated graph. A (V6) data table object shows descriptive evaluation of the samples. To start the application fill out the input fields and press submit. The generated samples are displayed in the graph output control. Sample values are black, means ± standard deviation green and mean ± standard error red (small).

Fig. 4 The following SCL code controls the application. pushbutton1: /* submit */ call notify('tab1','_set_dataset_',''); submit continue; goptions device=win nodisplay goutmode=replace; %let m=&m; %let s= &S; data n; do i=1 to &NS; do j=1 to &SL;

x=&m+&s*rannor(0); output ; end; end; proc univariate data=n normal noprint; var x; output out=o n=n mean=mean std=std stdmean=stdmean min=min max=max qrange=qrange range=range probn=probn; by i; data o; format n 5. mean 7.2 std 7.2 stdmean 7.2 min 7.2 max 7.2 qrange 7.2 range 7.2 probn 5.3 ; set o; data n ; set n; keep g1 x g g2; g=i; g1=i+0.2; g2=i+0.4; symbol1 c=green v=none i=std1t w=3; symbol2 c=black v=star i=none ; symbol3 c=red v=none i=std1mt ; proc gplot data=n;

plot x*g=1 x*g1=2 x*g2=3 / overlay vref=&m cvref=black caxis=black ctext=black; endsubmit; Goutput1._setGraph('work.gseg.gplot.grseg'); call notify('tab1','_set_dataset_','work.o'); return; term: submit continue; /* this block is necessary to reset the goptions especially for the nodisplay option */ goptions reset=all; endsubmit; return; Conclusion SAS software, especially SAS/AF FRAME technology is an excellent tool for implementing some didactic concepts for teaching statistics and probability theory. SAS, Base SAS, SAS/GRAPH, SAS/AF software are registered trademarks of SAS Institute Inc., Cary, NC, USA References SAS Language: Reference, Version 8 SAS Procedures Guide, Version 8 SAS/GRAPH Software: Reference, Version 8, Volumes 1 and 2 SAS Component Language: Reference, Version 8 SAS/AF Software: Changes and Enhancements in Version 8, Course Notes Address for correspondence: Dipl.Ing. Dr. Barbara Schneider Institut für Medizinische Statistik Universität Wien Schwarzspanierstr. 17 A - 1090 Wien Austria barbara.schneider@univie.ac.at