You are on page 1of 3

data crd;

infile'd:\adjust\ivdmdadjust.txt';
do treat= 1 to 12;
do rep= 1 to 4;
input weight @;
output;
end;
end;
cards;
proc print;
proc anova;
class treat;
model weight=treat;
means treat/lsd duncan tukey snk;
run;
data latin4;
input row col treat$ yield;
card;
1 1 a 11.19
1 2 b 12.56
1 3 c 13.11
2 1 b 8.1
2 2 c 16.72
2 3 a 9.39
3 1 c 10.28
3 2 a 10.84
3 3 b 16.20
;
proc print;
proc anova;
class row col treat;
model yield=row col treat;
means row col treat/duncan;
run;
data crdf1;
do com = 'betagen','formost','maji','nestle';
do anti ='0ppb','1ppb','2ppb','3ppb','4ppb';
do rep = 1 to 3;
input percent @@;
output;
end;
end;
end;
cards;
10.02496883
10.02496883
10.02496883
0.707106781
10.02496883
0.707106781
0.707106781
0.707106781
0.707106781
0.707106781
0.707106781
0.707106781
0.707106781
0.707106781
0.707106781
10.02496883
10.02496883
10.02496883
10.02496883
10.02496883
10.02496883
10.02496883
10.02496883
10.02496883
10.02496883
10.02496883
10.02496883
10.02496883
10.02496883
10.02496883
10.02496883
10.02496883
10.02496883
10.02496883
10.02496883
0.707106781
0.707106781
10.02496883
0.707106781
0.707106781
0.707106781
0.707106781
0.707106781
0.707106781
0.707106781
10.02496883
10.02496883
10.02496883
0.707106781
0.707106781
0.707106781
0.707106781
0.707106781
0.707106781
0.707106781
0.707106781
0.707106781
0.707106781
0.707106781
0.707106781
;
proc print;
proc glm data = crdf1;
class com anti;
model percent = com|anti;
means com anti/lsd;
lsmeans com*anti/pdiff;
run;

data crd_fact;
do A = 'a1','a2','a3';
do B = 'b1','b2','b3','b4','b5','b6';
do rep = 1 to 2;
input moisture @@;
trt = A || B;
output;
end;
end;
end;
cards;
5.40 5.48
5.47 5.18
5.00 5.00
5.40 5.17
5.30 5.00
5.00 5.00
6.00 6.00
5.30 5.00
5.00 5.00
5.00 5.30
5.48 5.48
5.00 5.00
5.00 5.00
5.40 5.40
5.00 5.00
5.40 5.40
5.30 5.00
5.00 5.00
;
proc print;
proc ANOVA data = crd_fact;
class A B;
model moisture = A B A*B;

means A B A*B/duncan;
proc ANOVA data = crd_fact;
class trt;
model moisture = trt;
means trt /duncan;
run;
data repeatpH;
input tmt $ rep t1
cards;
1
1
25.65
1
2
24.85
1
3
25.26

t2 t3 t4 t5 t6 t7 t8;
26.73
24.99
21.74

25.50
28.02
18.84

28.38
24.18
24.44

2
2
2

1
2
3

24.68
25.20
24.90

24.75
26.62
27.31

26.06
25.46
25.44

26.10
25.77
27.00

3
3
3

1
2
3

31.12
27.39
28.53

32.39
28.04
32.21

30.03
26.30
27.48

27.74
25.25
27.55

4
4
4

1
2
3

26.56
26.29
30.82

31.63
29.46
24.66

26.53
26.80
27.03

25.80
25.68
27.25

5
1
24.59
26.48
25.07
5
2
25.83
29.67
27.65
5
3
26.34
31.98
27.37
;
proc print;
proc anova data = repeatpH;
class tmt;
model t1-t8 = tmt/nouni;
repeated time polynomial / nou nom
mean tmt /duncan;
run;
DATA crd;

27.49
27.49
27.66

printe short summary;

DO rep = 1 TO 5;
DO palm = 'A','B','C','D';
INPUT pH @@;
OUTPUT;
END;
END;
CARDS;
5.04
5.18
4.98
5.26
5.03
5.18
5.12
5.3
4.98
5.21
5.19
5.34
4.97
5.16
5.11
5.27
4.98
5.16
5.09
5.34
;
PROC PRINT;
PROC ANOVA DATA = crd;
CLASS palm;
MODEL pH = palm;
MEANS palm /DUNCAN;
RUN;