Hi,

I would like to derive p-values for pair-wise comparison (Tukey's) of  
effects when the response is a count.

I am trying a test case where y ~ Po( lambda(x) ). x has three  
levels : A, B and C with lambda(x) = 10, 20 and 20 respectively.  
Hence, p-values for the contrast C - B should distribute uniformally.

I have implemented this test case as below but do not get uniform  
distribution of those p-values, rather high values (close to 1). Is my  
code correct? The problem could be due to the normal approximation but  
I have also tried with larger sample sizes (n=1e4) and still get it.

Is there an issue in using multcomp for count data? My final real case  
will be with quasipoisson data.

Thanks for your help,

Julien



seed(0)
pvals = t(
         sapply(
         1:100,
         function(i){
             x = factor(sample( c("A", "B", "C"), 1000, replace=TRUE ))
             means  = c(A=10, B=20, C=20)
             y = rpois(length(x), lambda=means[x])
             fit = glm(y ~ x , family=poisson() )
             summary( glht(fit, linfct = mcp(x = "Tukey") ) )$test 
$pvalues
         }
)
)

hist(pvals[,3], breaks=30)



> Julien Gagneur
> Computational Scientist
> Steinmetz lab
> Tel: +49-(0)6221-387-8114
> Fax: +49-(0)6221-387-8518
> Email: julien.gagneur@embl.de
>
> Room V205
> EMBL
> Meyerhofstrasse 1
> D-69117 Heidelberg
> Germany


	[[alternative HTML version deleted]]


