Programming the statistical procedures from SAS

Quintiles and 'proc rank' persistence

Reply
Occasional Contributor
Posts: 12

Quintiles and 'proc rank' persistence

Hi,

I have data on exam results for 2 years for a number of students. I have a column with the year, the students name and the mark. Some students don't appear in year 2 because they don't sit the second exam. I want to show whether the performance of students persists or whether there's any pattern in their subsequent performance. I can split the data into two halves of equal size to account for the 'first-half' and 'second-half' marks. I can also split the first half into quintiles according to the exam results using 'proc rank'

I know the output I want is a 5 X 5 table that has the original 5 quintiles on one axis and the 5 subsequent quintiles plus a 'dropped out' category as well, so a 5 x 6 matrix. There will obviously be around 20% of the total number of students in each quintile in the first exam, and if there's no relationship there should be 16.67% in each of the 6 susequent categories. But I don't know how to proceed to show whether this is the case of not with this data.

How can I go about doing this in SAS, please? Could someone point me towards a good tutorial that would show how to set this up? I've been searching for terms like 'performance persistence' etc, but to no avail. . .

Thanks in advance.

Respected Advisor
Posts: 4,756

Re: Quintiles and 'proc rank' persistence

This is how you can get a quintile by quintile table :

data test;
do year= 2011, 2012;
     do student = 1 to 30;
          mark = 40 + floor(60*rand("UNIFORM"));
          if year=2011 or mod(student,6)>0 then output;
          end;
     end;
run;

proc sort data=test; by student year; run;

proc transpose data=test out=marks prefix=y_;
by student;
id year;
var mark;
run;

proc rank data=marks out=quints groups=5;
var y_:;
run;

proc freq data=quints;
table y_2011*y_2012 / missing;
run;

PG

PG
Ask a Question
Discussion stats
  • 1 reply
  • 275 views
  • 1 like
  • 2 in conversation