Using SASstudio and I'm unsure how to extract data from certain variables so I can run uni/bivariate analyses on it. I've never worked with such a large file but it was a 7bdat file I imported to SASStudio and I can't figure out how to create a code that will run only using certain selected variables.
Certain variables? Most of the analysis procedures you would use either a VAR statement.
Proc univariate data=yourdatsetname; var thisvar thatvar othervarname; /* list the variables of interest*/ run;
It sort of depends what type of bivariate analysis you intend. Just counts with Proc Freq you place an * between two variables or groups of variables to do bivariate:
proc freq data=yourdataset; tables (thisvar thatvar anothervar)*(somevar someothervar somethingelse); run;
for example would pair each of the variables in the first set of parentheses with each in the second set.
Certain variables? Most of the analysis procedures you would use either a VAR statement.
Proc univariate data=yourdatsetname; var thisvar thatvar othervarname; /* list the variables of interest*/ run;
It sort of depends what type of bivariate analysis you intend. Just counts with Proc Freq you place an * between two variables or groups of variables to do bivariate:
proc freq data=yourdataset; tables (thisvar thatvar anothervar)*(somevar someothervar somethingelse); run;
for example would pair each of the variables in the first set of parentheses with each in the second set.
To use SAS datasets in program steps, you have two ways:.
The statistical procedures have statements in which you define the variables to use, e.g. the UNIVARIATE procedure.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.