dm log 'clear;output;clear' output; options pageno=1; /****************************** * * * Change the following line * * * ******************************/ %include "h:/970/970module.sas"; %include "h:/970/type1.sas"; /******************************* * Table 4.11 * * Searle (1971) * * Linear Models * *******************************/ data oil; input Source $ Refine $ proc n @@; do i=1 to n; input eff @@; output; end; cards; Texas Galv 1 4 31 33 44 36 Texas Galv 2 2 37 59 Texas New 2 1 39 Texas Sav 1 1 42 Ok Galv 1 1 38 Ok Galv 2 1 42 Ok New 2 1 36 Ok Sav 1 1 36 Ok Sav 2 2 42 46 Gulf Galv 1 1 26 Gulf New 1 1 42 Gulf New 2 2 32 38 Gulf Sav 2 1 26 Iran New 1 3 34 42 28 Iran Sav 1 1 22 Iran Sav 2 2 37 43 proc print; proc iml; load _ALL_; reset fw=5 fuzz; use Oil; read ALL; /*************************/ /* */ /* The Main Program */ /* */ /*************************/ y=eff; n=nrow(eff); rp=inter(Refine,Proc); sr=inter(Source,Refine); srp=inter(Source,rp); x= j(n,1)||Design(Refine) || Design(rp) || Design(Source) || Design(sr) || Design(srp); rnm="Int" ||levnam(Refine) || levnam(rp) || levnam(Source) || levnam(sr) || levnam(srp); snm=levnam(Source); xrp=j(n,1)||Design(Refine) || Design(rp) ; xs=Design(Source); es=type1(xrp,xs,x); print "Source I" es[rowname=rnm colname=snm]; run solut(eff,x,beta,cov,mse,ssn,dfm); print "Beta" beta[rowname=rnm]; print "MSE " mse; * Print "Cov " cov[rowname=rnm colname=rnm]; quit; proc mixed; class source refine proc; model eff=Refine|Proc(Refine)|Source/solution e1 e3 htype=1,3; run;