1
$\begingroup$

I have count data for events measured within each of multiple individuals. However, the amount of time over which each individual was observed varies. Normally, if the counts were obtained over equal amounts of time, I'd do something like:

fit = lmer(
    data = my_data
    , formula = count ~ (1|individual)
    , family = poisson
)

However, I'm not sure how to handle things when the amount of time is unequal. If I simply divide each individual's count by the amount of time the were observed, this yields a counts-per-minute measure, but the poisson family does not like non-integer values in the dv. Any suggestions?

$\endgroup$
1

1 Answer 1

3
$\begingroup$

You simply add an offset term to the model:

i.e. if minutes is your exposure variable:

fit = lmer(
    data = my_data
    , formula = count ~ offset (log(minutes))+(1|individual)
    , family = poisson
)

assuming minutes is strictly nonzero, if you have some 0 minutes, some will add a small amount, like .000001, to ensure log(minutes) is not NA.

Hope this helps.

Corey

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.