option ls=76 nocenter; data bond; input ingot metal $ pres; datalines; 1 n 67.0 1 i 71.9 1 c 72.2 2 n 67.5 2 i 68.8 2 c 66.4 3 n 76.0 3 i 82.6 3 c 74.5 4 n 72.7 4 i 78.1 4 c 67.3 5 n 73.1 5 i 74.2 5 c 73.2 6 n 65.8 6 i 70.8 6 c 68.7 7 n 75.6 7 i 84.9 7 c 69.0 ; proc mixed data=bond; class ingot metal; model pres = metal / solution; random ingot; lsmeans metal / diff cl; estimate 'nickel mean' intercept 1 metal 0 0 1; estimate 'copper vs iron' metal 1 -1 0; contrast 'copper vs iron' metal 1 -1 0; /* extra outputs */ estimate 'overall mean' intercept 1 metal 0 0 0; estimate 'iron mean' intercept 1 metal 0 1 0; estimate 'copper mean' intercept 1 metal 1 0 0; estimate 'nickel mean' intercept 1 metal 0 0 1; run;