competitorsAdapt: competitorsAdapt Competitors Adapt According to their type/

Description Usage Arguments Value

View source: R/competitorsAdapt.R

Description

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.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
competitorsAdapt(
  competitorDataFrameCompetitorAdapts,
  voteTotalsForCompetitorsOldCompetitorAdapts,
  voteTotalsForCompetitorsNewCompetitorAdapts,
  seatAllocationForCompetitorsNewCompetitorAdapts,
  seatAllocationForCompetitorsOldCompetitorAdapts,
  electoralFormulaCompetitorAdapts,
  scaledCompetitorAdaptStepSizeCompetitorAdapts,
  dimOneBoundsCompetitorsAdapt,
  dimTwoBoundsCompetitorsAdapt
)

Arguments

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.

Value

outCompetitorDataFrameCompetitorAdapts


robiRagan/voteR documentation built on Feb. 27, 2020, 6:48 p.m.