Hi
 
I have some experimental data where I have counts of the number of
insects collected to different trap types rotated through 5 different
location (variable -location), 4 different chemical attractants [A, B,
C, D]  were applied to the traps (variable - semio) and all were
trialled at two different CO2 release rates [1, 2] (variable CO2) I also
have a selection of continuous variables measuring meteorological
conditions to account for any bias cause by changing weather conditions,
the data is over dispersed so I have fitted a negative binomial glm
(glm.nb) and simplified using stepAIC from the MASS package etc.
 
There are significant differences in the number of insects attracted to
the different chemical (semio) and to the two different CO2 (release
rates) I have then used the glht function from the multcomp package to
do multiple comparisons to see what the specific differences between the
levels are for semio and CO2 using the code below which works great but
what I would like to do is to do comparisons combining the factors e.g a
comparison for semioA at CO at level 1 vs Semio A at CO2 level 2  etc to
see which is the best combination, is this possible or should I have
started of with my counts already split up into this e.g. a treatment
variable(semioA at CO2 level 1 = A1, semioA at CO2 level 2 = A2 etc), I
started with them this way as we have no prior knowledge that increasing
co2 will have any effect.
 
I have had a quick try with the data split into a treatment factor
(instead of semio and CO2 level) but I can not get convergence with
glm.nb I think this may be to do with to many zeros in the data set, do
you know if glht or another multiple comparison will work or
zeroinflated negative binomial regression(zeroinfl() from the pscl
library)?
 
Any help or ideas will be gratefully appreciated. Many thanks in
advance.
 
Lara
 
 
semiochemical <-read.csv("G:/semiochemical_data.csv", header=T)

semiochemical$location2<-factor(semiochemical$location)
levels(semiochemical$location2)<-c("1","2","3","4","5")
 
semiochemical$semio2<-factor(semiochemical$semio)
levels(semiochemical$semio2)<-c("A","B","C","D")
 
semiochemical$CO22<-factor(semiochemical$CO2)
levels(semiochemical$CO22)<-c("1","2")
 
model1<-glm.nb(total ~ semio + CO2 + location + temp + mean.wind.speed)
 
model.glht.Semio <- glht(model1, linfct=mcp(semio="Tukey"))
model.glht.CO2 <- glht(model1, linfct=mcp(CO2="Tukey"))
 

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org 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