proc sort; by block strain; run; proc glimmix; class block strain; model NH4=strain/ dist=lognormal ; random block; lsmeans strain/pdiff adjust=nelson; ods exclude lsmeans diffs; ods output lsmeans=mmm diffs=ppp ; covtest 'Likelihood ratio: block var=0' 0 . /restart; covtest homogeneity / est restart; output out=second predicted=pred student=studentresid residual(noblup)=mresid student(noblup)=smresid residual=resid; run; %include 'pdmix800.sas'; %pdmix800(ppp,mmm,alpha=.05,sort=no); run; data second; set second; run; proc sgplot; scatter y=smresid x=strain; refline 0; proc sgscatter; plot studentresid*(pred strain block); proc sgplot; vbox studentresid / group=strain datalabel; proc univariate noprint; probplot studentresid/normal(mu=est sigma=est); proc univariate normal; var studentresid; histogram studentresid / normal kernel; proc sort; by studentresid; proc print; run;