Laboratory Topics 1 & 2

Size: px
Start display at page:

Download "Laboratory Topics 1 & 2"

Transcription

1 PLS205 Lab 1 January 12, 2012 Laboratory Topics 1 & 2 Welcome, introduction, logistics, and organizational matters Introduction to SAS Writing and running programs; saving results; checking for errors Different ways to input/import data Proc Means, Proc Univariate (testing for normality) Introduction to SAS Enterprise Guide Inputting/importing data Saving output Modifying data Hypothesis testing using Enterprise Guide t-test Power Calculations using Proc Power Hypothesis testing using SAS editor t-test Proc Print, Proc Sort Nifty SAS Program: Critical values generator Niftier webpage APPENDIX: Data input examples Logistics and Organizational Matters 1. Homework is due at the beginning of lab, with 10 points off for every day it's late. If you don't submit it by the time the homework key is posted (usually 24 hours later), you will receive a zero. 2. Print the lab handouts before coming to lab; they will be posted on the class website each week by Wednesday night at the latest. 3. To log on to the lab computers, you need a UCD user ID and password. 4. Bring a diskette/flashdrive to lab to copy examples from the class directory (G:\PLS205\*.*). 5. This is a demanding class, so make use of all your resources office hours, lab handouts, homework keys, each other (the 205 Buddy System). Introduction to SAS (your new best friend?) To open SAS Version 9.3: START All Programs Class Software SAS SAS 9.3 (English) The SAS Display Manager There are three basic Windows, listed in the order you should view them: 1) The Program Editor window: Where you tell SAS what to do. 2) The Log window: Where SAS tells you what it did and (usually) what you did wrong. 3) The Output window: Where you find the results of your analysis (i.e. the good stuff). Lab 1.1

