containing Kendall correlations; and the OUTH = option will create a data set containing Hoeffding statistics.



Similar documents
We are often interested in the relationship between two variables. Do people with more years of full-time education earn higher salaries?

The CORR Procedure. Overview CHAPTER 12

5. Correlation. Open HeightWeight.sav. Take a moment to review the data file.

Point Biserial Correlation Tests

Section 3 Part 1. Relationships between two numerical variables

Chapter 7: Simple linear regression Learning Objectives

Module 5: Statistical Analysis

X X X a) perfect linear correlation b) no correlation c) positive correlation (r = 1) (r = 0) (0 < r < 1)

Directions for using SPSS

The correlation coefficient

Chapter 12 Nonparametric Tests. Chapter Table of Contents

Correlation Coefficient The correlation coefficient is a summary statistic that describes the linear relationship between two numerical variables 2

Graphing Linear Equations

What does the number m in y = mx + b measure? To find out, suppose (x 1, y 1 ) and (x 2, y 2 ) are two points on the graph of y = mx + b.

Linear Models in STATA and ANOVA

COMPARISONS OF CUSTOMER LOYALTY: PUBLIC & PRIVATE INSURANCE COMPANIES.

Projects Involving Statistics (& SPSS)

Basic Statistics and Data Analysis for Health Researchers from Foreign Countries

Statistical tests for SPSS

Paper DV KEYWORDS: SAS, R, Statistics, Data visualization, Monte Carlo simulation, Pseudo- random numbers

Relationships Between Two Variables: Scatterplots and Correlation

An introduction to IBM SPSS Statistics

PLOTTING DATA AND INTERPRETING GRAPHS

Chapter 5 Analysis of variance SPSS Analysis of variance

SAS/STAT. 9.2 User s Guide. Introduction to. Nonparametric Analysis. (Book Excerpt) SAS Documentation

5 Correlation and Data Exploration

Using Excel for inferential statistics

Describing Relationships between Two Variables

SIMPLE LINEAR CORRELATION. r can range from -1 to 1, and is independent of units of measurement. Correlation can be done on two dependent variables.

Data Visualization. BUS 230: Business and Economic Research and Communication

The Dummy s Guide to Data Analysis Using SPSS

There are six different windows that can be opened when using SPSS. The following will give a description of each of them.

Grade level: secondary Subject: mathematics Time required: 45 to 90 minutes

Basic Statistical and Modeling Procedures Using SAS

DATA ANALYSIS. QEM Network HBCU-UP Fundamentals of Education Research Workshop Gerunda B. Hughes, Ph.D. Howard University

II. DISTRIBUTIONS distribution normal distribution. standard scores

SPSS Tests for Versions 9 to 13

Scientific Graphing in Excel 2010

Plot the following two points on a graph and draw the line that passes through those two points. Find the rise, run and slope of that line.

PEARSON R CORRELATION COEFFICIENT

Chapter 13 Introduction to Linear Regression and Correlation Analysis

2.5 Transformations of Functions

SPSS Explore procedure

Homework 11. Part 1. Name: Score: / null

Course Objective This course is designed to give you a basic understanding of how to run regressions in SPSS.

1.3 LINEAR EQUATIONS IN TWO VARIABLES. Copyright Cengage Learning. All rights reserved.

by the matrix A results in a vector which is a reflection of the given


Descriptive Statistics

NCSS Statistical Software Principal Components Regression. In ordinary least squares, the regression coefficients are estimated using the formula ( )

Curve Fitting, Loglog Plots, and Semilog Plots 1

Data exploration with Microsoft Excel: analysing more than one variable

UNDERSTANDING THE TWO-WAY ANOVA

SPSS Resources. 1. See website (readings) for SPSS tutorial & Stats handout

Copyright 2007 by Laura Schultz. All rights reserved. Page 1 of 5

Visualizing Data. Contents. 1 Visualizing Data. Anthony Tanbakuchi Department of Mathematics Pima Community College. Introductory Statistics Lectures

UNIVERSITY OF NAIROBI

Introduction to Quantitative Methods

