options nodate ps=54 ls=76; data ex0604; * infile '../../../data/biostat/ex0604.dat'; infile 'C:\biostat\data\theoph.dat'; input subj formu tmax; length fformu $8.; if formu=1 then fformu='cap_f'; if formu=2 then fformu='cap_nf'; if formu=3 then fformu='entct_f'; run; /* Sort data by subject */ proc sort; by subj; run; /* Get ranks of formulations by subject and output the dataset */ proc rank out=rankex0603; var tmax; ranks ranktmax; by subj; run; /* Get an F-approximation to Friedman's chi-square by running RBD on ranks */ /* Note that the formulation sum of squares is the same as Friedman's test statistic */ proc glm; class fformu subj; model ranktmax = fformu subj; run; quit;