07-27-2013 11:24 PM
By independently, I mean if I use proc rank to output 4 ranks based on Uvalue, I do not consider Svalue. And vice versus if I output based on Svalue.
After the two sorts are done,
I expect 4 ranks within each variable category. 4*4 =16 cells,
My goal is to test whether Dvalue differs significantly within each cell.
2. That is does Dvalue in (Quartile 1 based on Uvalue rank) is significantly different from Dvalue in Quartile 1 based on Dvalue rank.
I know how to single sort, but need your help with double sort, and save the output for T-test in part 2.
07-28-2013 12:15 AM
Proc RANK does its own sorting for each variable. You don't have to worry about it. So the answer to your first question is straightforward. The second question however isn't valid statistically as the two sets that you want to compare are not independent. I would simply look at the frequency and Dvalue mean for each combination of quartiles :
proc rank data=have out=haveQuart groups=4;
var Uvalue Svalue;
ranks Uquart Squart;
proc means data=haveQuart n mean nonobs printaltypes;
class Uquart Squart;