Hello
I have a simple code for proc corr:
proc corr data=sasuser.sasfile190616;
var TAssets Sales ROA Q SalesGro RDSales LTassets;
by FF;
run
I want that this procedure will run only for these lines that FF=1. Where I have to add this condition?
Thanks a lot!
You can filter your data with a WHERE clause.
This can be placed in your code, I generally recommend it goes right after the PROC CORR statement.
WHERE FF=1;
The full code is below, but if you're running it for only one value of FF, then you don't need the BY statement. In general I find its best to include the BY as early as possible in the proc.
proc corr data=sasuser.sasfile190616;
Where FF=1;
by FF;
var TAssets Sales ROA Q SalesGro RDSales LTassets;
run
You can filter your data with a WHERE clause.
This can be placed in your code, I generally recommend it goes right after the PROC CORR statement.
WHERE FF=1;
The full code is below, but if you're running it for only one value of FF, then you don't need the BY statement. In general I find its best to include the BY as early as possible in the proc.
proc corr data=sasuser.sasfile190616;
Where FF=1;
by FF;
var TAssets Sales ROA Q SalesGro RDSales LTassets;
run
Thanks for your reply.
Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.
Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.