# Can a variable be used both as an offset and an independent variable?

I am developing a negative binomial regression model that investigates factors impacting the death rate of animals that are fed. The number of deaths was counted over the course of a feeding season, however, the feeding season length (and therefore the number of days over which dead animals were counted) varied. Therefore, my response variable is calculated as a daily death rate: number of dead animals/population size/season length.

I suspect that death rate will be higher in longer feeding seasons due to animals being congregated for longer periods of time, increasing disease transmission. Therefore, I would like to include season length as both an independent variable and as an offset term. Is this an acceptable thing to do?

In the situation you are describing, there should be no problem. It is just the case that one variable (here: length of feeding season) plays two different roles, once the denominator in a rate and once as a potential explanatory variable. Then it is good that the two roles are separate in the model, it makes interpretation easier, and, more importantly, you can treat them differently. Maybe, for instance, the act of season length as explanatory variable is nonlinear, then you could use it with a quadratic term, or maybe even with a spline.

But there is some confusion in your post, you write:

Therefore, my response variable is calculated as a daily death rate: number of dead animals/population size/season length.

But, with negative binomial regression (as with Poisson regression, both count regression models) the response should be the count (number of dead animals) only. The offset is a way to convert to a rate indirectly, using a rate as response and an offset does not make sense.

• @kjetilbhalverson : if you still believe it will yield valid results to include season-length both as a covariate and as an offset (which I do not), then you should at the very least modify your answer to advise against allowing the season length to be in even a third location, namely the outcome calculation.
– DWin
Nov 18, 2023 at 0:48
• @DWin: Done .... Dec 19, 2023 at 19:29

An offset is treated by the model as an independent variable but with a constrained slope. As we would not add the same independent variable twice, it should not be added both as an offset and as an independent variable.

This question is old, but it's the main reference that appears in web search. It was even cited by one referee for my manuscript, to suggest it is possible to do. I got the answer above following a discussion with a statistician. I would suggest anyone who would like to add the variable twice, as suggested, to be careful. In my analyses, the addition of the variable as an offset and as an explanatory variable generated dubious results.

• Can you add to this answer an explanation of why it generated dubious results? Nov 1, 2020 at 20:34
• I would also like more details on why it wouldn't work to include a term as both an offset and an independent variable. My understanding of the offset is it is simply a term whose coefficient is set to equal one. Thus, it is more than just a "constrained slope"-it's a fixed slope and nothing is being estimated. Thus, we are only estimating one coefficient for the variable. I am modeling factors influencing the number of positives for a test. It makes sense that the positivity rate could go up as tests go down, since tests may be limited to more severe cases, and I want to account for that. Jun 10, 2022 at 16:18
• My guess would have been that one of two conditions might occur. One might be that the “variable” would be aliased and an NA reported as the non-estimable value or otherwise that very small value would be reported that were close to zero for that variable.
– DWin
Dec 19, 2023 at 21:44