*! version 1.4 Aug 07 2015

Title

surveybiasseries -- Calculates measures of bias in a series of surveys

Command for raw data (single survey): surveybias

Immediate command: surveybiasi

Syntax

surveybiasseries [if] [in] [POPVARiables()]
SAMPLEvariables() Nvar() , GENerate() [DESCriptivenames]
[MISSasnull] [POPVALues()] [prop]

popvariables(v1, v2, ..., vk) k variables holding information
on true distribution of some categorical variable in the population

samplevariables(p1, p2, ..., pk) k variables holding
information on observed distribution of some categorical variable in a
series of samples

nvar(variable) Variable holding information on number of
observations in each sample

generate(newvarstub) Stub for new variables that will hold
the A's, B, B_w, and other statistics

DESCriptivenames from the names of the sample variables, generate descriptive names for variables that will hold the A's and Bs

prop Switch to estimation via proportion. Chiefly used for testing.

Description

surveybiasseries facilitates the calculation of various
measures of bias (A', B, B_w) for a series of surveys via surveybias. Each observation in the dataset represents an aggregated
survey. For each survey, the observed distribution of some categorical
variable (say voting intention) is given by a series of variables p1, p2,
..., pk. The distribution can be expressed in terms of simple frequencies,
relative frequencies, or percentages. Information on the true distribution
(say actual electoral returns) can be specified either directly via the
popvalues option, or as an argument to popvariables. Either
popvariables or popvalues must be specified, but not both. The
command leaves behind a series of variables whose names are derived from
the stub submitted via generate: one A' for each category that
represents category-specific bias, B as an overall measure of bias, B_w as
a weighted version of B, standard errors for each of these, the classical
(Pearson) Chi-square, a likelihood-based Chi-square, and the accompanying p
values.

Options

missasnull Irreversibly recodes missing values in
sample/population variables to zero

popvalues(numlist with k elements) Directly specify
distribution of the categorical in the population

Remarks

For detailed information the rationale behind the calculation of these
measures, see
Arzheimer, Kai and Jocelyn Evans, A New Multinomial Accuracy Measure
for Polling Bias, Political Analysis 2014 (22), 31-44.
http://dx.doi.org/10.1093/pan/mpt012

Examples

. use fivefrenchsurveys, replace

. surveybiasseries in 1/3 , popvar(*true) samplev(fh-other) nvar(N) gen(frenchsurveys)

. use german-pre-election-polls, replace

. parallel , : surveybiasseries, samplevariables(cducsu spd linke gruene fdp other) nvar(n) popvalues(41.5 25.7 8.6 8.4 4.8 10.9) generate(gpes)

Also see

surveybias (calculation of B and friends from raw data in memory) surveybias

surveybiasi (immediate calculation of B and friends) surveybiasi

Online: parallel