2 Example 1 From ST&D p. 29 [Lab1ex1.sas] Data BirdCount; * Creates a new data set called "BirdCount"; Input Field Birds; * Tells SAS the names of variables; * A throwback to the old days; ; * SEMICOLON! SEMICOLON! SEMICOLON!; Proc Means mean var std stderr cv Data = BirdCount; Var Birds; * Generate these requested statistics for the variable "Birds" in the dataset "BirdCount"; Run; Quit; Output Analysis Variable : Birds Coeff of Mean Variance Std Dev Std Error Variation Things to Learn 1. Run (submit) a SAS program with a simple click on the running man icon. 2. Move between windows to scan for red-type errors (Log) and then view results (Output). 3. Clear Log and Output windows with a simple click on the blank page icon. 4. Save program to disk. From Program Editor window: File Save as. 5. Save output to disk. From Output window: File Save as. 6. Set the line size for output to 76 characters (the perfect fit for 10 point Courier font on a page with 1" margins): Tools Options System Log and procedure output control SAS log and procedure output Double click linesize Example 2 From ST&D pg. 30 [Lab1ex2.sas] Data Barley; Input tells SAS to please read to the end of the line; ; Proc Univariate normal plot Data = Barley; var Extract; * Test for normality and generate plots for the variable Extract in the dataset Barley ; Run; Quit; Lab 1.2

3 Comments on the code 1. Use in the input statement when you have more Cards on a row than input variables. 2. The word "plot" in Proc Univariate is an example of an option. Its function is to generate several graphical displays of the data, including a stem-and-leaf display, a boxplot, and a normal probability plot (a.k.a. quantile-quantile or Q-Q plot) [see ST&D for interpretation of these displays: pages 30-32, ]. 3. The word "normal" in Proc Univariate is another option. Its function is to carry out tests for normality. In this class, we will be using the Shapiro-Wilk test for normality. Output Variable: Extract Moments N 14 Sum Weights 14 Mean Sum Observations Std Deviation Variance Skewness Kurtosis Uncorrected SS Corrected SS Coeff Variation Std Error Mean Basic Statistical Measures Location Variability Mean Std Deviation Median Variance Mode Range Interquartile Range Tests for Location: Mu0=0 Test -Statistic p Value Student's t t Pr > t <.0001 Sign M 7 Pr >= M Signed Rank S 52.5 Pr >= S Tests for Normality Test --Statistic p Value Shapiro-Wilk W Pr < W Kolmogorov-Smirnov D Pr > D > Cramer-von Mises W-Sq Pr > W-Sq > Anderson-Darling A-Sq Pr > A-Sq > Lab 1.3

4 Quantiles (Definition 5) Quantile Estimate 100% Max % % % % Q % Median % Q % % % % Min 73.9 Extreme Observations ----Lowest Highest--- Value Obs Value Obs Stem Leaf # Boxplot *-----* Normal Probability Plot * *++* * *+*+ * * * *+ ++*+* +++* * NOTE: The Shapiro-Wilk W statistic measures the linear correlation between the data and their normal scores. The closer W is to 1, the better correlated the distribution is to a normal distribution. Normality is rejected when W is sufficiently smaller than one, that is, when the value Pr < W is less than In this example, p = > 0.05, so we conclude the data exhibit a normal distribution. Lab 1.4

5 Introduction to SAS Enterprise Guide 1. To open Enterprise Guide: Start Menu SAS Enterprise Guide There are several ways to input data into Enterprise Guide: a. Import data that was run before in the SAS session: File Open Program Lab 1ex3 b. Type it directly into the Enterprise Guide spreadsheet. c. Import an Excel file: File Import Data (select Microsoft Excel Spreadsheet in the Files of Type menu) Select the file you want to open. d. Import a delimited text file: Same as above but select Delimited File in the Files of Type menu. 3. To analyze the data and check for normality: a. Push the Run button b. Click on the Output Data tab c. Analyze Capability Q-Q Plot d. Choose "Extract" for analysis e. Distribution Normal 4. To save or export the output: a. The easiest way is simply to copy the output or graph and paste it into your Word file: Edit Copy Graph (or Copy to Program Editor if it s text; once in the program editor, highlight what you wish to export and copy and paste as normal). 5. To modify and add data: a. Edit Mode (if Mode is not active, be sure all your Log and Output windows in SAS are clean and the data sheet is saved) Edit b. Add one extreme value (Edit Add rows) and observe the effects on the normality test. You can also add a row by placing the mouse at beginning of a row right click Add rows c. To insert a computed column, click the Calculator icon. d. To add, delete, or duplicate columns, right-click the top of the column. Lab 1.5

6 Hypothesis Testing Using Enterprise Guide In Enterprise Guide, with Barley data loaded: Analyze ANOVA t-tests One Sample t-test for a Mean choose Extract as the variable H0: 78 Confidence Level select 95% Output N Mean Std Dev Std Err MinimumMaximum Mean 95% CL Mean Std Dev 95% CL Std Dev DF t Value Pr > t <.0001 Confidence Interval In Enterprise Guide, with Barley data loaded: Describe Summary Statistics under Data choose Extract as the variable Under Statistics--Additional, select Confidence limits of the mean Analysis Variable : Extract Mean Std Dev Minimum Maximum N Lower 95% CL for Mean Upper 95% CL for Mean Things to Notice 1. The t-test is highly significant (p < 0.001); so we reject H The 95% confidence interval of the mean is [ ]. See that the value 78 is far above the upper limit of this confidence interval. That is why the test is highly significant. In your ample spare time, try repeating the exercise using (the lower extreme of the confidence interval) as the Null Mean. What is the expected probability of the t-test? Power calculation using SAS PROC POWER One Sample power test. What is the power of a test to detect a difference between the observed mean of and alternative means of and (the same value)? proc power; onesamplemeans mean = ntotal = 14 stddev = 1.23 nullmean= alpha= 0.05 power =.; run; The POWER Procedure Lab 1.6

7 One-sample t Test for Mean Fixed Scenario Elements Distribution Normal Method Exact Alpha 0.05 Mean Standard Deviation 1.23 Total Sample Size 14 Number of Sides 2 Computed Power Null Index Mean Power One curve is on top of the other! >.999 Things to Notice 1. The. after power indicates that you are requesting the power 2. The onesamplemeans is one line of code up to the to the ;. It is split in multiple lines to make it easier to read 3. The power to detect a difference from a null mean of 77 is 0.846, and the power increases to almost 1 when the alternative mean is 78. The minimum value of the power is =alpha when the alternative mean is the same as the observed mean. You generally want a power of at least 0.80 (80%). Notice that a 95% confidence interval of the mean is [ ] excludes both 77 and 78. See that the value 78 is far above the upper limit of this confidence interval. That is why the test is highly significant. Proc Power can be also used to estimate the number of samples required to obtain a certain power proc power; onesamplemeans mean = ntotal =. stddev = 1.23 nullmean= 77 alpha= 0.05 power = ; run; Lab 1.7

8 The POWER Procedure One-sample t Test for Mean Fixed Scenario Elements Distribution Normal Method Exact Null Mean 77 Alpha 0.05 Mean Standard Deviation 1.23 Number of Sides 2 Computed N Total Nominal Actual N Index Power Power Total SAS rounds the number estimation conservatively to the upper number if there are decimals, to guarantee at least the requested power. Two sample power test. What is the power of a test to detect a difference between two samples owith the following mean and variances: Mean Variance N Sample Sample Mean difference= 5 Pooled s= SQRT( (15+17)/2)= 4 (not the same as the average of the standard deviations) proc power; twosamplemeans test=diff meandiff = 5 stddev = 4 npergroup = power =.; run; The POWER Procedure Two-sample t Test for Mean Difference Fixed Scenario Elements Distribution Normal Method Exact Mean Difference 5 Standard Deviation 4 Number of Sides 2 Null Difference 0 Alpha 0.05 Lab 1.8

9 Computed Power N Per Index Group Power Hypothesis Testing Using SAS To use Proc Univariate to do a t-test (e.g. testing if = xx), we must create: new variable = old variable expected In the following example, we will test the hypothesis that = 78 by creating a new variable TEST78 = Extract We will then perform a t-test for the new variable against the hypothesis = 0 (see similar example ST&D pg ). Example 3 [Lab1ex3.sas] Data Barley; Input Test78 = Extract ; * Here's that new variable; ; Proc Print; * Proc Print displays the inputted data, a nice check; Title 'Hypothesis mean = 78.0'; Proc Univariate; Var Test78; * Indicates we want to use the new variable Test78; Proc GChart; * Proc GChart creates fancy charts in new windows; Run; Quit; Hbar Test78; * Hbar = horizontal bar. Could be vbar, pie, etc; Output [Note: In your work, you would accompany this output with a line of interpretation.] Variable: Test78 Tests for Location: Mu0=0 Test -Statistic p Value Student's t t Pr > t <.0001 Lab 1.9

10 Example 4 [Lab1ex4.sas] This next example illustrates the use of Proc Sort, Proc Print, and Proc Means: Data Grades; Input StudentNo GradUG $ HWGrade Midterm Final; * $ indicates a non-numeric class variable; FinalGrade = 0.25*HWgrade *Midterm *Final; 13 G G G UG G UG ; Proc Sort; * Orders the data by the variable named below; By StudentNo; Proc Print; * Displays the inputted data in whatever order you wish; Title 'Roster in order of Student Number'; ID StudentNo; Var HWGrade Midterm Final FinalGrade; Proc Means n mean std var stderr maxdec=1;* MaxDec limits all numbers to 1 decimal place; Title 'Descriptive statistics'; Var HWGrade Midterm Final FinalGrade; Proc Sort; By GradUG; * Sorting is needed because of the Proc Means below; Proc Means n mean std var stderr maxdec=1; Title 'Descriptive statistics by student level'; Var HWGrade Midterm Final FinalGrade; By GradUG; * Without Proc Sort above, this would confuse SAS; Proc Plot; Plot Final*FinalGrade; * Generates plot of Final (y) vs. FinalGrade(x); Run; Quit; Note: If you add a title to one Proc statement but not to the others, all the Proc outputs will have the same label. In fact, they will carry over to future programs! To avoid confusion, you should label everything, especially as your programs become more complicated and the output more profuse. Lab 1.10

11 Nifty SAS Program [SASCritValues.sas] Tables of critical values rarely contain the exact values you are looking for. Here's a way to use SAS to find critical values and p-values with precision: Data ValueFinder; TITLE 'CRITICAL VALUES'; * The functions below find the critical value for a specified probability 'p'; * where 'p' is the proportion of the area to the **LEFT** of the critical value; * [e.g will be the 'p' for a 5% two-tailed test]; Nvalue = PROBIT (0.975); * This is Z; Tvalue = TINV (0.975, 20); * This is t (p, df); Chivalue = CINV (0.975, 20); * This is chi-square (p, df); Fvalue = FINV (0.975, 20, 4); * This is F (p, NUM df, DEN df); TITLE 'PROBABILITY'; * These functions return the probability that an observation is < x; Nprob = PROBNORM (1.96); * Z; Tprob = PROBT (2.086, 20); * t; Chiprob = PROBCHI (34.2, 20); * chi-square; Fprob = PROBF (8.56, 20, 4); * F; Proc Print; Run; Quit; Very very handy; but if you use this, please be aware of what SAS is telling you, namely that it is the areas to the LEFT of the critical values that are being considered. Double-check your results with a table until you get the hang of it. Niftier Website There are a lot of free critical values calculators available on-line as well. Feel free to use them, but be sure you understand how they work. The best way to do this is by checking some test values against the tables in the book (or on the class webpage). A good site: Caution: Be aware of what these calculators are telling you, namely that it is the areas to the LEFT or RIGHT of the critical values that are being considered. Double-check your results with a table until you get the hang of it. APPENDIX: Data Input Examples Students lose a shocking number of points on homeworks and exams due to incorrect data input (i.e. careless typographical errors). Very rarely should you ever have to input data number-by-number because almost all the datasets will be provided to you already typed into Word documents. The challenge you have is to structure your data input routine in SAS such that it will read correctly whatever you cut-and-paste into your code. The "Do-End-loops" illustrated below may look complicated, but it is worth your time to understand how they work, especially as our data sets become bigger and bigger. Example dataset 1 5 treatments with 5 replications each Lab 1.11

12 Possible SAS data entry code: Data Example1; Input Treatment Do Replication = 1 to 5; Input Output; A B C D E ; A B C D E If this is scary, you can also paste the above table into Excel and manipulate it (again, by cutting and pasting and transposing, not by retyping numbers) to give you something like this: A 3.08 A 5.51 A 5.07 A 4.41 A 3.85 B 3.3 B 3.19 B 4.29 B 1.87 B 1.32 C 5.73 C 5.18 C 5.06 C 3.96 C 3.74 D 1.87 D 3.3 D 2.64 D 3.08 D 3.85 E 2.25 E 4.78 E 3.13 E 2.91 E 2.58 Lab 1.12

13 Once you are here, the SAS code is straightforward: Data Example1; Input Treatment Response; A 3.08 A E 2.91 E 2.58 ; The two approaches are equivalent, but as the data sets become bigger, the Excel manipulations needed for the second approach will become more and more cumbersome. Example data set 2 Combinations of treatments with 10 replications each Trt1A Trt1B Trt2A Trt2B Trt2C Trt2A Trt2B Trt2C Possible SAS data entry code: Data Example2; Do Trt1 = 1 to 2; Do Trt2 = 1 to 3; Do Rep = 1 to 10; Input Output; ; Here we ve set up the input routine in such a way that we could just cut-and-paste the data table into SAS. No chance for typographical errors. Lab 1.13

14 Example data set 3 Each data point identified by four classification variables A1 A2 C1 C2 C3 C4 D1 D2 D3 D1 D2 D3 D1 D2 D3 D1 D2 D3 B B B B B B B B Possible SAS data entry code: Data Example3; Do ClassA = 1 to 2; Do ClassB = 1 to 4; Do ClassC = 1 to 4; Do ClassD = 1 to 3; Input Output; ; Voila! Without the Do-End loops, the same dataset would be five times as large because you would have to input the individual classification address for each and every data point (e.g. A2, B3, C2, D1). Again, this may seem unnecessary to you now; but please take the time to learn it. And if you have any questions, just ask. Lab 1.14

PLS205 Lab 1 January 9, Laboratory Topics 1 & 2

PLS205 Lab 1 January 9, Laboratory Topics 1 & 2 PLS205 Lab 1 January 9, 2014 Laboratory Topics 1 & 2 Welcome, introduction, logistics, and organizational matters Introduction to SAS Writing and running programs saving results checking for errors Different

More information

STAT 503 Fall Introduction to SAS

STAT 503 Fall Introduction to SAS Getting Started Introduction to SAS 1) Download all of the files, sas programs (.sas) and data files (.dat) into one of your directories. I would suggest using your H: drive if you are using a computer

