This example demonstrates the calculation of the LSMEANS, their standard errors, t-statistics, and associated p-values from the TDIFF and PDIFF options in the LSMEANS statement of PROC GLM. SAS code is provided that reproduces the output from the LSMEANS statement and illustrates a method to obtain the information in an output data set.
The LSMEANS are computed as L*β, where L is the hypothesis matrix, β is defined as ginv(X`X)*X`Y, and the standard error of L*β is defined as sqrt[L*ginv(X`X)*L`*σ2], where ginv is the generalized inverse and σ2 is estimated by the mean square error (MSE). The results generated by the PDIFF option are presented in a table that includes the p-values from testing the null hypotheses LSMEAN(i)=LSMEAN(j). The TDIFF option provides the associated t-statistics. The results of the PDIFF option in the LSMEANS statement can be reproduced by the CONTRAST statement or the ESTIMATE statement as shown below.
Multiple comparison testing of LSMEANS became available in SAS 6.10 with the addition of the ADJUST= option on the LSMEANS statement. Specifying the ADJUST= option with one of the following tests Bonferroni, Scheffe, Dunnett, Sidak, Simulate, SMM (or GT2), or Tukey will adjust the p-values for the multiple comparisons. If you specify the PDIFF option and omit the ADJUST= option, the default method is to analyze all pairwise comparisons using t-tests providing no p-value adjustment.
The OUTSTAT= data set in PROC GLM contains the results from the CONTRAST statement that uses the mean square error as the denominator. The OUTSTAT= data set does not contain the results from the ESTIMATE statement. Beginning in SAS 7, all SAS procedures use ODS (the Output Delivery System) which among other things allows the output of any table to a data set. Output of tables is accomplished via the ODS OUTPUT statement. See the "Using the Output Delivery System" chapter of the SAS/STAT User's Guide for more information.
In these statements:
ods output lsmeans=lsm diff=lsdiff estimates=estdiffs; proc glm data=test; class row col; model y=row|col; lsmeans row / stderr tdiff pdiff; estimate 'r1 lsmean' intercept 3 row 3 0 0 col 1 1 1 row*col 1 1 1 0 0 0 0 0 0/ divisor=3; estimate 'r2 lsmean' intercept 3 row 0 3 0 col 1 1 1 row*col 0 0 0 1 1 1 0 0 0/ divisor=3; estimate 'r3 lsmean' intercept 3 row 0 0 3 col 1 1 1 row*col 0 0 0 0 0 0 1 1 1/ divisor=3; estimate 'diff r1 vs r2' row 1 -1 0; estimate 'diff r1 vs r3' row 1 0 -1; estimate 'diff r2 vs r3' row 0 1 -1; run; quit;
the LSMEANS for the ROW effect are reproduced using the ESTIMATE statement. The abbreviated output below first shows the results from the LSMEANS statement for the ROW effect followed by the output from the ESTIMATE statements. The ODS OUTPUT statement creates a SAS data set named LSM containing the LSMEANS, a data set named LSDIFF containing the t-statistics and p-values comparing the LSMEANS, and a data set named ESTDIFFS containing the results from the ESTIMATE statements.
General Linear Models Procedure Least Squares Means ROW Y Std Err Pr > |T| LSMEAN LSMEAN LSMEAN H0:LSMEAN=0 Number 1 2.00000000 0.73960026 0.0181 1 2 4.33333333 0.65806416 0.0001 2 3 4.66666667 0.54433105 0.0001 3 T for H0: LSMEAN(i)=LSMEAN(j) / Pr > |T| i/j 1 2 3 1 . -2.35695 -2.90387 0.0348 0.0123 2 2.356954 . -0.39031 0.0348 0.7026 3 2.903865 0.390312 . 0.0123 0.7026 NOTE: To ensure overall protection level, only probabilities associated with pre-planned comparisons should be used. T for H0: Pr > |T| Std Error of Parameter Estimate Parameter=0 Estimate r1 lsmean 2.00000000 2.70 0.0181 0.73960026 r2 lsmean 4.33333333 6.58 0.0001 0.65806416 r3 lsmean 4.66666667 8.57 0.0001 0.54433105
Note that the values reported in the Estimate
, Pr > |T|
, and Std Error of Estimate
columns are identical to the preceding LSMEANS statement results which test the null hypothesis LSMEAN=0.
T for H0: Pr > |T| Std Error of Parameter Estimate Parameter=0 Estimate diff r1 vs r2 -2.33333333 -2.36 0.0348 0.98997827 diff r1 vs r3 -2.66666667 -2.90 0.0123 0.91831631 diff r2 vs r3 -0.33333333 -0.39 0.7026 0.85401682
The values in the Estimate
column are the differences of pairs of
LSMEANS (indicated in the Parameter
column). These values
also represent the numerator in the t-statistics given by the TDIFF
option.
The values in the T for H0: Parameter=0
and Pr > |T|
columns are identical to the t- and
p-values given by the TDIFF and PDIFF options in LSMEANS statement in
the preceding table.
The values in the Std Error of Estimate
column are the standard
errors for the LSMEAN differences. However, in the LSMEANS output the
Std Err LSMEAN
column gives the standard error of each row's LSMEAN
which is used for testing LSMEAN=0. It is not the standard error of the
difference of two rows' LSMEANS used by the PDIFF option to compare
LSMEANS.
For the following data set, suppose a model is fit including the row and column main effects and the row*column interaction.
2 (2) |
3 1 (2) |
2 2 (2) |
1 2 3 (2) |
5 2 8 5 (5) |
6 (6) |
1 2 2 3 (2) |
1 3 5 (3) |
9 9 (9) |
Cell means in the above table appear within parentheses and represent the LSMEANS for the ROW*COL effect. The following calculations are shown below:
The LSMEANS are computed as follows:
LSMEAN ROW1 = [(2) + (2) + (2)] / 3 = 2.00The TDIFF option computes a t statistic as follows for the Row i vs. Row i` difference:
where nc= number of cells in an LSMEAN. The standard error of the difference of the Row i and i` LSMEANS is the denominator of the t-statistic:
For these data, MSE=2.4615 and the error degrees of freedom (DF)=13. Then, for the Row1-Row2 difference:
The p-value for t=-2.35 and 13 error DF is 0.034. The following DATA step code calculates the p-value for the t-statistic.
data prob; r1r2=(1-probt(abs(-2.35695),13))*2; r1r3=(1-probt(abs(-2.90387),13))*2; r2r3=(1-probt(abs(-0.39031),13))*2; run; proc print; run;
The t statistic and associated p-value for the row1-row2 comparison appears in the 1,2 and 2,1 cells of the PDIFF table as shown below. The remaining parts of the PDIFF table can be calculated similarly.
Least Squares Means for Effect row t for H0: LSMean(i)=LSMean(j) / Pr > |t| Dependent Variable: y i/j 1 2 3 1 -2.35695 -2.90387 0.0348 0.0123 2 2.356954 -0.39031 0.0348 0.7026 3 2.903865 0.390312 0.0123 0.7026
For the example data set above, the following table shows the standard error computations for all differences of LSMEANS. Note that sqrt(MSE)=1.5689291.
LSMEAN Difference STDERR Computation ---------- ------------------------------------------------------------- ROW1-ROW2 .98997827 = (1.5689291/3) SQRT [(1/1+1/2+1/2)+(1/3+1/4+1/1)] ROW1-ROW3 .91831631 = (1.5689291/3) SQRT [(1/1+1/2+1/2)+(1/4+1/3+1/2)] ROW2-ROW3 .85401682 = (1.5689291/3) SQRT [(1/3+1/4+1/1)+(1/4+1/3+1/2)] COL1-COL2 .85401682 = (1.5689291/3) SQRT [(1/1+1/3+1/4)+(1/2+1/4+1/3)] COL1-COL3 .98997827 = (1.5689291/3) SQRT [(1/1+1/3+1/4)+(1/2+1/1+1/2)] COL2-COL3 .91831631 = (1.5689291/3) SQRT [(1/2+1/4+1/3)+(1/2+1/1+1/2)] R1C1-R1C2 1.92153785 = (1.5689291/1) SQRT [(1/1 + 1/2)] R1C1-R1C3 1.92153785 = (1.5689291/1) SQRT [(1/1 + 1/2)] R1C1-R2C1 1.81164325 = (1.5689291/1) SQRT [(1/1 + 1/3)] R1C1-R2C2 1.75411604 = (1.5689291/1) SQRT [(1/1 + 1/4)] R1C1-R2C3 2.21880078 = (1.5689291/1) SQRT [(1/1 + 1/1)] R1C1-R3C1 1.75411604 = (1.5689291/1) SQRT [(1/1 + 1/4)] R1C1-R3C2 1.81164325 = (1.5689291/1) SQRT [(1/1 + 1/3)] R1C1-R3C3 1.92153785 = (1.5689291/1) SQRT [(1/1 + 1/2)] R1C2-R1C3 1.56892908 = (1.5689291/1) SQRT [(1/2 + 1/2)] R1C2-R2C1 1.43222975 = (1.5689291/1) SQRT [(1/2 + 1/3)] R1C2-R2C2 1.35873244 = (1.5689291/1) SQRT [(1/2 + 1/4)] R1C2-R2C3 1.92153785 = (1.5689291/1) SQRT [(1/2 + 1/1)] R1C2-R3C1 1.35873244 = (1.5689291/1) SQRT [(1/2 + 1/4)] R1C2-R3C2 1.43222975 = (1.5689291/1) SQRT [(1/2 + 1/3)] R1C2-R3C3 1.56892908 = (1.5689291/1) SQRT [(1/2 + 1/2)] R1C3-R2C1 1.43222975 = (1.5689291/1) SQRT [(1/2 + 1/3)] R1C3-R2C2 1.35873244 = (1.5689291/1) SQRT [(1/2 + 1/4)] R1C3-R2C3 1.92153785 = (1.5689291/1) SQRT [(1/2 + 1/1)] R1C3-R3C1 1.35873244 = (1.5689291/1) SQRT [(1/2 + 1/4)] R1C3-R3C2 1.43222975 = (1.5689291/1) SQRT [(1/2 + 1/3)] R1C3-R3C3 1.56892908 = (1.5689291/1) SQRT [(1/2 + 1/2)] R2C1-R2C2 1.19828938 = (1.5689291/1) SQRT [(1/3 + 1/4)] R2C1-R2C3 1.81164325 = (1.5689291/1) SQRT [(1/3 + 1/1)] R2C1-R3C1 1.19828938 = (1.5689291/1) SQRT [(1/3 + 1/4)] R2C1-R3C2 1.28102523 = (1.5689291/1) SQRT [(1/3 + 1/3)] R2C1-R3C3 1.43222975 = (1.5689291/1) SQRT [(1/3 + 1/2)] R2C2-R2C3 1.75411604 = (1.5689291/1) SQRT [(1/4 + 1/1)] R2C2-R3C1 1.10940039 = (1.5689291/1) SQRT [(1/4 + 1/4)] R2C2-R3C2 1.19828938 = (1.5689291/1) SQRT [(1/4 + 1/3)] R2C2-R3C3 1.35873244 = (1.5689291/1) SQRT [(1/4 + 1/2)] R2C3-R3C1 1.75411604 = (1.5689291/1) SQRT [(1/1 + 1/4)] R2C3-R3C2 1.81164325 = (1.5689291/1) SQRT [(1/1 + 1/3)] R2C3-R3C3 1.92153785 = (1.5689291/1) SQRT [(1/1 + 1/2)] R3C1-R3C2 1.19828938 = (1.5689291/1) SQRT [(1/4 + 1/3)] R3C1-R3C3 1.35873244 = (1.5689291/1) SQRT [(1/4 + 1/2)] R3C2-R3C3 1.43222975 = (1.5689291/1) SQRT [(1/3 + 1/2)]
While it is not possible to cover all possible models, this methodology can be extended to the analysis of more complex designs.
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.
The following statements reproduce the results discussed in the
Details section.
data test;
input row col y;
cards;
1 1 2
1 2 1
1 2 3
1 3 2
1 3 2
2 1 1
2 1 2
2 1 3
2 2 5
2 2 2
2 2 8
2 2 5
2 3 6
3 1 1
3 1 2
3 1 2
3 1 3
3 2 1
3 2 3
3 2 5
3 3 9
3 3 9
;
proc glm data=test outstat=out;
class row col;
model y=row|col/ss3;
lsmeans row|col/stderr tdiff pdiff;
/************************************************/
/* The next 15 estimate statements reproduce */
/* the LSMEANS for the ROW COL ROW*COL effects */
/************************************************/
estimate 'r1 lsmean' intercept 3 row 3 0 0 col 1 1 1
row*col 1 1 1 0 0 0 0 0 0/ divisor=3;
estimate 'r2 lsmean' intercept 3 row 0 3 0 col 1 1 1
row*col 0 0 0 1 1 1 0 0 0/ divisor=3;
estimate 'r3 lsmean' intercept 3 row 0 0 3 col 1 1 1
row*col 0 0 0 0 0 0 1 1 1/ divisor=3;
estimate 'c1 lsmean' intercept 3 row 1 1 1 col 3 0 0
row*col 1 0 0 1 0 0 1 0 0/ divisor=3;
estimate 'c2 lsmean' intercept 3 row 1 1 1 col 0 3 0
row*col 0 1 0 0 1 0 0 1 0/ divisor=3;
estimate 'c3 lsmean' intercept 3 row 1 1 1 col 0 0 3
row*col 0 0 1 0 0 1 0 0 1/ divisor=3;
estimate 'r1c1 lsmean' intercept 1 row 1 0 0 col 1 0 0
row*col 1 0 0 0 0 0 0 0 0;
estimate 'r1c2 lsmean' intercept 1 row 1 0 0 col 0 1 0
row*col 0 1 0 0 0 0 0 0 0;
estimate 'r1c3 lsmean' intercept 1 row 1 0 0 col 0 0 1
row*col 0 0 1 0 0 0 0 0 0;
estimate 'r2c1 lsmean' intercept 1 row 0 1 0 col 1 0 0
row*col 0 0 0 1 0 0 0 0 0;
estimate 'r2c2 lsmean' intercept 1 row 0 1 0 col 0 1 0
row*col 0 0 0 0 1 0 0 0 0;
estimate 'r2c3 lsmean' intercept 1 row 0 1 0 col 0 0 1
row*col 0 0 0 0 0 1 0 0 0;
estimate 'r3c1 lsmean' intercept 1 row 0 0 1 col 1 0 0
row*col 0 0 0 0 0 0 1 0 0;
estimate 'r3c2 lsmean' intercept 1 row 0 0 1 col 0 1 0
row*col 0 0 0 0 0 0 0 1 0;
estimate 'r3c3 lsmean' intercept 1 row 0 0 1 col 0 0 1
row*col 0 0 0 0 0 0 0 0 1;
/**************************************************************/
/* The remaining ESTIMATE statements provide standard errors */
/* for the differences of LSMEANS for ROW COL ROW*COL. */
/* PROC GLM does not include std error difference on LSMEANS. */
/* The OUTSTAT= data set includes the results from the */
/* CONTRAST if MSE is the error. */
/**************************************************************/
estimate 'diff r1 vs r2' row 1 -1 0;
contrast 'pdiff pvalue r1 v r2' row 1 -1 0;
estimate 'diff r1 vs r3' row 1 0 -1;
contrast 'pdiff pvalue r1 v r3' row 1 0 -1;
estimate 'diff r2 vs r3' row 0 1 -1;
contrast 'pdiff pvalue r2 v r3' row 0 1 -1;
estimate 'diff c1 vs c2' col 1 -1 0;
estimate 'diff c1 vs c3' col 1 0 -1;
estimate 'diff c2 vs c2' col 0 1 -1;
/***************************************************************************/
/* The next 36 estimates statements provide the std error for differences */
/* of LSMEANS for each ROW*COL effect which is not provided in the LSMEANS */
/* output in PROC GLM. */
/***************************************************************************/
estimate 'diff r1c1 vs r1c2' col 1 -1 0 row*col 1 -1 0 0 0 0 0 0 0;
estimate 'diff r1c1 vs r1c3' col 1 0 -1 row*col 1 0 -1 0 0 0 0 0 0;
estimate 'diff r1c1 vs r2c1' row 1 -1 0 row*col 1 0 0 -1 0 0 0 0 0;
estimate 'diff r1c1 vs r2c2' row 1 -1 0 col 1 -1 0 row*col 1 0 0 0 -1 0 0 0 0;
estimate 'diff r1c1 vs r2c3' row 1 -1 0 col 1 0 -1 row*col 1 0 0 0 0 -1 0 0 0;
estimate 'diff r1c1 vs r3c1' row 1 0 -1 row*col 1 0 0 0 0 0 -1 0 0;
estimate 'diff r1c1 vs r3c2' row 1 0 -1 col 1 -1 0 row*col 1 0 0 0 0 0 0 -1 0;
estimate 'diff r1c1 vs r3c3' row 1 0 -1 col 1 0 -1 row*col 1 0 0 0 0 0 0 0 -1;
estimate 'diff r1c2 vs r1c3' col 0 1 -1 row*col 0 1 -1 0 0 0 0 0 0;
estimate 'diff r1c2 vs r2c1' row 1 -1 0 col -1 1 0 row*col 0 1 0 -1 0 0 0 0 0;
estimate 'diff r1c2 vs r2c2' row 1 -1 0 row*col 0 1 0 0 -1 0 0 0 0;
estimate 'diff r1c2 vs r2c3' row 1 -1 0 col 0 1 -1 row*col 0 1 0 0 0 -1 0 0 0;
estimate 'diff r1c2 vs r3c1' row 1 0 -1 col -1 1 0 row*col 0 1 0 0 0 0 -1 0 0;
estimate 'diff r1c2 vs r3c2' row 1 0 -1 row*col 0 1 0 0 0 0 0 -1 0;
estimate 'diff r1c2 vs r3c3' row 1 0 -1 col 0 1 -1 row*col 0 1 0 0 0 0 0 0 -1;
estimate 'diff r1c3 vs r2c1' row 1 -1 0 col -1 0 1 row*col 0 0 1 -1 0 0 0 0 0;
estimate 'diff r1c3 vs r2c2' row 1 -1 0 col 0 -1 1 row*col 0 0 1 0 -1 0 0 0 0;
estimate 'diff r1c3 vs r2c3' row 1 -1 0 row*col 0 0 1 0 0 -1 0 0 0;
estimate 'diff r1c3 vs r3c1' row 1 0 -1 col -1 0 1 row*col 0 0 1 0 0 0 -1 0 0;
estimate 'diff r1c3 vs r3c2' row 1 0 -1 col 0 -1 1 row*col 0 0 1 0 0 0 0 -1 0;
estimate 'diff r1c3 vs r3c3' row 1 0 -1 row*col 0 0 1 0 0 0 0 0 -1;
estimate 'diff r2c1 vs r2c2' col 1 -1 0 row*col 0 0 0 1 -1 0 0 0 0;
estimate 'diff r2c1 vs r2c3' col 1 0 -1 row*col 0 0 0 1 0 -1 0 0 0;
estimate 'diff r2c1 vs r3c1' row 0 1 -1 row*col 0 0 0 1 0 0 -1 0 0;
estimate 'diff r2c1 vs r3c2' row 0 1 -1 col 1 -1 0 row*col 0 0 0 1 0 0 0 -1 0;
estimate 'diff r2c1 vs r3c3' row 0 1 -1 col 1 0 -1 row*col 0 0 0 1 0 0 0 0 -1;
estimate 'diff r2c2 vs r2c3' col 0 1 -1 row*col 0 0 0 0 1 -1 0 0 0;
estimate 'diff r2c2 vs r3c1' row 0 1 -1 col -1 1 0 row*col 0 0 0 0 1 0 -1 0 0;
estimate 'diff r2c2 vs r3c2' row 0 1 -1 row*col 0 0 0 0 1 0 0 -1 0;
estimate 'diff r2c2 vs r3c3' row 0 1 -1 col 0 1 -1 row*col 0 0 0 0 1 0 0 0 -1;
estimate 'diff r2c3 vs r3c1' row 0 1 -1 col -1 0 1 row*col 0 0 0 0 0 1 -1 0 0;
estimate 'diff r2c3 vs r3c2' row 0 1 -1 col 0 -1 1 row*col 0 0 0 0 0 1 0 -1 0;
estimate 'diff r2c3 vs r3c3' row 0 1 -1 row*col 0 0 0 0 0 1 0 0 -1;
estimate 'diff r3c1 vs r3c2' col 1 -1 0 row*col 0 0 0 0 0 0 1 -1 0;
estimate 'diff r3c1 vs r3c3' col 1 0 -1 row*col 0 0 0 0 0 0 1 0 -1;
estimate 'diff r3c2 vs r3c3' col 0 1 -1 row*col 0 0 0 0 0 0 0 1 -1;
run;
data final; set out;
T=sqrt(F);
run;
proc print data=final label noobs;
label T = 'absolute t-stat ';
label PROB = 'PDIFF p-value';
where _TYPE_='CONTRAST';
var _SOURCE_ T PROB;
title 'Output Data Set containing DIFF results from LSMEANS';
run;
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.
Below are the results (slightly edited for brevity) from the statements in the Full Code section.
The SAS System General Linear Models Procedure Dependent Variable: Y Source DF Sum of Squares Mean Square F Value Pr > F Model 8 103.50000000 12.93750000 5.26 0.0043 Error 13 32.00000000 2.46153846 Corrected Total 21 135.50000000 R-Square C.V. Root MSE Y Mean 0.763838 44.82655 1.56892908 3.50000000 Source DF Type III SS Mean Square F Value Pr > F ROW 2 22.19113300 11.09556650 4.51 0.0326 COL 2 34.14384236 17.07192118 6.94 0.0089 ROW*COL 4 32.44115470 8.11028868 3.29 0.0451 Least Squares Means ROW Y Std Err Pr > |T| T for H0: LSMEAN(i)=LSMEAN(j) / Pr > |T| LSMEAN LSMEAN H0:LSMEAN=0 i/j 1 2 3 1 2.00000000 0.73960026 0.0181 1 . -2.35695 -2.90387 0.0348 0.0123 2 4.33333333 0.65806416 0.0001 2 2.356954 . -0.39031 0.0348 0.7026 3 4.66666667 0.54433105 0.0001 3 2.903865 0.390312 . 0.0123 0.7026 NOTE: To ensure overall protection level, only probabilities associated with pre-planned comparisons should be used. COL Y Std Err Pr > |T| T for H0: LSMEAN(i)=LSMEAN(j) / Pr > |T| LSMEAN LSMEAN H0:LSMEAN=0 i/j 1 2 3 1 2.00000000 0.65806416 0.0095 1 . -1.56125 -3.70378 0.1425 0.0027 2 3.33333333 0.54433105 0.0001 2 1.561249 . -2.54088 0.1425 0.0246 3 5.66666667 0.73960026 0.0001 3 3.703785 2.540882 . 0.0027 0.0246 NOTE: To ensure overall protection level, only probabilities associated with pre-planned comparisons should be used. ROW COL Y Std Err Pr > |T| LSMEAN LSMEAN LSMEAN H0:LSMEAN=0 Number 1 1 2.00000000 1.56892908 0.2247 1 1 2 2.00000000 1.10940039 0.0946 2 1 3 2.00000000 1.10940039 0.0946 3 2 1 2.00000000 0.90582163 0.0458 4 2 2 5.00000000 0.78446454 0.0001 5 2 3 6.00000000 1.56892908 0.0021 6 3 1 2.00000000 0.78446454 0.0242 7 3 2 3.00000000 0.90582163 0.0056 8 3 3 9.00000000 1.10940039 0.0001 9 [The ROW*COL PDIFF table is omitted from this listing for brevity.] Contrast DF Contrast SS Mean Square F Value Pr > F pdiff pvalue r1 v r2 1 13.67441860 13.67441860 5.56 0.0348 pdiff pvalue r1 v r3 1 20.75675676 20.75675676 8.43 0.0123 pdiff pvalue r2 v r3 1 0.37500000 0.37500000 0.15 0.7026 T for H0: Pr > |T| Std Error of Parameter Estimate Parameter=0 Estimate r1 lsmean 2.00000000 2.70 0.0181 0.73960026 r2 lsmean 4.33333333 6.58 0.0001 0.65806416 r3 lsmean 4.66666667 8.57 0.0001 0.54433105 c1 lsmean 2.00000000 3.04 0.0095 0.65806416 c2 lsmean 3.33333333 6.12 0.0001 0.54433105 c3 lsmean 5.66666667 7.66 0.0001 0.73960026 r1c1 lsmean 2.00000000 1.27 0.2247 1.56892908 r1c2 lsmean 2.00000000 1.80 0.0946 1.10940039 r1c3 lsmean 2.00000000 1.80 0.0946 1.10940039 r2c1 lsmean 2.00000000 2.21 0.0458 0.90582163 r2c2 lsmean 5.00000000 6.37 0.0001 0.78446454 r2c3 lsmean 6.00000000 3.82 0.0021 1.56892908 r3c1 lsmean 2.00000000 2.55 0.0242 0.78446454 r3c2 lsmean 3.00000000 3.31 0.0056 0.90582163 r3c3 lsmean 9.00000000 8.11 0.0001 1.10940039 diff r1 vs r2 -2.33333333 -2.36 0.0348 0.98997827 diff r1 vs r3 -2.66666667 -2.90 0.0123 0.91831631 diff r2 vs r3 -0.33333333 -0.39 0.7026 0.85401682 diff c1 vs c2 -1.33333333 -1.56 0.1425 0.85401682 diff c1 vs c3 -3.66666667 -3.70 0.0027 0.98997827 diff c2 vs c2 -2.33333333 -2.54 0.0246 0.91831631 diff r1c1 vs r1c2 0.00000000 0.00 1.0000 1.92153785 diff r1c1 vs r1c3 0.00000000 0.00 1.0000 1.92153785 diff r1c1 vs r2c1 -0.00000000 -0.00 1.0000 1.81164325 diff r1c1 vs r2c2 -3.00000000 -1.71 0.1110 1.75411604 diff r1c1 vs r2c3 -4.00000000 -1.80 0.0946 2.21880078 diff r1c1 vs r3c1 0.00000000 0.00 1.0000 1.75411604 diff r1c1 vs r3c2 -1.00000000 -0.55 0.5903 1.81164325 diff r1c1 vs r3c3 -7.00000000 -3.64 0.0030 1.92153785 diff r1c2 vs r1c3 0.00000000 0.00 1.0000 1.56892908 diff r1c2 vs r2c1 -0.00000000 -0.00 1.0000 1.43222975 diff r1c2 vs r2c2 -3.00000000 -2.21 0.0458 1.35873244 diff r1c2 vs r2c3 -4.00000000 -2.08 0.0577 1.92153785 diff r1c2 vs r3c1 0.00000000 0.00 1.0000 1.35873244 diff r1c2 vs r3c2 -1.00000000 -0.70 0.4973 1.43222975 diff r1c2 vs r3c3 -7.00000000 -4.46 0.0006 1.56892908 diff r1c3 vs r2c1 -0.00000000 -0.00 1.0000 1.43222975 diff r1c3 vs r2c2 -3.00000000 -2.21 0.0458 1.35873244 diff r1c3 vs r2c3 -4.00000000 -2.08 0.0577 1.92153785 diff r1c3 vs r3c1 0.00000000 0.00 1.0000 1.35873244 diff r1c3 vs r3c2 -1.00000000 -0.70 0.4973 1.43222975 diff r1c3 vs r3c3 -7.00000000 -4.46 0.0006 1.56892908 diff r2c1 vs r2c2 -3.00000000 -2.50 0.0264 1.19828938 diff r2c1 vs r2c3 -4.00000000 -2.21 0.0458 1.81164325 diff r2c1 vs r3c1 0.00000000 0.00 1.0000 1.19828938 diff r2c1 vs r3c2 -1.00000000 -0.78 0.4490 1.28102523 diff r2c1 vs r3c3 -7.00000000 -4.89 0.0003 1.43222975 diff r2c2 vs r2c3 -1.00000000 -0.57 0.5783 1.75411604 diff r2c2 vs r3c1 3.00000000 2.70 0.0181 1.10940039 diff r2c2 vs r3c2 2.00000000 1.67 0.1190 1.19828938 diff r2c2 vs r3c3 -4.00000000 -2.94 0.0114 1.35873244 diff r2c3 vs r3c1 4.00000000 2.28 0.0401 1.75411604 diff r2c3 vs r3c2 3.00000000 1.66 0.1217 1.81164325 diff r2c3 vs r3c3 -3.00000000 -1.56 0.1425 1.92153785 diff r3c1 vs r3c2 -1.00000000 -0.83 0.4191 1.19828938 diff r3c1 vs r3c3 -7.00000000 -5.15 0.0002 1.35873244 diff r3c2 vs r3c3 -6.00000000 -4.19 0.0011 1.43222975 Output Data Set containing DIFF results from LSMEANS absolute PDIFF _SOURCE_ t-stat p-value pdiff pvalue r1 v r2 2.35695 0.03477 pdiff pvalue r1 v r3 2.90387 0.01232 pdiff pvalue r2 v r3 0.39031 0.70263
Type: | Sample |
Topic: | Analytics ==> Regression Analytics ==> Analysis of Variance Analytics ==> Longitudinal Analysis SAS Reference ==> Procedures ==> GLM |
Date Modified: | 2016-06-01 15:09:34 |
Date Created: | 2005-01-13 15:02:45 |
Product Family | Product | Host | SAS Release | |
Starting | Ending | |||
SAS System | SAS/STAT | All | n/a | n/a |