Hi,
E.g I have 3 variables:
No. of schools in a state
Ranking in state level
year
I want to find the no. of schools in the top 25 ranks that have occured more than 3 times.
I guess, I need to compare it against year. its easier to match against.
Any clue would be helpful.
Try with proc rank.
I tried this:
proc sort;
by group descending amount;
run;
data top3(drop=count);
set groups;
by group descending amount;
if first.group then count=0;
count+1;
if count le 3 then output;
run;
proc print;
run;
Also proc rank. Neither worked.
We're both guessing. Perhaps this is what you want:
proc freq data=have order=freq;
tables no_of_schools;
where (1 <= ranking <= 25);
run;
Thanks @Astounding.
When I run proc freq, it only gives me the name of the students with the frequencies. But does not show me the rank# against those and also I need only the ones that has occurred more than 3 times.
i,e in 2011 - 1
2016 -2
2015 - 5
or 2011 - 1
2013 - 1
2014 -1.
or 2011 - 4
could be anything
When you first posted the problem, the name of the student wasn't even mentioned as a variable. If it's important to the result, you will need to illustrate some of the data coming in, and what the report should look like.
Sincere apologies. It was name of students and not 'no.'
Here's what I am looking for :
THe name of the students featured in the top25 ranks of the schools that have occurred more than 3 times (i.e they have come in the top25 ranking for more than 3 times).
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.