title 'Ancova, distinct X for each Y'; *-- Winer/Brown/Michaels p 833; data tab1036; input subj group $ x1 y1 x2 y2; datalines; 1 A1 3 8 4 14 2 A1 5 11 9 18 3 A1 11 16 14 22 4 A2 2 6 1 8 5 A2 8 12 9 14 6 A2 10 9 9 10 7 A3 7 10 4 10 8 A3 8 14 10 18 9 A3 9 15 12 22 ; *-- change to univariate format; data tab; set tab1036; drop x1 x2 y1 y2; x = x1; y = y1; b=1; output; x = x2; y = y2; b=2; output; proc glm data=tab; class group b subj; model y = x group b group*b subj(group); test h=group e=subj(group);