Thanks Rick, please see the following codes, i can't make the froot function work. data d3lots; input Lot $ Time Result; datalines; A 0 0 A 3 0.06 A 6 0.08 A 9 0.11 A 12 0.13 A 18 0.21 A 24 0.21 A 36 0.34 B 0 0 B 3 0.05 B 6 0.08 B 9 0.11 B 12 0.11 B 18 0.19 B 24 0.2 B 36 0.31 C 0 0 C 3 0.05 C 6 0.08 C 9 0.11 C 12 0.11 C 18 0.2 C 24 0.22 C 36 0.43 ; run; ods trace on; proc glm data=d3lots; class Lot; model Result=Time Lot Time*Lot /e3 solution p clm inverse; ods output InvXPX=inv FitStatistics=rootmse; run; ods trace off; /* get x'x-1 matrix and betahat */ data inv(drop=Parameter Result) bhat(keep=Result); set inv; where Parameter ne 'Result'; run; /* get sigmahat */ data rtmse; set rootmse(keep=RootMSE); run; /* find the x value when 95% confidence interval of predicted mean cross the criteria Y value. */ proc iml; start Func(x); 0.3=x*bhat + tinv(0.975, 22)*sqrt(x*inv*x`); /*0.3 is the criteria. */ finish Func; interval = {25 36}; roots = froot( "Func", interval); print roots; quit;
... View more