Exercise 1.12 (Pg )

MULTIPLE REGRESSION EXAMPLE

Part 1: Background - Graphing

Pearson's Correlation Tests

FACTOR ANALYSIS. Factor Analysis is similar to PCA in that it is a technique for studying the interrelationships among variables.

Descriptive Statistics Categorical Variables

Calibration and Linear Regression Analysis: A Self-Guided Tutorial

Basics of STATA. 1 Data les. 2 Loading data into STATA

Vector Notation: AB represents the vector from point A to point B on a graph. The vector can be computed by B A.

Additional sources Compilation of sources:

Introduction Course in SPSS - Evening 1

Module 3: Correlation and Covariance

Graphing in SAS Software

THE COST OF COLLEGE EDUCATION PROJECT PACKET

Figure 1. An embedded chart on a worksheet.

Chapter 7 Factor Analysis SPSS

DESCRIPTIVE STATISTICS. The purpose of statistics is to condense raw data to make it easier to answer specific questions; test hypotheses.

Describing, Exploring, and Comparing Data

CORRELATIONAL ANALYSIS: PEARSON S r Purpose of correlational analysis The purpose of performing a correlational analysis: To discover whether there

Simple Predictive Analytics Curtis Seare

CHAPTER 1 Linear Equations

Formula for linear models. Prediction, extrapolation, significance test against zero slope.

Overview of Non-Parametric Statistics PRESENTER: ELAINE EISENBEISZ OWNER AND PRINCIPAL, OMEGA STATISTICS

January 26, 2009 The Faculty Center for Teaching and Learning

Outline. Topic 4 - Analysis of Variance Approach to Regression. Partitioning Sums of Squares. Total Sum of Squares. Partitioning sums of squares

MSLC Workshop Series Math Workshop: Polynomial & Rational Functions

Simple Linear Regression Inference

Once saved, if the file was zipped you will need to unzip it. For the files that I will be posting you need to change the preferences.

Graphing Quadratic Functions

11. Analysis of Case-control Studies Logistic Regression

Graphing Linear Equations in Two Variables

Canonical Correlation Analysis

A Framework for Analyses with Numeric and Categorical Dependent Variables. An Exercise in Using GLM. Analyses with Categorical Dependent Variables

Lecture 11: Chapter 5, Section 3 Relationships between Two Quantitative Variables; Correlation

Psyc 250 Statistics & Experimental Design. Correlation Exercise

Confidence Intervals for Spearman s Rank Correlation

Lecture 8 : Coordinate Geometry. The coordinate plane The points on a line can be referenced if we choose an origin and a unit of 20

EXST SAS Lab Lab #4: Data input and dataset modifications

Question 2: How do you solve a matrix equation using the matrix inverse?

3.3. Solving Polynomial Equations. Introduction. Prerequisites. Learning Outcomes

2. Simple Linear Regression

Transcription:

Getting Correlations Using PROC CORR Correlation analysis provides a method to measure the strength of a linear relationship between two numeric variables. PROC CORR can be used to compute Pearson product-moment correlation coefficient between variables, as well as three nonparametric measures of association, Spearman's rank-order correlation, Kendall's tau-b, and Hoeffding's measure of dependence D. PROC CORR also computes simple descriptive statistics. The general form of the PROC CORR statement is PROC CORR options The simplest form PROC CORR will compute pairwise Pearson correlation coefficients for all numeric variables in the most recently created SAS data set. Allowable options in the PROC CORR statement include the DATA= option, as well as options to produce an output data set. The OUTP = option will create a data set containing Pearson correlations the OUTS = option will create a data set containing Spearman correlations the OUTK = option will create a data set containing Kendall correlations and the OUTH = option will create a data set containing Hoeffding statistics. Options to select the kinds of correlations to be computed include PEARSON (these are computed by default), KENDALL, SPEARMAN, and HOEFFDING. A VAR statement can be used with PROC CORR to specify which variables are to be analyzed. Pairwise correlation coefficients will be computed for all variables in the VAR statement. For example, 1