More information

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

THE UNIVERSITY OF BRITISH COLUMBIA FORESTRY 430 and 533. Time: 50 minutes 40 Marks FRST Marks FRST 533 (extra questions) THE UNIVERSITY OF BRITISH COLUMBIA FORESTRY 430 and 533 MIDTERM EXAMINATION: October 14, 2005 Instructor: Val LeMay Time: 50 minutes 40 Marks FRST 430 50 Marks FRST 533 (extra questions) This examination

More information

STAT:5400 Computing in Statistics

STAT:5400 Computing in Statistics STAT:5400 Computing in Statistics Introduction to SAS Lecture 18 Oct 12, 2015 Kate Cowles 374 SH, 335-0727 kate-cowles@uiowaedu SAS SAS is the statistical software package most commonly used in business,

More information

EXST3201 Mousefeed01 Page 1

EXST3201 Mousefeed01 Page 1 EXST3201 Mousefeed01 Page 1 3 /* 4 Examine differences among the following 6 treatments 5 N/N85 fed normally before weaning and 85 kcal/wk after 6 N/R40 fed normally before weaning and 40 kcal/wk after

More information

STAT:5201 Applied Statistic II

STAT:5201 Applied Statistic II STAT:5201 Applied Statistic II Two-Factor Experiment (one fixed blocking factor, one fixed factor of interest) Randomized complete block design (RCBD) Primary Factor: Day length (short or long) Blocking

More information

Lab #1: Introduction to Basic SAS Operations

Lab #1: Introduction to Basic SAS Operations Lab #1: Introduction to Basic SAS Operations Getting Started: OVERVIEW OF SAS (access lab pages at http://www.stat.lsu.edu/exstlab/) There are several ways to open the SAS program. You may have a SAS icon

More information

SPSS. (Statistical Packages for the Social Sciences)

SPSS. (Statistical Packages for the Social Sciences) Inger Persson SPSS (Statistical Packages for the Social Sciences) SHORT INSTRUCTIONS This presentation contains only relatively short instructions on how to perform basic statistical calculations in SPSS.

More information

An introduction to SPSS

An introduction to SPSS An introduction to SPSS To open the SPSS software using U of Iowa Virtual Desktop... Go to https://virtualdesktop.uiowa.edu and choose SPSS 24. Contents NOTE: Save data files in a drive that is accessible

More information

Land Cover Stratified Accuracy Assessment For Digital Elevation Model derived from Airborne LIDAR Dade County, Florida

Land Cover Stratified Accuracy Assessment For Digital Elevation Model derived from Airborne LIDAR Dade County, Florida Land Cover Stratified Accuracy Assessment For Digital Elevation Model derived from Airborne LIDAR Dade County, Florida FINAL REPORT Submitted October 2004 Prepared by: Daniel Gann Geographic Information

More information

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

THIS IS NOT REPRESNTATIVE OF CURRENT CLASS MATERIAL. STOR 455 Midterm 1 September 28, 2010 THIS IS NOT REPRESNTATIVE OF CURRENT CLASS MATERIAL STOR 455 Midterm September 8, INSTRUCTIONS: BOTH THE EXAM AND THE BUBBLE SHEET WILL BE COLLECTED. YOU MUST PRINT YOUR NAME AND SIGN THE HONOR PLEDGE

More information

The SAS interface is shown in the following screen shot:

The SAS interface is shown in the following screen shot: The SAS interface is shown in the following screen shot: There are several items of importance shown in the screen shot First there are the usual main menu items, such as File, Edit, etc I seldom use anything

More information

EXST SAS Lab Lab #6: More DATA STEP tasks

EXST SAS Lab Lab #6: More DATA STEP tasks EXST SAS Lab Lab #6: More DATA STEP tasks Objectives 1. Working from an current folder 2. Naming the HTML output data file 3. Dealing with multiple observations on an input line 4. Creating two SAS work

More information

Baruch College STA Senem Acet Coskun

Baruch College STA Senem Acet Coskun Baruch College STA 9750 BOOK BUY A Predictive Mode Senem Acet Coskun Table of Contents Summary 3 Why this topic? 4 Data Sources 6 Variable Definitions 7 Descriptive Statistics 8 Univariate Analysis 9 Two-Sample

More information

* Sample SAS program * Data set is from Dean and Voss (1999) Design and Analysis of * Experiments. Problem 3, page 129.

* Sample SAS program * Data set is from Dean and Voss (1999) Design and Analysis of * Experiments. Problem 3, page 129. SAS Most popular Statistical software worldwide. SAS claims that its products are used at over 40,000 sites, including at 90% of the Fortune 500. This will not be all SAS as they make other products, such

More information

Minitab Study Card J ENNIFER L EWIS P RIESTLEY, PH.D.

Minitab Study Card J ENNIFER L EWIS P RIESTLEY, PH.D. Minitab Study Card J ENNIFER L EWIS P RIESTLEY, PH.D. Introduction to Minitab The interface for Minitab is very user-friendly, with a spreadsheet orientation. When you first launch Minitab, you will see

More information

Soci Statistics for Sociologists

Soci Statistics for Sociologists University of North Carolina Chapel Hill Soci708-001 Statistics for Sociologists Fall 2009 Professor François Nielsen Stata Commands for Module 7 Inference for Distributions For further information on

More information

Reading data in SAS and Descriptive Statistics

Reading data in SAS and Descriptive Statistics P8130 Recitation 1: Reading data in SAS and Descriptive Statistics Zilan Chai Sep. 18 th /20 th 2017 Outline Intro to SAS (windows, basic rules) Getting Data into SAS Descriptive Statistics SAS Windows

More information

2) familiarize you with a variety of comparative statistics biologists use to evaluate results of experiments;

2) familiarize you with a variety of comparative statistics biologists use to evaluate results of experiments; A. Goals of Exercise Biology 164 Laboratory Using Comparative Statistics in Biology "Statistics" is a mathematical tool for analyzing and making generalizations about a population from a number of individual

More information

STA 570 Spring Lecture 5 Tuesday, Feb 1

STA 570 Spring Lecture 5 Tuesday, Feb 1 STA 570 Spring 2011 Lecture 5 Tuesday, Feb 1 Descriptive Statistics Summarizing Univariate Data o Standard Deviation, Empirical Rule, IQR o Boxplots Summarizing Bivariate Data o Contingency Tables o Row

More information

Introductory Guide to SAS:

Introductory Guide to SAS: Introductory Guide to SAS: For UVM Statistics Students By Richard Single Contents 1 Introduction and Preliminaries 2 2 Reading in Data: The DATA Step 2 2.1 The DATA Statement............................................

More information

Example how not to do it: JMP in a nutshell 1 HR, 17 Apr Subject Gender Condition Turn Reactiontime. A1 male filler

Example how not to do it: JMP in a nutshell 1 HR, 17 Apr Subject Gender Condition Turn Reactiontime. A1 male filler JMP in a nutshell 1 HR, 17 Apr 2018 The software JMP Pro 14 is installed on the Macs of the Phonetics Institute. Private versions can be bought from

More information

Survey of Math: Excel Spreadsheet Guide (for Excel 2016) Page 1 of 9

Survey of Math: Excel Spreadsheet Guide (for Excel 2016) Page 1 of 9 Survey of Math: Excel Spreadsheet Guide (for Excel 2016) Page 1 of 9 Contents 1 Introduction to Using Excel Spreadsheets 2 1.1 A Serious Note About Data Security.................................... 2 1.2

More information

Math 120 Introduction to Statistics Mr. Toner s Lecture Notes 3.1 Measures of Central Tendency

Math 120 Introduction to Statistics Mr. Toner s Lecture Notes 3.1 Measures of Central Tendency Math 1 Introduction to Statistics Mr. Toner s Lecture Notes 3.1 Measures of Central Tendency lowest value + highest value midrange The word average: is very ambiguous and can actually refer to the mean,

More information

1 Introduction to Using Excel Spreadsheets

1 Introduction to Using Excel Spreadsheets Survey of Math: Excel Spreadsheet Guide (for Excel 2007) Page 1 of 6 1 Introduction to Using Excel Spreadsheets This section of the guide is based on the file (a faux grade sheet created for messing with)

More information

Lab #9: ANOVA and TUKEY tests

Lab #9: ANOVA and TUKEY tests Lab #9: ANOVA and TUKEY tests Objectives: 1. Column manipulation in SAS 2. Analysis of variance 3. Tukey test 4. Least Significant Difference test 5. Analysis of variance with PROC GLM 6. Levene test for

More information

5b. Descriptive Statistics - Part II

5b. Descriptive Statistics - Part II 5b. Descriptive Statistics - Part II In this lab we ll cover how you can calculate descriptive statistics that we discussed in class. We also learn how to summarize large multi-level databases efficiently,

More information

CSC 328/428 Summer Session I 2002 Data Analysis for the Experimenter FINAL EXAM

CSC 328/428 Summer Session I 2002 Data Analysis for the Experimenter FINAL EXAM options pagesize=53 linesize=76 pageno=1 nodate; proc format; value $stcktyp "1"="Growth" "2"="Combined" "3"="Income"; data invstmnt; input stcktyp $ perform; label stkctyp="type of Stock" perform="overall

More information

Creating a data file and entering data

Creating a data file and entering data 4 Creating a data file and entering data There are a number of stages in the process of setting up a data file and analysing the data. The flow chart shown on the next page outlines the main steps that

More information

Centering and Interactions: The Training Data

Centering and Interactions: The Training Data Centering and Interactions: The Training Data A random sample of 150 technical support workers were first given a test of their technical skill and knowledge, and then randomly assigned to one of three

More information

Choosing the Right Procedure

Choosing the Right Procedure 3 CHAPTER 1 Choosing the Right Procedure Functional Categories of Base SAS Procedures 3 Report Writing 3 Statistics 3 Utilities 4 Report-Writing Procedures 4 Statistical Procedures 6 Available Statistical

More information

Prepare a stem-and-leaf graph for the following data. In your final display, you should arrange the leaves for each stem in increasing order.

Prepare a stem-and-leaf graph for the following data. In your final display, you should arrange the leaves for each stem in increasing order. Chapter 2 2.1 Descriptive Statistics A stem-and-leaf graph, also called a stemplot, allows for a nice overview of quantitative data without losing information on individual observations. It can be a good

More information

Excel 2010 with XLSTAT

Excel 2010 with XLSTAT Excel 2010 with XLSTAT J E N N I F E R LE W I S PR I E S T L E Y, PH.D. Introduction to Excel 2010 with XLSTAT The layout for Excel 2010 is slightly different from the layout for Excel 2007. However, with

More information

Depending on the computer you find yourself in front of, here s what you ll need to do to open SPSS.

Depending on the computer you find yourself in front of, here s what you ll need to do to open SPSS. 1 SPSS 11.5 for Windows Introductory Assignment Material covered: Opening an existing SPSS data file, creating new data files, generating frequency distributions and descriptive statistics, obtaining printouts

More information

EXAMS IN THE GENESIS GRADEBOOK

EXAMS IN THE GENESIS GRADEBOOK EXAMS IN THE GENESIS GRADEBOOK I. Introduction to Exams in the Genesis Gradebook II. Steps to Grading Exams in Genesis III. Setting Up Exams A. Selecting the Averaging Method for an Exam B. Adding Sections

More information

Table of Contents (As covered from textbook)

Table of Contents (As covered from textbook) Table of Contents (As covered from textbook) Ch 1 Data and Decisions Ch 2 Displaying and Describing Categorical Data Ch 3 Displaying and Describing Quantitative Data Ch 4 Correlation and Linear Regression

More information

Averages and Variation

Averages and Variation Averages and Variation 3 Copyright Cengage Learning. All rights reserved. 3.1-1 Section 3.1 Measures of Central Tendency: Mode, Median, and Mean Copyright Cengage Learning. All rights reserved. 3.1-2 Focus

More information

Chapter 2. Descriptive Statistics: Organizing, Displaying and Summarizing Data

Chapter 2. Descriptive Statistics: Organizing, Displaying and Summarizing Data Chapter 2 Descriptive Statistics: Organizing, Displaying and Summarizing Data Objectives Student should be able to Organize data Tabulate data into frequency/relative frequency tables Display data graphically

More information

The Power and Sample Size Application

The Power and Sample Size Application Chapter 72 The Power and Sample Size Application Contents Overview: PSS Application.................................. 6148 SAS Power and Sample Size............................... 6148 Getting Started:

More information

Page 1. Graphical and Numerical Statistics

Page 1. Graphical and Numerical Statistics TOPIC: Description Statistics In this tutorial, we show how to use MINITAB to produce descriptive statistics, both graphical and numerical, for an existing MINITAB dataset. The example data come from Exercise

More information

WINKS SDA Windows KwikStat Statistical Data Analysis and Graphs Getting Started Guide

WINKS SDA Windows KwikStat Statistical Data Analysis and Graphs Getting Started Guide WINKS SDA Windows KwikStat Statistical Data Analysis and Graphs Getting Started Guide 2011 Version 6A Do these tutorials first This series of tutorials provides a quick start to using WINKS. Feel free

More information

CREATING THE DISTRIBUTION ANALYSIS

CREATING THE DISTRIBUTION ANALYSIS Chapter 12 Examining Distributions Chapter Table of Contents CREATING THE DISTRIBUTION ANALYSIS...176 BoxPlot...178 Histogram...180 Moments and Quantiles Tables...... 183 ADDING DENSITY ESTIMATES...184

More information

Introductory SAS example

Introductory SAS example Introductory SAS example STAT:5201 1 Introduction SAS is a command-driven statistical package; you enter statements in SAS s language, submit them to SAS, and get output. A fairly friendly user interface

More information

Minitab 17 commands Prepared by Jeffrey S. Simonoff

Minitab 17 commands Prepared by Jeffrey S. Simonoff Minitab 17 commands Prepared by Jeffrey S. Simonoff Data entry and manipulation To enter data by hand, click on the Worksheet window, and enter the values in as you would in any spreadsheet. To then save

More information

Stat 302 Statistical Software and Its Applications SAS: Data I/O

Stat 302 Statistical Software and Its Applications SAS: Data I/O Stat 302 Statistical Software and Its Applications SAS: Data I/O Yen-Chi Chen Department of Statistics, University of Washington Autumn 2016 1 / 33 Getting Data Files Get the following data sets from the

More information

Chapter 2 The SAS Environment

Chapter 2 The SAS Environment Chapter 2 The SAS Environment Abstract In this chapter, we begin to become familiar with the basic SAS working environment. We introduce the basic 3-screen layout, how to navigate the SAS Explorer window,

More information

Choosing the Right Procedure

Choosing the Right Procedure 3 CHAPTER 1 Choosing the Right Procedure Functional Categories of Base SAS Procedures 3 Report Writing 3 Statistics 3 Utilities 4 Report-Writing Procedures 4 Statistical Procedures 5 Efficiency Issues

More information

BIOSTATISTICS LABORATORY PART 1: INTRODUCTION TO DATA ANALYIS WITH STATA: EXPLORING AND SUMMARIZING DATA

BIOSTATISTICS LABORATORY PART 1: INTRODUCTION TO DATA ANALYIS WITH STATA: EXPLORING AND SUMMARIZING DATA BIOSTATISTICS LABORATORY PART 1: INTRODUCTION TO DATA ANALYIS WITH STATA: EXPLORING AND SUMMARIZING DATA Learning objectives: Getting data ready for analysis: 1) Learn several methods of exploring the

More information

Assignment 0. Nothing here to hand in

Assignment 0. Nothing here to hand in Assignment 0 Nothing here to hand in The questions here have solutions attached. Follow the solutions to see what to do, if you cannot otherwise guess. Though there is nothing here to hand in, it is very

More information

Exercise 1: Introduction to Stata

Exercise 1: Introduction to Stata Exercise 1: Introduction to Stata New Stata Commands use describe summarize stem graph box histogram log on, off exit New Stata Commands Downloading Data from the Web I recommend that you use Internet

More information

STATS PAD USER MANUAL

STATS PAD USER MANUAL STATS PAD USER MANUAL For Version 2.0 Manual Version 2.0 1 Table of Contents Basic Navigation! 3 Settings! 7 Entering Data! 7 Sharing Data! 8 Managing Files! 10 Running Tests! 11 Interpreting Output! 11

More information

SPSS Instructions and Guidelines PSCI 2300 Intro to Political Science Research Dr. Paul Hensel Last updated 10 March 2018

SPSS Instructions and Guidelines PSCI 2300 Intro to Political Science Research Dr. Paul Hensel Last updated 10 March 2018 SPSS Instructions and Guidelines PSCI 2300 Intro to Political Science Research Dr. Paul Hensel Last updated 10 March 2018 Table of Contents Introduction... 1 Accessing SPSS... 2 Possible Alternative: PSPP...

More information

An introduction to plotting data

An introduction to plotting data An introduction to plotting data Eric D. Black California Institute of Technology February 25, 2014 1 Introduction Plotting data is one of the essential skills every scientist must have. We use it on a

More information

CLAREMONT MCKENNA COLLEGE. Fletcher Jones Student Peer to Peer Technology Training Program. Basic Statistics using Stata

CLAREMONT MCKENNA COLLEGE. Fletcher Jones Student Peer to Peer Technology Training Program. Basic Statistics using Stata CLAREMONT MCKENNA COLLEGE Fletcher Jones Student Peer to Peer Technology Training Program Basic Statistics using Stata An Introduction to Stata A Comparison of Statistical Packages... 3 Opening Stata...

More information

TYPES OF VARIABLES, STRUCTURE OF DATASETS, AND BASIC STATA LAYOUT

TYPES OF VARIABLES, STRUCTURE OF DATASETS, AND BASIC STATA LAYOUT PRIMER FOR ACS OUTCOMES RESEARCH COURSE: TYPES OF VARIABLES, STRUCTURE OF DATASETS, AND BASIC STATA LAYOUT STEP 1: Install STATA statistical software. STEP 2: Read through this primer and complete the

More information

Excel Tips and FAQs - MS 2010

Excel Tips and FAQs - MS 2010 BIOL 211D Excel Tips and FAQs - MS 2010 Remember to save frequently! Part I. Managing and Summarizing Data NOTE IN EXCEL 2010, THERE ARE A NUMBER OF WAYS TO DO THE CORRECT THING! FAQ1: How do I sort my

More information

Index. Bar charts, 106 bartlett.test function, 159 Bottles dataset, 69 Box plots, 113

Index. Bar charts, 106 bartlett.test function, 159 Bottles dataset, 69 Box plots, 113 Index A Add-on packages information page, 186 187 Linux users, 191 Mac users, 189 mirror sites, 185 Windows users, 187 aggregate function, 62 Analysis of variance (ANOVA), 152 anova function, 152 as.data.frame

More information

Cluster Randomization Create Cluster Means Dataset

Cluster Randomization Create Cluster Means Dataset Chapter 270 Cluster Randomization Create Cluster Means Dataset Introduction A cluster randomization trial occurs when whole groups or clusters of individuals are treated together. Examples of such clusters

More information

Product Catalog. AcaStat. Software

Product Catalog. AcaStat. Software Product Catalog AcaStat Software AcaStat AcaStat is an inexpensive and easy-to-use data analysis tool. Easily create data files or import data from spreadsheets or delimited text files. Run crosstabulations,

More information

Chapter 2 Describing, Exploring, and Comparing Data

Chapter 2 Describing, Exploring, and Comparing Data Slide 1 Chapter 2 Describing, Exploring, and Comparing Data Slide 2 2-1 Overview 2-2 Frequency Distributions 2-3 Visualizing Data 2-4 Measures of Center 2-5 Measures of Variation 2-6 Measures of Relative

More information

Minitab Guide for MA330

Minitab Guide for MA330 Minitab Guide for MA330 The purpose of this guide is to show you how to use the Minitab statistical software to carry out the statistical procedures discussed in your textbook. The examples usually are

More information

DOING MORE WITH EXCEL: MICROSOFT OFFICE 2013

DOING MORE WITH EXCEL: MICROSOFT OFFICE 2013 DOING MORE WITH EXCEL: MICROSOFT OFFICE 2013 GETTING STARTED PAGE 02 Prerequisites What You Will Learn MORE TASKS IN MICROSOFT EXCEL PAGE 03 Cutting, Copying, and Pasting Data Basic Formulas Filling Data

More information

What s New in Spotfire DXP 1.1. Spotfire Product Management January 2007

What s New in Spotfire DXP 1.1. Spotfire Product Management January 2007 What s New in Spotfire DXP 1.1 Spotfire Product Management January 2007 Spotfire DXP Version 1.1 This document highlights the new capabilities planned for release in version 1.1 of Spotfire DXP. In this

More information

Applied Regression Modeling: A Business Approach

Applied Regression Modeling: A Business Approach i Applied Regression Modeling: A Business Approach Computer software help: SAS code SAS (originally Statistical Analysis Software) is a commercial statistical software package based on a powerful programming

More information

Repeated Measures Part 4: Blood Flow data

Repeated Measures Part 4: Blood Flow data Repeated Measures Part 4: Blood Flow data /* bloodflow.sas */ options linesize=79 pagesize=100 noovp formdlim='_'; title 'Two within-subjecs factors: Blood flow data (NWK p. 1181)'; proc format; value

