Methodology
Introduction
Regression models assume that a linear relationship exits between one variable called the dependent variable and one or more other variable called independent variables. The dependent variable is the variable to be forecast and the independent variables are the explanatory variables. The first model we will examine assumes that there is only one explanatory, or independent, variable. This type of model will be referred to as a simple regression model. We will them examine regression models with more than one independent variables. Such models are called multiple regression models.
Simple Regression Model
As stated above, a simple regression model consists of one dependent and one independent variable which are assumed to be linearly related. A linear, or straightline relationship, has the equation form:
Y = a_{0} + a_{1}X
In our terminology, Y represents the dependent variable, or variable to be forecast, and X is the independent variable, or explanatory variable. Parameters a_{0} and a_{1} are used to define the specific relationship between X and Y.
In order to test the linear hypothesis between the independent variable and the dependent variable a scatterplot can be constructed. If the points, representing pairs of independent and dependent variables (X, Y), do not fall approximately on a straight line, the linear hypothesis is not appropriate. However, certain steps can be taken to transform a nonlinear relationship into a linear one.
Once the validity of the linear relationship has been confirmed, the next step is to identify the precise form of the relationship. This is done by specifying values for parameters a_{0} and a_{1}, which in turn, identify a specific straight line. It should be obvious that any number of straight lines can be hypothetically selected to describe the relationship between X and Y. We need to need to establish a means by which one straight line can be judged better than all others. Although many criteria exist, the most universally used is to select the straight line that minimises the MSE (mean squared error). An error, in this case, is defined as the distance between any observed value of the dependent variable and the value forecast by the straight line. We wish to choose parameters a_{0} and a_{1} for our straight line to minimise the average squared error. Based on this criterion, it is not difficult to see why this method is known as the method of least squares. Mathematically, we wish to minimise:
∑(Y_{i}  a_{0}  a_{1.}X_{i})^{2}
with respect to a_{0} and a_{1}. This can be done by taking derivatives and setting them equal to zero. This results in the so called normal equations:
∑Y_{i }=_{ }a_{0}n + a_{1}∑X_{i}
∑X_{i}Y_{i }=_{ }a_{0}∑X_{i} + a_{1}∑X_{i}^{2}
which can be solved simultaneously to obtain:
a_{1} = 
∑X_{i}∑Y_{i }– n∑X_{i}Y_{i} 
= 
COV (X, Y) 
(∑X_{i})^{2 }– n∑X_{i}^{2} 
VAR (X) 
a_{0 }= Y – a.X
where Y and X are the mean values for Y and X, respectively.
Multiple Regression Model
Previously, we have examined situations in which the dependent variable was assumed to be predictable in terms of a single independent variable. Frequently, one independent variable is not enough, and several independent variables are found to influence the dependent variable. This section will extend our analysis to include regression models with one than one independent variable, or multiple regression models.
If Y is the variable to be forecast and X_{1}, X_{2}, X_{3},…X_{n} are the independent or explanatory variables, the multiple regression forecasting model assumes the relationship between these variables is of the general form:
Y = a_{0} + a_{1}X_{1} + a_{2}X_{2} + a_{3}X_{3} + .. + a_{n}X_{n}
where a_{0}, a_{1}, a_{2}, a_{3},…a_{n} are the model parameters.
When there two independent variables, the form is Y = a_{0} + a_{1}X_{1} + a_{2}X_{2}. Three parameters have to be specified: a_{0,} a_{1} et a_{2}. The method of least squares uses a set of basic balance equations to solve for the optimal (minimal MSE) parameters for multiple variables. The equations to be solved, in terms of our model are:
∑Y =_{ }a_{0}n + a_{1}∑X_{1} + a_{2}∑X_{2}
∑X_{1}Y =_{ }a_{0}∑X_{1} + a_{1}∑X_{1}^{2}+ a_{2}∑X_{1}X_{2}
∑X_{2}Y =_{ }a_{0}∑X_{2} + a_{1}∑X_{1}X_{2 = }a_{2}∑X_{2}^{2}
Strength of Relationship
Coefficient of Determination R^{2}. The coefficient of determination represents the ratio of explained variation to total variation of the dependent variable, or the proportion of total variation that has been determined by the model. Mathematically:
R^{2} = ∑(Y_{i}* Y)^{2}/∑(Y_{i}  Y)^{2}
where Y_{i}* is the forecast value for the dependent variable predicted by the linear regression equation, Y_{i} is observed value of the dependent variable corresponding to the independent variable X_{i},_{ }and Y is the observed mean for the dependent variable.
R^{2} assumes values between 0 and 1. For example, if R^{2} = 0.90, this indicates that the linear regression model has explained 90% of the variation in the data, leaving 10% unexplained.
Adjusted Coefficient of Determination Ra^{2}. Adjusted R^{2} is an^{ }adjustment for the fact that when one has a large number of independent variables it is possible that R^{2} will become artificially high simple because some independent variables’ chance variations “explain” small parts of the variance of the dependent variable. At the extreme, when there are as many independent variables as observations, R^{2} will always be 1. The adjustment to the arbitrarily lowers R^{2} as the number of independent increases. Some authors conceive of adjusted R^{2} as the percentage of variance “explained in a replication, after subtracting out the contribution of chance”. When there few independent variables, R^{2} and adjusted R^{2} will be close. By contrast, when there are many independent variables, adjusted R^{2} may be noticeably^{ }lower. Mathematically:
Ra^{2} = 1 – (1  R^{2})(n – 1)/(n  k  1)
where n is the number of observations and k is the number of independent variables.
Correlation Coefficient R. The correlation coefficient is the square root of the coefficient of determination. The value of this coefficient must always fall between  1 and + 1. If the two variables are perfectly correlated, the correlation coefficient will be either  1 or + 1, the sign determined by whether both more in the same direction (+ 1) or in the opposite direction ( 1). Values near zero for R would indicate that there is little or no correlation between these variables.
Statistical Significance of Correlation
Regression analysis is a statistical approach in which a sample is used to estimate the true relationship among variables. The smaller the sample size the greater the likelihood that the measured correlation could be due to sampling error rather than a true relationship.
The Ftest can be used to distinguish between statistically significant correlations and those due to sampling error. It consists in calculating an F statistic based on the coefficient of determination and the sample size and comparing this value with a critical value. The F statistic is calculated from:
F = 
R^{2}/(k  1) 

