Assignment files
Developed by Lion Behrens and Rens van de Schoot
This tutorial expects:
- Basic knowledge of correlation and regression
- An installed version of SAS on your electronic device
This tutorial provides the reader with a basic introduction to the software package SAS. The reader will be guided through the investigation of basic data relations using correlations and through the process of conducting a multiple regression analysis in SAS.
Throughout this tutorial we will use a dataset from Van de Schoot, van der Velden, Boom & Brugman (2010). Using multiple regression, we will predict adolescents’ socially desirable answering patterns (sd) from overt (overt) and covert (covert) antisocial behaviour. For more information on the sample, instruments, methodology and research context we refer the interested reader to the paper (see references). Here we will focus on data-analysis only. The data set and syntax file can be found in the subfolders tilted 'Assignment Files' and ‘Solutions’.
Exercise 1 - Correlation and Multiple regression in SAS
In this exercise you will run a regression model with sd as outcome variable and overt and covert as predictors. You can find the data in the file popular_regr_1.xlsx. You can import the datafile using the commands
proc import out= popular.data
datafile= "C:\your working directory\popular_regr_1.xlsx"
dbms=excel replace; getnames=yes; datarow=2;
run;
Note: In many other "How to get started" exercises you will be asked to compare the results from here with results you can obtain e.g. in R or lavaan. Make sure to save or write down the results you found in this exercise.
Exercise 1a. Obtain pairwise correlations between the variables of interest with significance levels by running the following syntax:
proc corr data=data;
var sd overt covert;
run;
Simply copy-paste this line into your SAS syntax file and press Enter.
Question: What do the significance signs and magnitudes of the correlations tell you about the relationships between variables?
Exercise 1b. Run the multiple regression model described above by running the following syntax:
proc reg data=data;
model sd = overt covert;
run;
Question: What do you conclude from the regression coefficients? Include the significance and relevance (R2) of effects in your answer.
References
Van de Schoot, R., van der Velden, F., Boom, J. & Brugman, D. (2010). Can at Risk Young Adolescents be Popular and Antisocial? Sociometric Status Groups, AntiSocial Behavior, Gender and Ethnic Background. Journal of Adolescence, 33, 583-592.
Why don't you also get started with
MPLUS SPSS Lavaan RJAGS JASP
How to get started How to get started How to get started How to get started How to get started