Sample state data

State     Percent_ethnicity=1   Percent_voting=1
A         20%                   60%
B         56%                   65%

Sample city data

city   State     Percent_ethnicity=1   Percent_voting=1
1      A         77%                   70%
2      A         46%                   25%
1      B         56%                   67%

I have aggregated race and voting choice data at the state and city levels. Say, the ecological regression model looks like this at the state level (where j is states, Y is percent voting for 1 (only 2 options: 0, 1), X is the percent of race being 1 (only 2 options: 0, 1), E is the error term):

Yj = a + b*Xj + Ej

I would like to model a and b via a linear regression model.

After that say, I am switching to analyzing the ecological regression at city level (where p is cities, Y is percent voting for 1 (only 2 options: 0, 1), X is the percent of race being 1 (only 2 options: 0, 1), N is the error term):

Yp = a + b*Xp + Np

Would I be able to infer anything without seeing the results how the a, b, and E/N estimates compared/changed between the two ecological models?

  • 1
    $\begingroup$ You do not really want to model a binary outcome using linear regression. $\endgroup$ – Björn Mar 2 '16 at 6:48
  • $\begingroup$ Individual data is binary, but they are aggregated at the state and city levels as percentages $\endgroup$ – KubiK888 Mar 2 '16 at 7:36
  • $\begingroup$ @Björn has a good point. If you know the numbers who voted (not just the percentages) then a logistic model would be appropriate. Otherwise, you could consider beta regression. Note that your confidence in a percentage value will be higher in cases where more votes were cast. Standard linear regression is risky here. Also, do you have data on all cities (and towns and unincorporated areas etc) within each State so that a nested analysis (city within State) is possible? $\endgroup$ – EdM Mar 4 '16 at 14:46
  • $\begingroup$ I am not sure what it means by doing logistic regression, I have different data sets providing each of the data and only linkable through the area variables. I think I can only do logistic regression if I know both the voting decision and ethnicity of the same individual but I don't from the existing data. $\endgroup$ – KubiK888 Mar 4 '16 at 16:09
  • $\begingroup$ You do know that a percentage cannot be >100% or <0%, so linear regression (that has no mechanism of avoiding such predictions) seems like it might well not be the right thing to do. If you always have 1000s of voters and the percentages you are interested are always around 50%, then of course a linear model might be an okay approximation. A vanilla flavor standard logistic regression for individual voter data will indeed not be possible, but that is not necessarily a reason to not consider the underlying distribution (and to e.g. model logit(p) accounting for the distribution of covariates). $\endgroup$ – Björn Mar 4 '16 at 16:38

The coefficients and error terms would almost certainly differ between the state and city level, but for reasons that you probably did not intend.

Coefficients. The way you have posed the problem, you would be taking averages of percentage voting 1 by city without taking population into account. An extreme example shows the danger. Say that there is no racial/ethnic* difference in voting, and that a State has 1000 cities. In the single large city, all 1,000,000 people vote for 1; all 1000 voters in each of the 999 other cities vote for 0. Averaged over people in the State, 1 wins with a bit over 50% of the vote, but 0 gets 99.9% averaged over the cities (without taking population into account).

Error terms. In a linear regression, error terms include everything that the linear model missed: non-linear effects, interactions, important variables missing from the model. So say that the influence of race/ethnicity on voting is different in a rural southern state than a northern urban state. If the model ignores that possibility, then you would expect different errors for within-state versus among-state comparisons. Much of statistics is trying to figure out what lurks within those error terms and to take them into account.

Two messages here. First, although I expect that you intended to take population size into account, the way you posed the model in your question did not. Whether you model your outcome variable as a percentage or as a number of votes, your analysis must include population size. A generalized linear model rather than a standard linear regression is called for.

Second, you need to be a good deal more specific in formulating your model. There are ways to take additional variables, interactions, the fact that each city has its own associated state, and so forth, into account. Even if you choose to develop a simpler model, forcing yourself to consider these additional possibilities will mean that you are at least doing so with your eyes open to them. A solid understanding of different statistical designs, as you might get from an advanced statistics course, would help. See this page as an example of what can be included in a voting/demographic model.

*In US bureaucratic terms, race and ethnicity are distinct concepts. If you conflate them as you do in this question, others reviewing your work will take you much less seriously.

  • $\begingroup$ Thanks, I have also come up with "proof"/rationale that they are likely change, but thanks very much for giving your reasoning so I can view it in a different angle. I also agree your point about the generalized than standard linear model in order to capture the within-cluster correlations. $\endgroup$ – KubiK888 Mar 7 '16 at 17:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.