/* sandm9.sas */ /* analysis of sandm7.r output */ /* */ /* three methods, two param ests, */ /* conv codes, sigma-sq-a */ options ls=80 ; data a ; infile 'estsP4.dat' ; * read data ; keep sqere sqera method siga batch ; input a1 a2 m1 m2 r1 r2 cm cr siga ; rep = mod(_n_-1,1000) ; batch = int(rep/20) ; * 50 batches of 20 ; /* make 3 obs from each -- bs & i */ method = 'anova' ; sqere = (a1-1)**2 ; sqera = (a2-siga)**2 ; output ; method= 'ml' ; sqere = (m1-1)**2 ; sqera = (m2-siga)**2 ; output ; method = 'reml' ; sqere = (r1-1)**2 ; sqera = (r2-siga)**2 ; output ; run ; /* get batch means */ /* nway noprint*/ proc means data=a mean nway noprint ; class batch method siga ; var sqere sqera ; output out=b mean= ; * output ds with sqere sqera ; run ; /* print a few */ proc print data=b (obs=10) ; title 'batch means' ; run ; /* analyze to compare mse */ /* means & stdev of estimators */ proc glm data=b ; class method siga batch ; model sqera = method siga method*siga batch(siga) ; random batch(siga) ; lsmeans method siga / pdiff ; title 'Analysis of MSE' ; run ; batch means 1 15:44 Thursday, November 12, 2009 Obs batch method siga _TYPE_ _FREQ_ sqere sqera 1 0 anova 0.0 7 20 0.11186 0.02721 2 0 anova 0.1 7 20 0.07363 0.05910 3 0 anova 0.2 7 20 0.09320 0.08140 4 0 anova 0.5 7 20 0.04800 0.22450 5 0 anova 1.0 7 20 0.07827 0.62537 6 0 anova 2.0 7 20 0.07886 1.24835 7 0 anova 5.0 7 20 0.06136 6.89187 8 0 ml 0.0 7 20 0.08016 0.01561 9 0 ml 0.1 7 20 0.06209 0.03484 10 0 ml 0.2 7 20 0.08166 0.03855 Analysis of MSE 2 The GLM Procedure Class Level Information Class Levels Values method 3 anova ml reml siga 7 0 0.1 0.2 0.5 1 2 5 batch 50 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 Number of Observations Read 1050 Number of Observations Used 1050 Analysis of MSE 3 The GLM Procedure Dependent Variable: sqera Sum of Source DF Squares Mean Square F Value Pr > F Model 363 15642.18098 43.09141 65.30 <.0001 Error 686 452.67036 0.65987 Corrected Total 1049 16094.85134 R-Square Coeff Var Root MSE sqera Mean 0.971875 44.36622 0.812323 1.830950 Source DF Type I SS Mean Square F Value Pr > F method 2 78.17069 39.08535 59.23 <.0001 siga 6 12523.63696 2087.27283 3163.16 <.0001 method*siga 12 261.81222 21.81769 33.06 <.0001 batch(siga) 343 2778.56110 8.10076 12.28 <.0001 Source DF Type III SS Mean Square F Value Pr > F method 2 78.17069 39.08535 59.23 <.0001 siga 6 12523.63696 2087.27283 3163.16 <.0001 method*siga 12 261.81222 21.81769 33.06 <.0001 batch(siga) 343 2778.56110 8.10076 12.28 <.0001 Analysis of MSE 4 The GLM Procedure Source Type III Expected Mean Square method Var(Error) + Q(method,method*siga) siga Var(Error) + 3 Var(batch(siga)) + Q(siga,method*siga) method*siga Var(Error) + Q(method*siga) batch(siga) Var(Error) + 3 Var(batch(siga)) Analysis of MSE 5 The GLM Procedure Least Squares Means LSMEAN method sqera LSMEAN Number anova 2.06628196 1 ml 1.44845108 2 reml 1.97811754 3 Least Squares Means for effect method Pr > |t| for H0: LSMean(i)=LSMean(j) Dependent Variable: sqera i/j 1 2 3 1 <.0001 0.1515 2 <.0001 <.0001 3 0.1515 <.0001 NOTE: To ensure overall protection level, only probabilities associated with pre-planned comparisons should be used. LSMEAN siga sqera LSMEAN Number 0 0.0136266 1 0.1 0.0294600 2 0.2 0.0496857 3 0.5 0.1796568 4 1 0.5546209 5 2 1.8271340 6 5 10.1624673 7 Least Squares Means for effect siga Pr > |t| for H0: LSMean(i)=LSMean(j) Dependent Variable: sqera i/j 1 2 3 4 5 6 7 1 0.8660 0.7008 0.0772 <.0001 <.0001 <.0001 2 0.8660 0.8293 0.1098 <.0001 <.0001 <.0001 3 0.7008 0.8293 0.1663 <.0001 <.0001 <.0001 4 0.0772 0.1098 0.1663 <.0001 <.0001 <.0001 5 <.0001 <.0001 <.0001 <.0001 <.0001 <.0001 6 <.0001 <.0001 <.0001 <.0001 <.0001 <.0001 7 <.0001 <.0001 <.0001 <.0001 <.0001 <.0001 NOTE: To ensure overall protection level, only probabilities associated with pre-planned comparisons should be used.