More information

Applied Regression Modeling: A Business Approach

Applied Regression Modeling: A Business Approach i Applied Regression Modeling: A Business Approach Computer software help: SAS SAS (originally Statistical Analysis Software ) is a commercial statistical software package based on a powerful programming

More information

Factorial ANOVA with SAS

Factorial ANOVA with SAS Factorial ANOVA with SAS /* potato305.sas */ options linesize=79 noovp formdlim='_' ; title 'Rotten potatoes'; title2 ''; proc format; value tfmt 1 = 'Cool' 2 = 'Warm'; data spud; infile 'potato2.data'

More information

Data Analysis Guidelines

Data Analysis Guidelines Data Analysis Guidelines DESCRIPTIVE STATISTICS Standard Deviation Standard deviation is a calculated value that describes the variation (or spread) of values in a data set. It is calculated using a formula

More information

Lastly, in case you don t already know this, and don t have Excel on your computers, you can get it for free through IT s website under software.

Lastly, in case you don t already know this, and don t have Excel on your computers, you can get it for free through IT s website under software. Welcome to Basic Excel, presented by STEM Gateway as part of the Essential Academic Skills Enhancement, or EASE, workshop series. Before we begin, I want to make sure we are clear that this is by no means

More information

Statistical Good Practice Guidelines. 1. Introduction. Contents. SSC home Using Excel for Statistics - Tips and Warnings

