[R-sig-eco] Possion model for paired data

Kingsford Jones kingsfordjones at gmail.com
Sat Mar 7 22:01:36 CET 2009


Hi Manuel,

A couple more options:

i) Look at a density plot or histogram of the pairwise differences --
if they are not wildly skewed and the number of pairs is not very
small then use the normal-theory paired t-test.  Even if the
differences are quite skewed, with greater than say 30 pairs, the mean
difference will be approximately normally distributed (by the Central
Limit Theorem).

ii) You can get paired t-test results using a mixed model.  E.g,

set.seed(777)
tmtA <- rpois(20,4)
tmtB <- tmtA + rpois(20,2)
t.test(tmtB, tmtA, paired=1)

#         Paired t-test
#
# data:  tmtB and tmtA
# t = 7.3461, df = 19, p-value = 5.807e-07
# alternative hypothesis: true difference in means is not equal to 0
# 95 percent confidence interval:
#  1.537427 2.762573
# sample estimates:
# mean of the differences
#                    2.15

dfr <- data.frame(y=c(tmtA,tmtB), tmt=rep(c('A','B'),each=20), pr=rep(1:20,2))
library(nlme)
f1 <- lme(y ~ tmt, data=dfr, random=~1|pr)
summary(f1)$tTable

#             Value Std.Error DF  t-value      p-value
# (Intercept)  4.20 0.5352691 19 7.846521 2.231988e-07
# tmtB         2.15 0.2926738 19 7.346062 5.806570e-07

intervals(f1)

# Approximate 95% confidence intervals
#
#  Fixed effects:
#                lower est.    upper
# (Intercept) 3.079669 4.20 5.320331
# tmtB        1.537427 2.15 2.762573


However, a Poisson GLMM to draw inference on the pairwise differences
is most likely more trouble than it's worth...


hope it helps,

Kingsford Jones


On Fri, Mar 6, 2009 at 7:00 AM, Manuel Spínola <mspinola10 at gmail.com> wrote:
> Dear list memebers,
>
> Is there a way to do a paired t test but using a poisson model (for counts).
> Thank you very much in advance.
> Best,
>
> Manuel Spínola
>
>        [[alternative HTML version deleted]]
>
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>
>



More information about the R-sig-ecology mailing list