Description Usage Arguments Value
View source: R/competitorsAdapt.R
Takes a voter data frame, a competitor position data frame, the voters utility values for all competitors over the past two time periods and the voteTotals of all competitors from the past 2 time periods and applies the appropriate adaptation rule for each competitor based on their competitor type.
1 2 3 4 5 6 7 8 9 10 11 | competitorsAdapt(
competitorDataFrameCompetitorAdapts,
voteTotalsForCompetitorsOldCompetitorAdapts,
voteTotalsForCompetitorsNewCompetitorAdapts,
seatAllocationForCompetitorsNewCompetitorAdapts,
seatAllocationForCompetitorsOldCompetitorAdapts,
electoralFormulaCompetitorAdapts,
scaledCompetitorAdaptStepSizeCompetitorAdapts,
dimOneBoundsCompetitorsAdapt,
dimTwoBoundsCompetitorsAdapt
)
|
competitorDataFrameCompetitorAdapts |
a voteR dataFrame that contains the competitorID, current location, and comeptitor type for each competitor. |
voteTotalsForCompetitorsOldCompetitorAdapts |
a numCOmpetitors x 2 matrix containing each competitor's competitorID and their vote share from the previous period. |
voteTotalsForCompetitorsNewCompetitorAdapts |
a numCOmpetitors x 2 matrix containing each competitor's competitorID and their vote share from the current period. |
seatAllocationForCompetitorsNewCompetitorAdapts |
a numCOmpetitors x 2 matrix containing each competitor's competitorID and their vote share from the previous period. |
seatAllocationForCompetitorsOldCompetitorAdapts |
a numCOmpetitors x 2 matrix containing each competitor's competitorID and their vote share from the current period. |
electoralFormulaCompetitorAdapts |
The electoral formula being used in the model. In Plurality competitors maximize vote share, in PR systems they maximize seats. |
scaledCompetitorAdaptStepSizeCompetitorAdapts |
Size step the party can take. Should be in cartesian distance units. |
dimOneBoundsCompetitorsAdapt |
The bounds of the first dimension. |
dimTwoBoundsCompetitorsAdapt |
The bounds of the second dimension. |
outCompetitorDataFrameCompetitorAdapts
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.