Using years when calculating linear regression? I'm new to statistics, and I'm currently trying to solve an assignment for my course. 
The assignment is to calculate the linear regression analysis/regression equation for a data set containing years and the percentage of unemployment in the population at that time.
While I'm not entirely sure how to do this, my primary question is basically: 
When using years to perform the analysis, should the actual years be used in the calculation (2009, 2010, etc.) or should they be replaced with 1,2,3, etc.?
 A: In principle, it doesn't matter - only the intercept term will be affected. Say that you want to estimate the regression Y = a + bX + e. Remember that the slope coefficient can be calculated as b = Cov(Y, X) / Var(X), and a = Ym - bXm, where Ym and Xm are the sample means of the respective variables. Now, let's add a constant C to the X variable (corresponding to switching the year definition in your example): b = Cov(Y, X + C) / Var(X + C) = [Cov(Y, X) + Cov(Y, C)] / [Var(X) + Var(C)]. Furthermore, Cov(Y, C) = Var(C) = 0, because C is a constant. This gets us back to the same expression for b as before. For the intercept, we get a = Ym - b*(Xm + C). 
In practice, you can sometimes run into issues when using very large values for a variable. This is because you can run into the limits of your computers level of numerical precision, but in your case, I can't imagine that it would make any difference.
A: The second series can be written as the first one minus 2008.


*

*Ought it to make a difference to how we think unemployment changes over time when we start counting years from—the birth of Christ or the start of the data series?

*Look at the least-squares equations & try to work out the effect of subtracting a constant from the predictor. Of the estimated coefficients & the predicted values what will change, & how?

*Check by performing the regression both ways.
A: a) If you're sure (or in this case specifically told) you only need to use year as linear variable (no interactions, no quadratic terms, no other terms), and you only have one timeseries, then in this case it doesn't make any difference (just results in a constant offset). So might as well use year as is.
b) In general), if you're looking at an arbitrary unknown modeling problem, where you might well need quadratic, higher-order or nonlinear terms, then you should define a time-index: yearx = year - 2007. We usually define time-index to start at 1, not 0, since many useful functions object to 0, such as log, 1/x etc. (But this is more broad than your example.)
c) There's another, more basic reason: if you have multiple timeseries, each with a different start-year (e.g. one series starts in 1996, another in 2008). Then if you want to focus on the relative time lag, and remove hard year numbers from the model coefficients, graphs etc., again compute yearx = year - start_year for each series.
A: Yes, you can use years as the predictor variable in linear regression. The basic code would be Outcome = Year. The beta coefficient from such a model would allow you to predict the outcome for an unobserved year. 
It is important to remember that the p-value for the beta coefficient is testing whether there is a linear relationship between Year and Outcome across all years. This is often untrue even if the first and last year are obviously different. If you are really interested in whether the first year is significantly different from the last, you should restrict your data to just those two years, in which case linear regression would not be an appropriate method.
