View source: R/simula_mixture.R
| simula_mixture | R Documentation |
Generates a set of RxC electoral contingency tables under a mixture of voting behaviours, including ecological fallacy effects, within the Overdispersed Multinomial model framework proposed by Forcina et al. (2012), an extension of Brown and Payne (1986). The simulated tables represent the joint distribution of voters in two elections across a set of voting units. Each table is generated using a mixture model that incorporates seven latent voter types, where, consistent with the tradition of mixture models, the number of voters of each type in every unit is assumed to follow a multinomial distribution. The seven electoral behaviours considered (ordinary, faithful, trendy, local retrospective strategic, global retrospective strategic, (global) strategic, and economic voters) are specified in the function's arguments and in Details.
simula_mixture(
n.units,
TP,
prop1,
polling.sizes,
theta1 = 0.1,
theta2 = 0.1,
cs = 50,
tau,
TP.f,
TP.t,
LRSV.par,
GRSV.par,
GSV.par,
eco.par,
simplify = FALSE,
...
)
n.units |
Either a positive integer, |
TP |
A |
prop1 |
A vector of length R with the initial assumed probabilities of voting (to be simulated) for each of the R competing options in the first election. If the provided vector is not a set of probabilities (i.e., a vector of positive numbers adding to 1), it is internally standardized by the function. |
polling.sizes |
Either a vector of two components with two positive integer
numbers indicating the minimum and maximum number of voters
for each unit or a vector of length |
theta1 |
A number between 0 and 1 used as the overdispersion parameter.
This parameter is employed by the underlying Dirichlet distribution,
in conjunction with |
theta2 |
Either a single number between 0 and 1 or a vector of length |
cs |
A positive number indicating the average number of cluster size. Default, |
tau |
An |
TP.f |
A |
TP.t |
A non-negative vector of length |
LRSV.par |
A |
GRSV.par |
A |
GSV.par |
A |
eco.par |
A list with three vectors governing the behaviour of economic voters.
These voters prioritise economic performance, rewarding or punishing
parties in the governing coalition based on the perceived local change
in the economic situation. The first component is a vector of length K,
whose elements capture the (perceived) variation in the economy across
voting units, with positive values indicating improvement.
The second component is a vector of length
|
simplify |
A TRUE/FALSE argument indicating whether the simulated RxCxK array of counts by polling unit should be rearranged as a matrix of order Kx(RC). Default, FALSE. |
... |
Other arguments to be passed to the function. Not currently used. |
Description of how parameters for strategic and economic voters are combined.
local retrospective strategic voters: These are voters who consider retrospective outcomes
and make tactical decisions to maximize their preferred outcomes, not necessarily their first choice.
Their decisions are assumed to depend on the local strength of the party they supported in the previous election.
(i) If their party was a minor one, they will support it again when it appears sufficiently strong,
or vote for a different option to avoid wasting their vote;
(ii) If their party was a major one, they will support it again when it seems to require their support
in order to remain strong enough; otherwise, they may choose differently.
Formally, let \mathbf{f}_{r} denote the rth row of the matrix \mathbf{F} for faithful voters,
and let \mathbf{\lambda}_{r} denote the vector of logits \log(\mathbf{p}_{r}/p_{rC})
based on the matrix of transition probabilities for ordinary voters.
The vector of retrospective-strategy-local-modified logits for voting unit s is defined as
\mathbf{\lambda}_{sr}^{LRS} = \mathbf{\lambda}_{r} + \beta_{r}(\pi_{sr} - a_{r}),
where a_{r} is the threshold for party r, \pi_{sr} is the proportion of votes
gained by party r in voting unit s in the first election, and \beta_{r} is the corresponding mapping parameter,
non-negative for minor parties and non-positive for major parties.
In words, \mathbf{\lambda}_{r} is the vector of logits for ordinary voters (representing
basic preferences), \pi_{sr} represents the local strength of party r in unit s,
a_{r} is the threshold parameter that determines the switching point in voter behaviour,
and \beta_{r} adjusts the degree of strategic consideration.
Under this specification, because of the interaction with the difference (\pi_{sr} - a_{r}),
a value of \beta_{r} > 0 makes voters more likely to support their party
if it appears sufficiently strong and less likely otherwise,
whereas a value of \beta_{r} < 0 makes voters less likely to support their party
if it appears sufficiently strong and more likely otherwise.
global retrospective strategic voters: These voters behave similarly to local retrospective strategic voters, but consider global rather than local results. They take retrospective outcomes into account
and make tactical decisions to maximize their preferred outcomes, not necessarily their first choice.
Their decisions are assumed to depend on the overall strength of the party they supported in the previous election.
(i) If their party was a minor one, they will support it again when it appears sufficiently strong,
or vote for a different option to avoid wasting their vote;
(ii) If their party was a major one, they will support it again when it seems to require their support
in order to remain strong enough; otherwise, they may choose differently.
Formally, let \mathbf{f}_{r} denote the rth row of the matrix \mathbf{F} for faithful voters,
and let \mathbf{\lambda}_{r} denote the vector of logits \log(\mathbf{p}_{r}/p_{rC})
based on the matrix of transition probabilities for ordinary voters.
The vector of retrospective-strategy-global-modified logits is defined as
\mathbf{\lambda}_{r}^{GRS} = \mathbf{\lambda}_{r} + \beta_{r}(\pi_{r} - b_{r}),
where b_{r} is the threshold for party r, \pi_{r} is the total proportion of votes
gained by party r in the first election, and \beta_{r} is the corresponding mapping parameter,
non-negative for minor parties and non-positive for major parties.
In words, \mathbf{\lambda}_{r} is the vector of logits for ordinary voters (representing
basic preferences), \pi_{r} represents the global strength of party r in the first election,
b_{r} is the threshold parameter that determines the switching point in voter behaviour,
and \beta_{r} adjusts the degree of strategic consideration.
Under this specification, because of the interaction with the difference (\pi_{r} - b_{r}),
a value of \beta_{r} > 0 makes voters more likely to support their party
if it appears sufficiently strong and less likely otherwise,
whereas a value of \beta_{r} < 0 makes voters less likely to support their party
if it appears sufficiently strong and more likely otherwise.
global strategic voters: These voters behave similarly to global retrospective
strategic voters, but base their decisions on expected results in the second election.
They consider expected outcomes and make tactical decisions to maximize their preferred
outcomes, not necessarily their first choice. Their decisions are assumed to depend on the
expected overall strength in the second election of the party they supported in the first election,
knowledge that in practice may be obtained from surveys.
(i) If their party was a minor one, they will support it again when it appears sufficiently strong,
or vote for a different option to avoid wasting their vote;
(ii) If their party was a major one, they will support it again when it seems to require their support
to remain strong enough; otherwise, they may choose differently.
Formally, let \mathbf{f}_{r} denote the rth row of the matrix \mathbf{F} for faithful voters,
and let \mathbf{\lambda}_{r} denote the vector of logits \log(\mathbf{p}_{r}/p_{rC})
based on the matrix of transition probabilities for ordinary voters.
Assuming the same order of parties in the first and second elections for those parties affected
by strategic voters, the vector of strategy-global-modified logits is defined as
\mathbf{\lambda}_{r}^{GS} = \mathbf{\lambda}_{r} + \beta_{r}\left(\sum_{j}\pi_{j} p_{jr} - c_{r}\right),
where c_{r} is the threshold for party r, \pi_{j} is the total proportion of votes
gained by party j in the first election, p_{jr} is the transition probability from party j
to party r for ordinary voters, and \beta_{r} is the corresponding transforming parameter,
non-negative for minor parties and non-positive for major parties.
In words, \mathbf{\lambda}_{r} is the vector of logits for ordinary voters (representing
basic preferences), \sum_{j}\pi_{j} p_{jr} represents the expected global strength of party r
in the second election, c_{r} is the threshold parameter that determines the switching point in voter behaviour,
and \beta_{r} adjusts the degree of strategic consideration.
Under this specification, because of the interaction with the difference \sum_{j}(\pi_{j} p_{jr}) - c_{r},
a value of \beta_{r} > 0 makes voters more likely to support their party
if it appears sufficiently strong and less likely otherwise,
whereas a value of \beta_{r} < 0 makes voters less likely to support their party
if it appears sufficiently strong and more likely otherwise.
economic voters: These voters prioritise economic performance, rewarding or punishing
parties in the governing coalition based on the perceived change in the local economic situation.
Formally, let \mathbf{v}_{s} denote the perceived measure of economic variation in unit s,
\mathbf{\lambda}_{r} the vector of logits \log(\mathbf{p}_{r}/p_{rC}) based on the
matrix of transition probabilities for ordinary voters, and \mathbf{g} a vector with entries
equal to 1 for parties in the governing coalition and 0 otherwise. The vector of economically
modified logits for voting unit s is then defined as
\mathbf{\lambda}_{sr}^{E} = \mathbf{\lambda}_{r} + \beta_{r} \mathbf{v}_{s} \mathbf{g},
with \beta_{r} > 0 being the mapping parameter. Under this specification, these voters are more likely to support
government parties if the local economy improves.
A list with the following components
votes1 |
A |
votes2 |
A |
TM.global |
An |
TM.units |
An |
TM.by.behaviour |
A list with seven components, each of which is itself a list containing the
four simulated elements ( |
inputs |
A list containing all the objects with the values used as arguments by the function. |
Compared with simula_BPF_with_deviations, this function (i) is not restricted to square matrices; (ii) considers up to seven voter types; and (iii) because it mixes distributions, it draws from a distribution with larger variance, even when the latent types and their parameters are the same.
Jose M. Pavia, pavia@uv.es
Antonio Forcina, forcinarosara@gmail.com
Brown, P. and Payne, C. (1986). Aggregate data, ecological regression and voting transitions. Journal of the American Statistical Association, 81, 453–460. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/01621459.1986.10478290")}
Forcina, A., Gnaldi, M. and Bracalente, B. (2012). A revised Brown and Payne model of voting behaviour applied to the 2009 elections in Italy. Statistical Methods & Applications, 21, 109–119. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/s10260-011-0184-x")}
simula_BPF simula_BPF_with_deviations
TMg <- matrix(c(0.6, 0.1, 0.3, 0.1, 0.7, 0.2, 0.1, 0.1, 0.8),
byrow = TRUE, nrow = 3)
example <- simula_mixture(n.units = 100, TP = TMg, prop1 = c(0.3, 0.3, 0.4),
polling.sizes = c(750, 850))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.