Statistical Good Practice Guidelines. 1. Introduction. Contents. SSC home Using Excel for Statistics - Tips and Warnings Statistical Good Practice Guidelines SSC home Using Excel for Statistics - Tips and Warnings On-line version 2 - March 2001 This is one in a series of guides for research and support staff involved in

More information

Table Of Contents. Table Of Contents

Table Of Contents. Table Of Contents Statistics Table Of Contents Table Of Contents Basic Statistics... 7 Basic Statistics Overview... 7 Descriptive Statistics Available for Display or Storage... 8 Display Descriptive Statistics... 9 Store

More information

Enter your UID and password. Make sure you have popups allowed for this site.

Enter your UID and password. Make sure you have popups allowed for this site. Log onto: https://apps.csbs.utah.edu/ Enter your UID and password. Make sure you have popups allowed for this site. You may need to go to preferences (right most tab) and change your client to Java. I

More information

MHPE 494: Data Analysis. Welcome! The Analytic Process

MHPE 494: Data Analysis. Welcome! The Analytic Process MHPE 494: Data Analysis Alan Schwartz, PhD Department of Medical Education Memoona Hasnain,, MD, PhD, MHPE Department of Family Medicine College of Medicine University of Illinois at Chicago Welcome! Your

More information

SAS Training Spring 2006

