3
$\begingroup$

I've fit a GLM (Poisson) to a data set where one of the variables is categorical for the year a customer bought a product from my company, ranging from 1999 to 2012. There's a linear trend of the coefficients for the values of the variable as the year of sale increases.

Is there any problem with trying to improve predictions for 2013 and maybe 2014 by extrapolating to get the coefficients for those years?

$\endgroup$

2 Answers 2

4
$\begingroup$

I believe that this is a case for applying time series analysis, in particular time series forecasting (http://en.wikipedia.org/wiki/Time_series). Consider the following resources on time series regression:

$\endgroup$
8
  • $\begingroup$ The reason I'm using regression is that I need the per year rate of change for reasons I'd rather not get into right now. $\endgroup$
    – JenSCDC
    Aug 23, 2014 at 20:24
  • 1
    $\begingroup$ @AndyBlankertz: I just updated my answer. $\endgroup$ Aug 23, 2014 at 20:33
  • $\begingroup$ Thanks. I'd love to delve into the resources, but I'm time limited- the report I'm working on is due on Friday. I also have some slack in statistical rigorousness, because the target audience is Management :) Hopefully next week. $\endgroup$
    – JenSCDC
    Aug 23, 2014 at 20:44
  • 1
    $\begingroup$ @AndyBlankertz: You're welcome. I understand, as I'm not a statistician myself :-). But I'm trying to learn wherever and whenever I can. $\endgroup$ Aug 23, 2014 at 20:54
  • $\begingroup$ This isn't time series analysis (unless you throw away loads of data). I think the data records are individual sales records with a year attached as a covariate. Time series analysis is used when the variable of interest (eg total sales) has a unique time point. You could compute total sales within years and do time series analysis, but that would mean losing all the other information from each sales record (eg item purchased, buyer age etc). Regression is the right thing here. $\endgroup$
    – Spacedman
    Aug 26, 2014 at 8:51
6
$\begingroup$

If you suspect your response is linear with year, then put year in as a numeric term in your model rather than a categorical.

Extrapolation is then perfectly valid based on the usual assumptions of the GLM family. Make sure you correctly get the errors on your extrapolated estimates.

Just extrapolating the parameters from a categorical variable is wrong for a number of reasons. The first one I can think of is that there may be more observations in some years than others, so any linear extrapolation needs to weight those year's estimates more. Just eyeballing a line - or even fitting a line to the coefficients - won't do this.

$\endgroup$
1
  • $\begingroup$ Hmm... it never occurred to be to make year a continuous variable. In retrospect it seems obvious. $\endgroup$
    – JenSCDC
    Aug 26, 2014 at 18:51

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.