Hi,

Adding to what's already been said:


Just in case you're not aware of this, I think you have a typo in your model. 
Are you looking for 
glm(Count~Sex+Time+Behaviour+Sex*Time+Sex*Behaviour+Time*Behaviour,family=poisson)?
 By the way, I think this could also be written  
glm(Count~Sex+Time+Behaviour+Sex:Time+Sex:Behaviour+Time:Behaviour,family=poisson)
 or simply glm(Count~+Sex*Time+Sex*Behaviour+Time*Behaviour,family=poisson). 
The "*" means both main effects and all possible interactions.

Also, you should probably look into the issue of overdispersion. Overdispersion 
is very common in ecological count data and basically means that you have more 
variation in your data than the Poisson distribution assumes. This typically 
leads to anti-consevative p-values, i.e. too small p-values, and needs to be 
accounted for.

Read more about it and potential solutions here: http://glmm.wikidot.com/faq

Good luck,

Jens 

----------------------------------------------------------------------

Message: 1
Date: Sat, 14 Jun 2014 18:55:44 -0700 (PDT)
From: Angel <[email protected]>
To: [email protected]
Subject: Re: [R-sig-eco] Question about GLM post hoc and chi square
Message-ID: <[email protected]>
Content-Type: text/plain

You are able to obtain Chi squared values by using a wald chi square post hoc 
test. To do this you can use the aod package, function wald.test. This function 
is perfect for generalised linear models using poisson distribution. 


Also, as long as you have got
interaction terms in your results from GLM, you could get the wald chi square 
(and an associated p-value) for these terms, hence giving you the  table which 
you are after.

If this response is not clear enough, I can post some example (I am not sure of 
the etiquette) 

AA.

Date: Fri, 13 Jun 2014 18:07:27 -0700
From: [email protected]
To: [email protected]
Subject: Question about GLM post hoc and chi square



        Dear all,


I am making an analysis using a GLM using three explanatory variables and a

response variable. I need to obtain a table similar to this one,

http://postimg.org/image/5sau79wlt/r

 nevertheless, I have not been able to do it. I am having a hard time

specially getting the chi square values. I would like to know how to obatin

them.


I also would like to know what function could help me to make ad hoc

comparisons for single variables and interactions.


If any of you knows how to do both estimations, I would really appreciate

it.


All the best!!!


This is my script

a=read.table("ricis3.txt",header=T)

attach(a)

model7=glm(Count~Sex+Time+Behaviour+Sex*Time+Sex*Behaviour+Time+Behaviour*Sex,family=poisson)

summary(model7)

_______________________________________________
R-sig-ecology mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

Reply via email to