Hello,

I send the message again with the data file as txt because it seems not to
be accepted as csv in the R-help list.

Data comes from a multiyear field experiment in which 4 levels of a
treatment (2, 3, 4, 6) are compared to see the effect on yield. It is a
randomized complete block design.

The SAS code follows:

options ls=95;
data uno;
        infile 'data.txt' delimiter=';' firstobs=2;
        input year plot block treat yield;
run;

proc mixed data=uno;
     class treat year block;
     model yield=block year treat treat*year;
     lsmeans year treat  /pdiff;
     lsmeans treat*year /slice=year pdiff;
     ods output diffs=dos;
run;

data tres;
      set dos;
      if year=_year;
proc print data=tres;
      var year _year treat _treat estimate stderr df tvalue probt;
run;

Data are attached as a file: data.csv.

In fact, I do not know if this is the best approach to analyze the data:

- Should block be considered as random? We use the same file and
randomization every year. We are interested in the long term effect of the
treatment.
- Data should be considered as repeated measurements over time (years)?

In multcomp package:

- What is the equivalence between the tests proposed  ("Sequen", "AVE",
"Changepoint", "Williams", "Marcus", "McDermott") and the tests agronomist
are used to do: LSD (least significant difference), Duncan multiple range
test, Scheffe, S-N-K (Student-Newman-Keuls)?


Thanks a lot for your interest.

Jorge Lampurlanés
Agronomist


>> Is it possible to do this analysis in R?
>
> Yes, it is possible.  The syntax isn't in place yet.
>
> If you send me the complete SAS code and data for an example using slice,
> I will duplicate it for you in the multcomp package in R.  I will send
> that
> to the R-help list and to Torsten and it will bring us one step closer
> to the syntax.
>
> The example I showed before was designed to get the same answer as S-Plus
> multicomp using the adjust= argument.
>
> Rich
>
YEAR;PLOT;BLOC;LEVEL;YIELD
15;1;1;3;3896.00
15;2;1;2;3881.33
15;3;1;4;3394.11
15;4;1;6;3261.11
15;5;2;6;3273.66
15;6;2;4;3568.89
15;7;2;2;3535.33
15;8;2;3;3218.66
15;9;3;3;3311.00
15;10;3;4;3458.77
15;11;3;2;3543.44
15;12;3;6;2684.00
15;13;4;4;3591.77
15;14;4;3;3555.55
15;15;4;2;3511.11
15;16;4;6;2755.55
16;1;1;3;2736.33
16;2;1;2;2769.66
16;3;1;4;2353.11
16;4;1;6;2964.44
16;5;2;6;2631.11
16;6;2;4;2882.77
16;7;2;2;2203.66
16;8;2;3;2636.89
16;9;3;3;2461.55
16;10;3;4;2285.00
16;11;3;2;2361.66
16;12;3;6;2636.89
16;13;4;4;2639.78
16;14;4;3;2596.66
16;15;4;2;2928.44
16;16;4;6;2745.44
17;1;1;3;2751.63
17;2;1;2;2855.81
17;3;1;4;2089.71
17;4;1;6;4096.04
17;5;2;6;4254.52
17;6;2;4;2483.10
17;7;2;2;2920.86
17;8;2;3;3399.48
17;9;3;3;3443.28
17;10;3;4;3447.03
17;11;3;2;3839.87
17;12;3;6;4135.01
17;13;4;4;3549.82
17;14;4;3;3542.12
17;15;4;2;3597.47
17;16;4;6;4017.49
18;1;1;3;2106.00
18;2;1;2;2622.78
18;3;1;4;3023.33
18;4;1;6;3811.44
18;5;2;6;3204.11
18;6;2;4;2739.00
18;7;2;2;2700.33
18;8;2;3;2273.89
18;9;3;3;2131.78
18;10;3;4;3075.00
18;11;3;2;2997.44
18;12;3;6;3010.33
18;13;4;4;2868.22
18;14;4;3;2519.44
18;15;4;2;2855.33
18;16;4;6;3462.55
19;1;1;3;3802.27
19;2;1;2;3987.03
19;3;1;4;3879.28
19;4;1;6;2992.50
19;5;2;6;2221.98
19;6;2;4;3739.80
19;7;2;2;4523.07
19;8;2;3;4460.97
19;9;3;3;4587.39
19;10;3;4;4104.34
19;11;3;2;4018.42
19;12;3;6;2504.81
19;13;4;4;3819.31
19;14;4;3;4163.23
19;15;4;2;3718.99
19;16;4;6;2399.38
20;1;1;3;2320.64
20;2;1;2;1540.83
20;3;1;4;1473.81
20;4;1;6;1271.28
20;5;2;6;1025.46
20;6;2;4;1488.39
20;7;2;2;1728.99
20;8;2;3;2196.10
20;9;3;3;2037.82
20;10;3;4;1745.93
20;11;3;2;1876.27
20;12;3;6;1045.36
20;13;4;4;1376.80
20;14;4;3;2176.18
20;15;4;2;1985.51
20;16;4;6;647.27
21;1;1;3;5183.94
21;2;1;2;3583.61
21;3;1;4;3041.82
21;4;1;6;3645.95
21;5;2;6;3525.90
21;6;2;4;2989.62
21;7;2;2;3174.04
21;8;2;3;3021.54
21;9;3;3;2985.57
21;10;3;4;3099.75
21;11;3;2;3214.95
21;12;3;6;3454.56
21;13;4;4;3168.78
21;14;4;3;3244.26
21;15;4;2;3747.98
21;16;4;6;3060.55
22;1;1;3;2920.53
22;2;1;2;1987.68
22;3;1;4;2235.97
22;4;1;6;2693.58
22;5;2;6;2461.07
22;6;2;4;2255.39
22;7;2;2;2815.35
22;8;2;3;3192.49
22;9;3;3;2909.77
22;10;3;4;2832.01
22;11;3;2;2663.89
22;12;3;6;2010.96
22;13;4;4;2471.86
22;14;4;3;2615.70
22;15;4;2;2981.77
22;16;4;6;1719.13
23;1;1;3;4134.62
23;2;1;2;3276.45
23;3;1;4;3136.52
23;4;1;6;3784.49
23;5;2;6;3817.49
23;6;2;4;3506.78
23;7;2;2;4109.16
23;8;2;3;4009.86
23;9;3;3;4099.24
23;10;3;4;4111.49
23;11;3;2;4388.40
23;12;3;6;4090.12
23;13;4;4;4001.93
23;14;4;3;4195.77
23;15;4;2;4247.79
23;16;4;6;4119.71
24;1;1;3;1157.99
24;2;1;2;1008.99
24;3;1;4;822.09
24;4;1;6;565.01
24;5;2;6;518.99
24;6;2;4;889.10
24;7;2;2;1048.63
24;8;2;3;1396.62
24;9;3;3;1238.06
24;10;3;4;1061.40
24;11;3;2;1198.28
24;12;3;6;761.29
24;13;4;4;805.48
24;14;4;3;1172.09
24;15;4;2;1055.87
24;16;4;6;527.04
______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to