In the model: lm.1 <- lm(variable ~ BLOC + TIL * YEAR , data=selvanera) I found TIL*YEAR interaction significant. Then I am trying to compare means of the different levels of TIL inside every YEAR using: mc.2 <- glht(lm.1, linfct = mcp(TIL*YEAR="Tukey")) summary(mc.2, test = univariate()) but it does not work. There is any way of doing this, like the SLICE option in PROC GLM (SAS)? Thanks a lot, Jorge -- ************************************************** Jorge Lampurlan?s Castel Departament d'Enginyeria Agroforestal Escola T?cnica Superior d'Enginyeria Agr?ria Universitat de Lleida Avinguda Rovira Roure, 191 25198-LLEIDA SPAIN Tl.: +34 973 70 25 37 Fax.:+34 073 70 26 73 e-mail: jlampur at eagrof.udl.es
Yes, it can be done. It is not currently easy because multcomp doesn't have the syntax yet. Making this easy is on Torsten's to-do list for the multcomp package. See the MMC.WoodEnergy example in the HH package. The current version on CRAN is HH_1.17. Please see the discussion of this example in R-help: https://stat.ethz.ch/pipermail/r-help/2007-January/123451.html Rich
Hello, 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.csv' 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 >
Data is here. I'm sorry.>> 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 >-- ************************************************** Jorge Lampurlan?s Castel Departament d'Enginyeria Agroforestal Escola T?cnica Superior d'Enginyeria Agr?ria Universitat de Lleida Avinguda Rovira Roure, 191 25198-LLEIDA SPAIN Tl.: +34 973 70 25 37 Fax.:+34 073 70 26 73 e-mail: jlampur at eagrof.udl.es **************************************************