SAS COMMANDS FOR CRD WITH SAMPLING
options linesize=72;
data crdsamp;
input trt rep sample cwt;
*COMMENT: Each experimental unit will be
entered on its own line;
cards;
8 1 1 3.5
8 1 2 4.0
8 1 3 3.0
8 1 4 4.5
8 2 1 2.5
8 2 2 4.5
8 2 3 5.5
8 2 4 5.0
8 3 1 3.0
8 3 2 3.0
8 3 3 2.5
8 3 4 3.0
12 1 1 5.0
12 1 2 5.5
12 1 3 4.0
12 1 4 3.5
12 2 1 3.5
12 2 2 3.5
12 2 3 3.0
12 2 4 4.0
12 3 1 4.5
12 3 2 4.0
12 3 3 4.0
12 3 4 5.0
16 1 1 5.0
16 1 2 4.5
16 1 3 5.0
16 1 4 4.5
16 2 1 5.5
16 2 2 6.0
16 2 3 5.0
16 2 4 5.0
16 3 1 5.5
16 3 2 4.5
16 3 3 6.5
16 3 4 5.5
proc print;
proc anova;
classes rep trt;
model cwt=trt rep*trt;
*COMMENT: rep*trt equals the experimental error;
*COMMENT: The sampling error is not included in
the model;
*COMMENT The sampling error will appear at the top
of the output under the Error SOV under the Model SOV;
test h=trt e=rep*trt;
*COMMENT: The F-values for the first ANOVA table on
the page should be ignored because they were
calculated using the incorrect denominator term. By
default, SAS used the error term at the top of the
page (i.e, sampling error) as the denominator of the
F-test;
*COMMENT: This statement tells the computer to use
the experimental error as the denominator of the
F-test. By default, SAS uses the error at the top of
the page as the denominator of the F-test. A new
ANOVA with the correct F-values will be printed;
means trt/lsd e=rep*trt;
*COMMENT: We are telling the computer to use the
experimental error in the calculation of the LSD. By
default, SAS will use the error at the top of the output
for calculating the LSD;
title 'crd with sampling - expt error used as denominator';
CRD WITH SAMPLING LOG FILE
PAGE 1
The SAS System 17:28 Monday, November 27, 1995
NOTE: Copyright(c) 1989 by SAS Institute Inc., Cary, NC USA.
NOTE: SAS (r) Proprietary Software Release 6.07.01
Licensed to NORTH DAKOTA STATE UNIVERSITY, Site 0001220004.
NOTE: Running on IBM Model RS/6000 Serial Number 000132666600.
This message is contained in the SAS news file, and is presented
upon initialization. Edit the file "news" in the "misc" directory
to display site-specific news and information in the program log.
The command line option "-nonews" will prevent this display.
NOTE: AUTOEXEC processing beginning; file is /usr/local/sas/autoexec.sas.
NOTE: SAS initialization used:
real time 0.536 seconds
cpu time 0.300 seconds
NOTE: AUTOEXEC processing completed.
1 options linesize=72;
2 data crdsamp;
3 input trt rep sample cwt;
4 *COMMENT: Each experimental unit will be
5 entered on its own line;
6 cards;
NOTE: The data set WORK.CRDSAMP has 36 observations and 4 variables.
NOTE: DATA statement used:
real time 0.168 seconds
cpu time 0.090 seconds
43 proc print;
NOTE: The PROCEDURE PRINT printed page 1.
NOTE: PROCEDURE PRINT used:
real time 0.061 seconds
cpu time 0.050 seconds
44 proc anova;
45 classes rep trt;
46 model cwt=trt rep*trt;
47 *COMMENT: rep*trt equals the experimental error;
48 *COMMENT: The sampling error is not included in
49 the model;
50 *COMMENT: This analysis is for the unpooled error
51 term;
52 *COMMENT The sampling error will appear at the top
53 of the output under the Error SOV under the Model SOV;
54 test h=trt e=rep*trt;
55 *COMMENT: The F-values for the first ANOVA table on
56 the page should be ignored because they were
Page 2 The SAS System
17:28 Monday, November 27, 1995
57 calculated using the incorrect denominator term. By
58 default, SAS used the error term at the top of the
59 page (i.e, sampling error) as the denominator of the
60 F-test;
61 *COMMENT: This statement tells the computer to use
62 the experimental error as the denominator of the
63 F-test. By default, SAS uses the error at the top of
64 the page as the denominator of the F-test. A new
65 ANOVA with the correct F-values will be printed;
66 means trt/lsd e=rep*trt;
67 *COMMENT: We are telling the computer to use the
68 experimental error in the calculation of the LSD. By
69 default, SAS will use the error at the top of the output
70 for calculating the LSD;
71 title 'crd with sampling - expt error used as denominator';
NOTE: Means from the MEANS statement are not adjusted for other terms
in the model. For adjusted means, use the LSMEANS statement.
NOTE: The PROCEDURE ANOVA printed pages 2-4.
NOTE: PROCEDURE ANOVA used:
real time 0.376 seconds
cpu time 0.120 seconds
NOTE: PROCEDURE ANOVA used:
real time 0.239 seconds
cpu time 0.070 seconds
NOTE: The SAS System used:
real time 1.523 seconds
cpu time 0.730 seconds
NOTE: SAS Institute Inc., SAS Circle, PO Box 8000, Cary, NC 27512-8000
CRD WITH SAMPLING LISTING FILE
The SAS System Page 1
17:28 Monday, November 27, 1995
OBS | TRT | REP | SAMPLE | CWT |
1 | 8 | 1 | 1 | 3.5 |
2 | 8 | 1 | 2 | 4.0 |
3 | 8 | 1 | 3 | 3.0 |
4 | 8 | 1 | 4 | 4.5 |
5 | 8 | 2 | 1 | 2.5 |
6 | 8 | 2 | 2 | 4.5 |
7 | 8 | 2 | 3 | 5.5 |
8 | 8 | 2 | 4 | 5.0 |
9 | 8 | 3 | 1 | 3.0 |
10 | 8 | 3 | 2 | 3.0 |
11 | 8 | 3 | 3 | 2.5 |
12 | 8 | 3 | 4 | 3.0 |
13 | 12 | 1 | 1 | 5.0 |
14 | 12 | 1 | 2 | 5.5 |
15 | 12 | 1 | 3 | 4.0 |
16 | 12 | 1 | 4 | 3.5 |
17 | 12 | 2 | 1 | 3.5 |
18 | 12 | 2 | 2 | 3.5 |
19 | 12 | 2 | 3 | 3.0 |
20 | 12 | 2 | 4 | 4.0 |
21 | 12 | 3 | 1 | 4.5 |
22 | 12 | 3 | 2 | 4.0 |
23 | 12 | 3 | 3 | 4.0 |
24 | 12 | 3 | 4 | 5.0 |
25 | 16 | 1 | 1 | 5.0 |
26 | 16 | 1 | 2 | 4.5 |
27 | 16 | 1 | 3 | 5.0 |
28 | 16 | 1 | 4 | 4.5 |
29 | 16 | 2 | 1 | 5.5 |
30 | 16 | 2 | 2 | 6.0 |
31 | 16 | 2 | 3 | 5.0 |
32 | 16 | 2 | 4 | 5.0 |
33 | 16 | 3 | 1 | 5.5 |
34 | 16 | 3 | 2 | 4.5 |
35 | 16 | 3 | 3 | 6.5 |
36 | 16 | 3 | 4 | 5.5 |
crd with sampling - expt error used as denominator Page 2
17:28 Monday, November 27, 1995
Analysis of Variance Procedure
Class Level Information
Class
Levels
Values REP
3
1
2
3 TRT
3
8
12
16
Number of observations in data set = 36
crd with sampling - expt error used as denominator Page 3
17:28 Monday, November 27, 1995
Analysis of Variance Procedure
Dependent Variable: CWT
Sources of | Sums of | Mean | |||
variation | df | square | square | F | PR > F |
Model | 8 | 23.25 | 2.90625 | 5.92 | 0.0002 |
Error | 27 | 13.25 | 0.490741 | ||
Corrected total | 35 | 36.5 |
R-Square | C.V. | Root MSE | CWT Mean |
0.636986 | 16.16605 | 0.7005 | 4.333 |
Sources of | Sums of | Mean | |||
variation | df | square | square | F | PR > F |
TRT | 2 | 15.041667 | 7.520833 | 15.33 | 0.0001 |
REP*TRT | 6 | 8.208333 | 1.368056 | 2.79 | 0.0305 |
Tests of Hypotheses using the Anova MS for REP*TRT as an error term
Sources of
Sums of
Mean
variation
df
square
square
F
PR > F TRT
2
15.041667
7.520833
15.33
0.0001
crd with sampling - expt error used as denominator Page 4
1:28 Monday, November 27, 1995
Analysis of Variance Procedure
T tests (LSD) for variable: CWT
NOTE: This test controls the type I comparisonwise error rate not
the experimentwise error rate.
Alpha= 0.05 df= 6 MSE= 1.368056
Critical Value of T= 2.45
Least Significant Difference= 1.1684
Means with the same letter are not significantly different.
T Grouping | Mean | N | TRT |
A | 5.2083 | 12 | 16 |
AB | 4.1250 | 12 | 12 |
B | 3.6667 | 12 | 8 |