Estimates RxC vote transfer matrices (ecological contingency tables) with tslphom_dual
tslphom_dual(
votes_election1,
votes_election2,
integers = FALSE,
solver = "lp_solve",
integers.solver = "symphony",
...
)
A list with the following components
The matrix of order JxK with the estimated cross-distribution of votes of elections 1 and 2, attained weighting the two dual solutions using as weights the corresponding HTEe estimates.
The array of order JxKxI with the local estimated cross-distributions of votes of elections 1 and 2 by unit, attained weighting the two dual solutions using as weights the corresponding HTEe estimates.
The matrix of order JxK with the estimated cross-distribution of votes of elections 1 and 2, attained simple averaging the two dual solutions.
The matrix of order JxKxI with the estimated cross-distributions of votes of elections 1 and 2 by unit, attained weighting the two dual solutions using as weights the corresponding HTEe estimates.
Estimated heterogeneity index associated to the VTM.votes.w
solution.
Estimated heterogeneity index associated to the VTM.votes.a
solution.
The matrix of order JxK with the estimated row-standardized proportions of vote transitions from election 1
to election 2 associated to the VTM.votes.w
solution.
The matrix of order KxJ with the estimated row-standardized proportions of vote transitions from election 2
to election 1 associated to the VTM.votes.w
solution.
The matrix of order JxK with the estimated row-standardized proportions of vote transitions from election 1
to election 2 associated to the VTM.votes.a
solution.
The matrix of order KxJ with the estimated row-standardized proportions of vote transitions from election 2
to election 1 associated to the VTM.votes.a
solution.
The output of the tslphom
function attained solving the problem X --> Y,
that is, mapping votes_election1
to rows and votes_election2
to columns.
The output of the tslphom
function attained solving the problem Y --> X,
that is, mapping votes_election2
to rows and votes_election1
to columns.
A list containing all the objects with the values used as arguments by the function.
data.frame (or matrix) of order IxJ with the counts to be initially
mapped to rows. When estimating vote transfer matrices, the votes gained by
the J political options competing on election 1 (or origin) in the I
territorial units considered. The sum by rows of votes_election1
and
votes_election2
must coincide.
data.frame (or matrix) of order IxK with the counts to be initially mapped
to columns. When estimating vote transfer matrices, the votes gained by
the K political options competing on election 2 (or destination) in the I
territorial units considered. The sum by rows of votes_election1
and
votes_election2
must coincide.
A TRUE/FALSE
value that indicates whether the problem is solved in integer values
in both iterations: zero (lphom) and final (including unit) solutions. If TRUE
, the LP matrices
are approximated to the closest integer solution solving the corresponding Integer Linear Program.
Default, FALSE
.
A character string indicating the linear programming solver to be used, only
lp_solve
and symphony
are allowed. By default, lp_solve
. The package Rsymphony
needs to be installed for the option symphony
to be used.
A character string indicating the linear programming solver to be used to approximate
to the closest integer solution, only symphony
and lp_solve
are allowed.
By default, symphony
. The package Rsymphony
needs to be installed for the option symphony
to be used. Only used when integers = TRUE
.
Other arguments to be passed to the function. Not currently used.
Jose M. Pavia, pavia@uv.es
Rafael Romero rromero@eio.upv.es
Pavia, JM and Romero, R (2024). Symmetry estimating RxC vote transfer matrices from aggregate data. Journal of the Royal Statistical Society, Series A – Statistics in Society, 187(4), 919-943. tools:::Rd_expr_doi("10.1093/jrsssa/qnae013")
tslphom
lphom_dual
nslphom_dual
lphom_joint
tslphom_joint
nslphom_joint
Other linear programing ecological inference functions:
lclphom()
,
lp_apriori()
,
lphom_dual()
,
lphom_joint()
,
lphom()
,
nslphom_dual()
,
nslphom_joint()
,
nslphom()
,
rslphom()
,
tslphom_joint()
,
tslphom()
x <- France2017P[, 1:8]
y <- France2017P[, 9:12]
y[,1] <- y[,1] - (rowSums(y) - rowSums(x))
mt <- tslphom_dual(x, y)
mt$VTM.votes.w
mt$HETe.w
Run the code above in your browser using DataLab