Say we want to perform a logistical regression analysis (although my question pertains to regressions in general) on sports results to determine the effects of various factors on who wins and who loses. We have the background information we want on the teams and players and now just need a random sample.
So we decide to take the published results over the past couple of years as our sample. The sample we collect is in the following form:
Result, Team 1, Team 2, ...
The result is always 0-1 or 1-0 (no draws). We can start preparing the data by converting Result into a binary variable:
Result = 1 if Team 1 wins, = 0 if Team 2 wins.
The problem is that this doesn't give us a valid regression. The reason will take a bit of explaining. Say one of our observations is:
Result = 1; Team 1 = Man.U.; Team 2 = Chelsea
This observation can be rewritten:
Result = 0; Team 1 = Chelsea; Team 2 = Man.U.
And it is the exact same observation and all the information is still the same and perfectly correct.
And this actually changes the results of our regression! One quick way to prove this is to consider what happens if we rewrite all of the observations so that Team 1 always wins. Then our dependent variable will always be Result = 1. Thus Var(Result) = 0 and the estimates for our parameters will all be 0 (except for the constant, of course). If we flip half of the observations so that half the time Result = 1 and half the time Result = 0 and we run the regression on that, we will get non-zero estimates for our parameters.
This bothers me because we are regressing the same data but getting wildly different results based on the order the teams are written in. If our results can change based on the order we decided to put the teams down when recording our observations, then they can't be valid.
So what is the best way to prepare this data for analysis so that we can get valid results?