PROC CORR DATA= example1 PEARSON SPEARMAN VAR weight height PROC CORR also computes probabilities to test the null hypothesis H 0 : ρ=0. If three or more numeric variables are in the input data set or are specified in the VAR statement, the correlations and probabilities are printed in matrix form. The WITH statement can be used to obtain correlations for specific combinations of variables. Suppose you wish to compute a correlation for age with height, and another for age with weight, but you are not interested in a correlation of weight with height. You can accomplish this by using the WITH statement in conjunction with the VAR statement as follows: PROC CORR DATA= example1 PEARSON SPEARMAN VAR weight height WITH age A BY statement can be used with PROC CORR to obtain separate analyses on observations in the groups defined by the BY statement. When a BY statement is used, PROC CORR expects the data to be sorted in the order specified in the BY statement. As an example suppose that you want separate analyses for males and females. A SAS program to accomplish this follows: SAS programming statements go here PROC SORT DATA = example1 PROC CORR DATA=example1 2

PROC CORR DATA= example1 VAR height weight age The default method for handling missing values is to use all nonmissing pairs of values for each pair of variables in the VAR or WITH statements. This implies that differing numbers of observations may be used to compute correlation coefficients for different pairs of variables. If the NOMISS option is used in the PROC CORR statement, any observations with missing values for any of the variables in the VAR or WITH statements are excluded from the analysis, i.e., all pairwise correlations are computed using the same number of observations. Exercise 8: Use one of your previous examples and compute pairwise correlations for all numeric variables. Run another analysis using a VAR and a WITH statement. Next run another analysis using a BY statement. Interpret the results. Producing Graphs Using PROC PLOT PROC PLOT can be used to generate a graph of the values of one variable plotted against values of another variable. The general form of the PROC PLOT statement is PROC PLOT options The simplest form is PROC PLOT Allowable options include the DATA= option. Another useful option is the UNIFORM option. This option requests uniform axes scaling when a BY statement is used. This allows you to easily compare plots for different levels of the BY variables. 3

You can ask PROC PLOT to construct and print plots for specified variables in the data set by using the PLOT statement. Any number of PLOT statements may be included in one execution of PROC PLOT. The PLOT statement has the form PLOT requests / options The requests in the PLOT statement indicate the variables to be plotted and the plotting characters to be used to mark points on the plot. The first variable in a request will be represented on the vertical axis (y-axis) and the second variable in the request will be represented by the horizontal axis (xaxis). The plot requests can have the form var1 * var2 When this form is used, SAS determines the plotting character to be used to mark points on the plot. When a point on the plot represents one observation PROC PLOT uses the plotting character A to mark that point when a point on the plot represents two observations PROC PLOT uses the plotting character B to mark that point and so on. Plot requests may also have the form var1 * var2 = 'character' This form allows the user to specify the plotting character to be used to mark points on the plot. The character you choose can represent values form one observation, or more than one observation. As an example, PROC PLOT PLOT weight * height = '*' The third form that a plot request may have is var1 * var2 = var3 This form specifies that points on the plot of var1 * var2 will be indicated by the value of var3. As an example, suppose that the variable sex has the values 'F' or 'M'. Then the statements 4

PROC PLOT PLOT weight * height = sex Will cause the points on the plot to be marked with either an F or an M. Any number of plot requests can appear in a single PLOT statement. The plots will appear on separate graphs unless the OVERLAY option is specified in the PLOT statement. The OVERLAY tells PROC PLOT to print the plot requests specified in the PLOT statement on a single graph. This can be useful for plots in a regression analysis. If values of any of the variables in a plot request are missing, PROC PLOT does not include the observation in the plot. A BY statement can be used with PROC PLOT to obtain separate plots on observations in groups defined by the BY variable(s). When a BY statement appears, PROC PLOT expects the data to be sorted in the order of the BY variables. Now for a full-blown example: SAS programming statements go here PROC SORT DATA = example1 PROC PLOT DATA=example1 PLOT weight * height = sex height *age weight*age PROC PLOT DATA= example1 PLOT age* height ='H' age*weight ='W' / OVERLAY 5