Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Creating and Using TYPE=CORR Data Sets in SAS for Correlation Analysis - Prof. Karl L. Wue, Exams of Psychology

How to create and use type=corr data sets in sas for correlation analysis. It covers the use of proc corr to generate correlation matrices from standard data sets and the benefits of using type=corr data sets for further analysis. The document also demonstrates how to create a type=corr data set from a correlation matrix and use it in multiple regression analyses.

Typology: Exams

Pre 2010

Uploaded on 07/30/2009

koofers-user-li6-1
koofers-user-li6-1 🇺🇸

10 documents

1 / 2

Toggle sidebar

Related documents


Partial preview of the text

Download Creating and Using TYPE=CORR Data Sets in SAS for Correlation Analysis - Prof. Karl L. Wue and more Exams Psychology in PDF only on Docsity! TYPE=CORR Data Sets in SAS There are several special types of data sets available in SAS. One of these is the TYPE=CORR data set. A TYPE=CORR data set may be created from a standard data set by using PROC CORR. Here is an example using my gradebook from PSYC 6430 (December, 1996): PROC CORR NOMISS DATA=KLW OUTP=SOL; VAR CLASSWRK MIDTERM FINAL_EX; PROC PRINT; (The PROC PRINT output follows:) OBS _TYPE_ _NAME_ CLASSWRK MIDTERM FINAL_EX 1 MEAN 94.5333 87.4000 89.0000 2 STD 5.4493 7.7993 9.3121 3 N 15.0000 15.0000 15.0000 4 CORR CLASSWRK 1.0000 0.6585 0.7615 5 CORR MIDTERM 0.6585 1.0000 0.5557 6 CORR FINAL_EX 0.7615 0.5557 1.0000 The first line in the resulting TYPE=CORR data set would has the automatic variable _TYPE_ = “MEAN” and variables classwrk, midterm, and final_ex have values equal to the means of those variables. The second line has _TYPE_ = “STD” and classwrk, midterm, and final_ex equal to the standard deviations of those variables. The third has_TYPE_ = “N” and classwrk, midterm, and final_ex equal to sample sizes. The next three lines contain the correlation matrix. Line 4 has _TYPE_ = “CORR”, _NAME_ = “CLASSWRK”, and classwrk, midterm, and final_ex equal to r11, r12, and r13. Lines 5 and 6 complete the correlation matrix, with approriate changes in the _NAME_ for each “observation.” Many SAS procedures compute the correlation matrix (or something very close to it) as the first step in their data analysis. Often this is the most computationally expensive part of the procedure. If you are working with very large data sets, you can save processing time by inputting the correlation matrix rather than the raw data. For example, I want first to obtain all the bivariate correlations for variables X1 - X50 and then I want to do several multiple regressions involving these variables. I first use PROC CORR to get the correlations from the raw data and to output the TYPE=CORR data set. I then use the TYPE=CORR data set as the input data set for the multiple regression analyses. You can save the output correlation file in a SAS system file by giving it a two level name, for example, “outp=duh.sol” -- “duh” would first have to defined as a SAS library -- a SAS library is a pointer to a location where SAS files are stored. A saved SAS data file is brought back in to SAS with the SET command. When using PROC CORR to output a type=corr data set, you will generally need to use the NOMISS option in PROC CORR, which results in the deletion of data from any subject that is missing data on any of the variables. This is highly recommended if  Copyright 2008, Karl L. Wuensch, All Rights Reserved Type=Corr.doc
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved