[R-sig-eco] Question about GEE and interaction plot

ONKELINX, Thierry Thierry.ONKELINX at inbo.be
Fri Oct 17 15:57:31 CEST 2014


Dear Luis,

1) Have a look at the multcomp package for the multiple comparisons. You will have to define the relevant contrasts manually.
2) reorder() will help you.  reorder(C$Comportamiento, C$Conteo, FUN = mean)

Best regards,

ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium
+ 32 2 525 02 51
+ 32 54 43 61 85
Thierry.Onkelinx at inbo.be
www.inbo.be

To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination: he may be able to say what the experiment died of.
~ Sir Ronald Aylmer Fisher

The plural of anecdote is not data.
~ Roger Brinner

The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey


-----Oorspronkelijk bericht-----
Van: r-sig-ecology-bounces at r-project.org [mailto:r-sig-ecology-bounces at r-project.org] Namens Luis Fernando García
Verzonden: vrijdag 17 oktober 2014 15:17
Aan: r-sig-ecology at r-project.org
Onderwerp: [R-sig-eco] Question about GEE and interaction plot

Hello all!

I am trying to analyze a dataset using the GEE.

This is what I have so far

C=read.table("Cnarinofinal4.txt",header=T)
attach(C)
names(C)
library(geepack)
Form <-
formula(Conteo~Grupo+Tiempo+Comportamiento+Comportamiento*Grupo+Comportamiento*Hora)
M4 <- geeglm(Form,family = poisson, id =Individuo, corstr = "exchangeable")
anova(M4)

1) I want to know if someboy knows how to perform post hoc comparisons for significant terms, in this case I have a significance result for the interaction Comportamiento*Hora and the factor Comportamiento.

2) I want to perform and interaction plot, I tried with the following code:
 interaction.plot(C$Comportamiento,C$Tiempo,C$Conteo)

Nevertheless, I would like to plot the graph in a decreasing order by the mean and also add the error bars. For the first approach I do not have available info, and for the second one I found that data must be sorted before using the function summarySE from the ggplot2 library, nevertheless it does not seem to work anymore.

Any help you can provide will be welcome!
* * * * * * * * * * * * * D I S C L A I M E R * * * * * * * * * * * * *
Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer en binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is door een geldig ondertekend document.
The views expressed in this message and any annex are purely those of the writer and may not be regarded as stating an official position of INBO, as long as the message is not confirmed by a duly signed document.


More information about the R-sig-ecology mailing list