SAS Training Spring 2006 SAS Training Spring 2006 Coxe/Maner/Aiken Introduction to SAS: This is what SAS looks like when you first open it: There is a Log window on top; this will let you know what SAS is doing and if SAS encountered

More information

CHAPTER 1. Introduction. Statistics: Statistics is the science of collecting, organizing, analyzing, presenting and interpreting data.

CHAPTER 1. Introduction. Statistics: Statistics is the science of collecting, organizing, analyzing, presenting and interpreting data. 1 CHAPTER 1 Introduction Statistics: Statistics is the science of collecting, organizing, analyzing, presenting and interpreting data. Variable: Any characteristic of a person or thing that can be expressed

More information

STATA 13 INTRODUCTION

STATA 13 INTRODUCTION STATA 13 INTRODUCTION Catherine McGowan & Elaine Williamson LONDON SCHOOL OF HYGIENE & TROPICAL MEDICINE DECEMBER 2013 0 CONTENTS INTRODUCTION... 1 Versions of STATA... 1 OPENING STATA... 1 THE STATA

More information

LAB #1: DESCRIPTIVE STATISTICS WITH R

LAB #1: DESCRIPTIVE STATISTICS WITH R NAVAL POSTGRADUATE SCHOOL LAB #1: DESCRIPTIVE STATISTICS WITH R Statistics (OA3102) Lab #1: Descriptive Statistics with R Goal: Introduce students to various R commands for descriptive statistics. Lab

