In a recent paper, we derive various multinomial measures of bias in public opinion surveys (e.g. pre-election polls). Put differently, with our methodology, you may calculate a scalar measure of survey bias in multi-party elections.

Thanks to Kit Baum over at Boston College, our Stata add-on `surveybias.ado`

is now available from Statistical Software Components (SSC). The add-on takes as its argument the name of a categorical variable and said variable’s true distribution in the population. For what it’s worth, the program tries to be smart: `surveybias vote, popvalues(900000 1200000 1800000)`

, `surveybias vote, popvalues(0.2307692 0.3076923 0.4615385)`

, and `surveybias vote, popvalues(23.07692 30.76923 46.15385)`

should all give the same result.

If you don’t have access to the raw data but want to assess survey bias evident in published figures, there is `surveybiasi`

, an “immediate” command that lets you do stuff like this: `surveybiasi , popvalues(30 40 30) samplevalues(40 40 20) n(1000)`

. Again, you may specify absolute values, relative frequencies, or percentages.

If you want to go ahead and measure survey bias, install `surveybias.ado`

and `surveybiasi.ado`

on your computer by typing `ssc install surveybias`

in your net-aware copy of Stata. And if you use and like our software, please cite our forthcoming Political Analysis paper on the New Multinomial Accuracy Measure for Polling Bias.