Title: Calculations
Course: UGQuants (SSPS) > Section: Multiple Regression

Calculations

The mathematical calculations involved in multiple linear regression are that complex - but they are voluminous.  Even quite simple multiple regression with a few hundred cases and half a dozen variables involves tens of thousands of calculations.  This is why it is only with the advent of the computer that this technique has come into its own.  What would have taken hours or even days of calculation just a few decades ago can now been done in less than a second.  However, like any statistical technique, regression can be done carefully and well -  or, in inexpert hands, a few variables can be tossed into a computer application and impressive looking but utterly misleading results can be produced.

The key thing to remember, in regression as with any statistical analysis, is that it is crucial to understand what you are doing and why. Once you have that understanding then you can let the computer worry about the how.  In order to keep yourself clear about this, tit is useful to have a clear explanatory model (or even better a causal one), and a clear visualisation (e.g. a scatterplot) of the relationships between the variables you are interested in.

Let us work through an example of exploratory multiple regression:

How important is the standard of living in determining womens' life expectancy?

In some affluent countries, women can now expect to live well into their eighties, while in sub-Saharan Africa most die before they reach their fifties.  We also know that only in the twentieth century did life expectancy start its rapid climb from an average in the thirties or low forties to today's unprecedented and continually rising levels.  It is thus fairly plausible that economic development and life expectancy have some kind of relationship.

The website for Gapminder contains an animated chart of the relationship between life expectancy at birth and living standards (measured by Gross Domestic Product per head) for all the countries of the world for about the last two centuries.  These two charts from the animation give the results for 1948 and 2011. The circles in the charts represent each country according to the size of its population, while the colours show the region of the world where the country is located.

Compare these two charts and note that over time countries have moved upwards (life expectancy increases) and to the right (wealth increases).  Note too that at any point in time, richer countries tend to have higher life expectancies.  Finally note how in the chart for 2011, countries with low life expectancies are concentrated in sub-Saharan Africa.

Let's examine this further using multiple regression and some data from the WDI 2011 dataset.