More information

Multivariate Capability Analysis

Multivariate Capability Analysis Multivariate Capability Analysis Summary... 1 Data Input... 3 Analysis Summary... 4 Capability Plot... 5 Capability Indices... 6 Capability Ellipse... 7 Correlation Matrix... 8 Tests for Normality... 8

More information

Introduction to Statistical Analyses in SAS

Introduction to Statistical Analyses in SAS Introduction to Statistical Analyses in SAS Programming Workshop Presented by the Applied Statistics Lab Sarah Janse April 5, 2017 1 Introduction Today we will go over some basic statistical analyses in

More information

Chapter 3 - Displaying and Summarizing Quantitative Data

Chapter 3 - Displaying and Summarizing Quantitative Data Chapter 3 - Displaying and Summarizing Quantitative Data 3.1 Graphs for Quantitative Data (LABEL GRAPHS) August 25, 2014 Histogram (p. 44) - Graph that uses bars to represent different frequencies or relative

More information

Homework 1 Excel Basics

Homework 1 Excel Basics Homework 1 Excel Basics Excel is a software program that is used to organize information, perform calculations, and create visual displays of the information. When you start up Excel, you will see the

More information

SAS (Statistical Analysis Software/System)

SAS (Statistical Analysis Software/System) SAS (Statistical Analysis Software/System) SAS Analytics:- Class Room: Training Fee & Duration : 23K & 3 Months Online: Training Fee & Duration : 25K & 3 Months Learning SAS: Getting Started with SAS Basic

More information

SAS/STAT 13.1 User s Guide. The Power and Sample Size Application

