Reply: GWDA and UK 2005 Election Results

Article excerpt

Introduction

This is a short response to some recent queries relating to the example of geographically weighted discriminant analysis (GWDA) applied to U.K. election results in 2005 in a paper I recently published with colleagues (Brunsdon, Fotheringham, and Charlton 2007). The two queries are about the performance of ordinary linear discriminant analysis (LDA) as reported in the paper, as opposed to that obtained using an SPSS analysis, and also the reasons for working with principal components rather than raw data in our reported analysis.

Predictions from the global LDA

As reported in our paper, the discriminant functions in ordinary LDA are based on the values of the predictor variables, the class (in this case the winning party), and the prior probabilities that each class will occur. The latter, in our analysis, was calculated using equation (4) as shown in our paper--for each party, the prior probability (i.e., the probability before any further details are supplied) of any constituency electing a candidate from party i is [p.sub.i], the proportion that this party is elected in the entire data set. In SPSS, two options are offered for the values of [p.sub.i] One is that just stated, and the other is to assign equal prior probabilities to each class--so that if there are m classes (here m = 3) then [p.sub.i] = 1/m. Assigning different values to the [p.sub.i]'s affects the predictions of a model--see equation (8) in our paper (or indeed any standard text on LDA). In our paper, we used priors based on proportions of the overall numbers of classes, that is, the first option previously listed. This specification predicted no Liberal Democrat seats returned. However, using the equal probabilities prior (i.e., [p.sub.i] = 1/3 for all parties) with the supplied Ida' function in R, the results are the same as those from SPSS (also with equal priors), which do perform better than those based on proportional priors.

This is perhaps surprising--since it would be unusual in recent U.K. elections to obtain overall equal proportions of parties (possibly the closest to this in recent years was in 1923)--however, this choice of priors does seem to give better predictions. Interestingly, however, I have now rerun the GWDA using equal priors (rather than proportions of classes according to the data, as in the paper)--with the two principal components used in our paper and obtained the results in Table 1. These suggest that, although global LDA with equal priors outperforms GWDA with proportional priors, GWDA with equal priors outperforms both of these.

Table 1 Running Geographically Weighted Discriminant Analysis with Prior
Probabilities Set to {1/3, 1/3, 1/3}

               Winner

CWDA     Con    Lab   Other  Total

Con      186     20     4     210
Lab        1    278     3     282
Other      9     16    52     77
Total    196    314    59

Working with principal components

Another question raised is the justification of the use of principal components. Therefore, explaining this further may be helpful. First, expressing the model in terms of principal components still allows for the influence of all six "raw" variables. If the initial variables are in a matrix X, then the principal component scores are S(X - m), where S is a matrix whose columns are the eigenvectors of the co-variance matrix of X and m is the vector of the means of the variables in X. If all of the components are required, then 5 is an m x m matrix where m is the number of variables. If the columns are arranged in order of the variance explained, then dropping the last m - k columns of S gives the expression for just the first k components.

Thus, one can write

Z = (X - m) s (1)

where Z is the matrix of component scores. If the linear discriminant function for class i has coefficients (in terms of the principal component model) given by [a.sub.i] then the function (excluding the constant term) is

Z[a. …