options nocenter ps=65 ls=80; title1 'Increasing Variance Example'; data one; infile 'c:\saswork\data\boxcox.dat'; input trt resp; proc glm data=one; class trt; model resp=trt; output out=diag p=pred r=res; title1 'Residual Plot'; symbol1 v=circle i=none; proc gplot data=diag; plot res*pred /frame; /* This computes the sample mean (mu) and standard deviation (sigma) at each treatment level and outputs this information to SAS file "two" */ proc univariate data=one noprint; var resp; by trt; output out=two mean=mu std=sigma; /* This creates a new SAS data set "three" which contains the natural logs of both the sample means and standard deviations */ data three; set two; logmu = log(mu); logsig = log(sigma); /* Perform a regression analysis on these log transformed values */ proc reg; model logsig = logmu; title1 'Mean vs Std Dev'; symbol1 v=circle i=rl; proc gplot; plot logsig*logmu; run;