SAS/STAT 13.1 User s Guide. The Power and Sample Size Application SAS/STAT 13.1 User s Guide The Power and Sample Size Application This document is an individual chapter from SAS/STAT 13.1 User s Guide. The correct bibliographic citation for the complete manual is as

More information

BIO 360: Vertebrate Physiology Lab 9: Graphing in Excel. Lab 9: Graphing: how, why, when, and what does it mean? Due 3/26

BIO 360: Vertebrate Physiology Lab 9: Graphing in Excel. Lab 9: Graphing: how, why, when, and what does it mean? Due 3/26 Lab 9: Graphing: how, why, when, and what does it mean? Due 3/26 INTRODUCTION Graphs are one of the most important aspects of data analysis and presentation of your of data. They are visual representations

More information

Using Large Data Sets Workbook Version A (MEI)

Using Large Data Sets Workbook Version A (MEI) Using Large Data Sets Workbook Version A (MEI) 1 Index Key Skills Page 3 Becoming familiar with the dataset Page 3 Sorting and filtering the dataset Page 4 Producing a table of summary statistics with

More information

StatCalc User Manual. Version 9 for Mac and Windows. Copyright 2018, AcaStat Software. All rights Reserved.

StatCalc User Manual. Version 9 for Mac and Windows. Copyright 2018, AcaStat Software. All rights Reserved. StatCalc User Manual Version 9 for Mac and Windows Copyright 2018, AcaStat Software. All rights Reserved. http://www.acastat.com Table of Contents Introduction... 4 Getting Help... 4 Uninstalling StatCalc...

More information

Assignment 5.5. Nothing here to hand in

Assignment 5.5. Nothing here to hand in Assignment 5.5 Nothing here to hand in Load the tidyverse before we start: library(tidyverse) ## Loading tidyverse: ggplot2 ## Loading tidyverse: tibble ## Loading tidyverse: tidyr ## Loading tidyverse:

More information

Brief Guide on Using SPSS 10.0

Brief Guide on Using SPSS 10.0 Brief Guide on Using SPSS 10.0 (Use student data, 22 cases, studentp.dat in Dr. Chang s Data Directory Page) (Page address: http://www.cis.ysu.edu/~chang/stat/) I. Processing File and Data To open a new

More information

2011 NAICC ARM 8 Introduction Training, Jan. 2011

2011 NAICC ARM 8 Introduction Training, Jan. 2011 2011 NAICC ARM 8 Introduction Training, Jan. 2011 General Overview of ARM Menu Choices 1) Help: a) F1, any Help button, or displays help on current Topic. b) F5 or on a study editor displays help about

More information

Within-Cases: Multivariate approach part one

Within-Cases: Multivariate approach part one Within-Cases: Multivariate approach part one /* sleep2.sas */ options linesize=79 noovp formdlim=' '; title "Student's Sleep data: Matched t-tests with proc reg"; data bedtime; infile 'studentsleep.data'

More information

Graphing on Excel. Open Excel (2013). The first screen you will see looks like this (it varies slightly, depending on the version):

Graphing on Excel. Open Excel (2013). The first screen you will see looks like this (it varies slightly, depending on the version): Graphing on Excel Open Excel (2013). The first screen you will see looks like this (it varies slightly, depending on the version): The first step is to organize your data in columns. Suppose you obtain

More information

Orientation Assignment for Statistics Software (nothing to hand in) Mary Parker,

Orientation Assignment for Statistics Software (nothing to hand in) Mary Parker, Orientation to MINITAB, Mary Parker, mparker@austincc.edu. Last updated 1/3/10. page 1 of Orientation Assignment for Statistics Software (nothing to hand in) Mary Parker, mparker@austincc.edu When you

More information

Research Methods for Business and Management. Session 8a- Analyzing Quantitative Data- using SPSS 16 Andre Samuel

Research Methods for Business and Management. Session 8a- Analyzing Quantitative Data- using SPSS 16 Andre Samuel Research Methods for Business and Management Session 8a- Analyzing Quantitative Data- using SPSS 16 Andre Samuel A Simple Example- Gym Purpose of Questionnaire- to determine the participants involvement

More information

Lecture 1 Getting Started with SAS

Lecture 1 Getting Started with SAS SAS for Data Management, Analysis, and Reporting Lecture 1 Getting Started with SAS Portions reproduced with permission of SAS Institute Inc., Cary, NC, USA Goals of the course To provide skills required

More information

Barchard Introduction to SPSS Marks

Barchard Introduction to SPSS Marks Barchard Introduction to SPSS 22.0 3 Marks Purpose The purpose of this assignment is to introduce you to SPSS, the most commonly used statistical package in the social sciences. You will create a new data

More information

Biostatistics & SAS programming. Kevin Zhang

Biostatistics & SAS programming. Kevin Zhang Biostatistics & SAS programming Kevin Zhang January 26, 2017 Biostat 1 Instructor Instructor: Dong Zhang (Kevin) Office: Ben Franklin Hall 227 Phone: 570-389-4556 Email: dzhang(at)bloomu.edu Class web:

More information

Nuts and Bolts Research Methods Symposium

Nuts and Bolts Research Methods Symposium Organizing Your Data Jenny Holcombe, PhD UT College of Medicine Nuts & Bolts Conference August 16, 3013 Topics to Discuss: Types of Variables Constructing a Variable Code Book Developing Excel Spreadsheets

More information

Statistics with a Hemacytometer

Statistics with a Hemacytometer Statistics with a Hemacytometer Overview This exercise incorporates several different statistical analyses. Data gathered from cell counts with a hemacytometer is used to explore frequency distributions

More information

Measures of Dispersion

Measures of Dispersion Measures of Dispersion 6-3 I Will... Find measures of dispersion of sets of data. Find standard deviation and analyze normal distribution. Day 1: Dispersion Vocabulary Measures of Variation (Dispersion

More information

Chapter 3: Data Description Calculate Mean, Median, Mode, Range, Variation, Standard Deviation, Quartiles, standard scores; construct Boxplots.

Chapter 3: Data Description Calculate Mean, Median, Mode, Range, Variation, Standard Deviation, Quartiles, standard scores; construct Boxplots. MINITAB Guide PREFACE Preface This guide is used as part of the Elementary Statistics class (Course Number 227) offered at Los Angeles Mission College. It is structured to follow the contents of the textbook

More information