I want to predict count data (example: people visiting a beach) based on some predictors (example: temperature, cloudiness).

I have created a generalized linear model (with Poisson distribution and logarithmic link function) using historic data. The model consists of three coefficients: intercept $\beta_0$, temperature coefficient $\beta_T$ and cloudiness coefficient $\beta_C$. For given temperature $T$ and cloudiness $C$, the predicted number of people $X$ visiting the beach is then $$ X(T,C)=\exp(\beta_0+\beta_T T+\beta_C C) $$

My question: When I use average values to calculate the model parameters (e.g. monthly mean values of $X$, $T$ and $C$), can I use the resulting parameters to predict daily values?

If not, is it possible when I train on other values, e.g. $\exp$ of the average of $\ln X$ instead of the average of $X$?


1 Answer 1


No. Trying to predict a day's number of beachgoers on the basis of that day's temperature and cloudiness, when all you have is monthly numbers of beachgoers and corresponding monthly means of temperature and cloudiness, presents the same problem as when a researcher tries to make predictions about individual Americans using state-level data. You have only aggregate-level data, and hence no way to know how the number of beachgoers on each day within a month related to that day's temperature and cloudiness. The most you could do is predict a within-month average daily rate (that is, a monthly rate divided by the number of days in the month) on the basis of that month's average temperature and cloudiness.

Transforming $X$ doesn't help. To make finer-grained predictions, you need finer-grained data.

  • $\begingroup$ Thanks! Let's replace beachgoers with a physical variable that can in principle be modeled (e.g. leafs dropped from a tree), and assume that the log-linear relationship is physically sound (within some bounds, e.g. for a certain vegetation period, validated e.g. by a day-by-day count for a short duration). When I have a large number of observations, from my understanding it should be possible to show mathematically that the $\beta_i$ calculated from the averages of $\ln X$, $T$, $C$ are the same (or almost the same) as when calculated from the non-average observations. Any thoughts? $\endgroup$
    – Robin
    May 30, 2016 at 7:00
  • $\begingroup$ I'm not sure. It sounds like the devil is in the details. $\endgroup$ May 30, 2016 at 12:33

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.