*NKNW768.sas, weighted least squares using data in Table 18.2; options nocenter; data a1; infile 'u:\.www\datasets512\CH18TA02.DAT'; input strength type; proc print data=a1; run; proc means data=a1; var strength; by type; output out=a2 var=s2; data a2; set a2; wt=1/s2; data a3; merge a1 a2; by type; proc glm data=a3; class type; model strength=type; weight wt; run;