(1 R^{2})/(n – k) 
where R^{2} is the coefficient of determination, k is the number of variables, and n is the number of observations or sample points.
tTests
ttests are used to assess the significance of individual a_{i} coefficients, specifically, testing the null hypothesis that the regression coefficient is zero. A common rule of thumb is to drop from the equation all variables not significant at the 0.05 level or better.
Linear Regression Assumptions and Limitations
Linearity. We emphasised earlier the importance of checking for a linear relationship between dependent and independent variables by plotting the data. An attempt to fit a linear model to a relationship which is nonlinear or does not exist will yield a low and insignificant coefficient of
determination. An observed nonlinear relationship can be handled by transforming one or more of the variables, such as using the logarithms or square roots of the observations.
Autocorrelation. Current values should not be correlated with previous values in a data series. This is often a problem with time series data, where many variables tend to increment over time such that knowing the value of the current observation helps one estimate the value of the previous observation. Spatial autocorrelation can also be a problem when units of analysis are geographic units and knowing the value for a given area helps one estimate the value of the adjacent area. That is, each observation should be independent of each other observation if the error terms are not to be correlated, which in turn lead to biased estimates of standard deviations and significance.
The DurbinWatson coefficient, DW, tests for autocorrelation. DW is given by the formula:
DW = ∑(e_{i} – e_{i1})^{2}/∑e_{i}^{2}
The value of DW ranges from 0 to 4. Values close to 0 indicate extreme positive correlation; close to 4 indicates extreme negative autocorrelation; and close to 2 indicates no serial autocorrelation. As a rule of thumb, DW should be between 1.5 and 2.5 to indicate independence of observations.
The DurbinWatson table gives for a given number of observations and a given level of confidence two values D_{L} et D_{U}:
 if DW ≤ D_{L}, there is positive autocorrelation;
 if DW ≥ 4  D_{L}, there is negative autocorrelation;
 if D_{U} ≤ DW ≤ 4  D_{U}, there is no autocorrelation.
For a graphical test of serial independence, a plot of Y axis against the sequence of cases on the X axis should show no pattern, indicating independence of errors. When patterns appear in the errors, the model being used has not taken full advantage of the explanatory potential in the data. This can be corrected for by adding other variables to the model or by transforming one or more existing ones.
Normally Distributed Residuals. Regression assumes that the residuals or errors are normally distributed. With a mean of zero. Although this assumption is not normally one to worry about, it is important because it underlies the various tests of significance and confidence limit determination. As a rough guide if the number of observations is 30 or more, we can assume that he residuals are normally distributed. A spot check of the residuals can also be made to ensure that they cluster near zero with large values occurring only infrequently. The best way to correct for nonnormality is to increase the size of the sample. The existence of a nonzero mean for the residuals indicates bias and suggests that the forecasting model or parameters need to be reexamined.
Multicollinearity. Multicollinearity exists when two or more independent variables are themselves highly correlated. When this occurs, the apparent significance and accuracy of the results can be affected. The simple correlation coefficients should be examined to determine whether any independent variables are substantially correlated with each other. If they are, one or more of these should be eliminated and the model reexamined. As a general rule, one should eliminate one of a pair of independent variables whose simple correlation is 0.7 or greater.
Homoscedasticity. When the forecast errors have a constant variance, this condition is referred to as homoscedasticity. When not true, we say the data are heteroscedastic. If heteroscedasticity exists, it is highly likely that we will obtain a low and insignificant coefficient of determination. Nonconstant error variance can be observed by examining a plot of the data. A hemoscedastic model will display a cloud of dots, whereas lack of hemosedasticity will be characterised by a pattern such as a funnel shape, indicating greater error as the dependent variable increases. Heteroscedasticity can sometimes be eliminated by introducing other independent variables which are assumed to be the cause of heteroscedasticity.