1

I am using a negative binomial regression to analyse the amount of purchases per day for different products. When products are available for a different amount of time, (for example product A is available for 10 days, and B only for 5 days) should I use an exposure variable with "total available days"?

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
  • Sounds reasonable, I would recommend to explore this option. See for example this discussion for some more details: http://stats.stackexchange.com/questions/11182/when-to-use-an-offset-in-a-poisson-regression – Achim Zeileis Jun 07 '15 at 18:19
  • I read the discussion and overall it seems to make sense. But I am wondering what variable I should use as exposure. Hence, I have for example " product 1, day 1 - dependent variable 5 purchases; product 1, day 2, dv 10 purchases;... until day 30. product 2, day 1 - dv 60;... until day 15." As my observations are on a daily basis, should I use for example day 1 as exposure for observation 1 and day 2 for obersvation 2. Or should I use 30 days for all observations in product 1 and 15 for all in product 2? Moreover, I account for the time already in one predictor variable, by dividing by days – Steven Heinrich Jun 08 '15 at 10:36
  • This seems that you should either use the daily number of purchases - or the number of purchases over the exposure time. In the former case you have several observations per product and would have to figure out how to appropriately accomodate this in the model. In the latter case, the log(exposure time) should be included as an offset (or regressor). – Achim Zeileis Jun 08 '15 at 18:47

0 Answers0