Description Usage Arguments Value
View source: R/genCompetitorType.R
Randomly type all competitors in the supoplied dataframe. genCompetitorType
is used in conjuction
with genIdeals
by genCompetitors
to generate
the characteristics of eac competitor.
1 2 3 4 5 6 7 | genCompetitorType(
numCompetitorsGenCompType,
allHunterGenCompType = FALSE,
probabilityHunterGenCompType = 1,
probabilityAggregatorGenCompType = 0,
probabilityPredatorGenCompType = 0
)
|
numCompetitorsGenCompType |
scalar Number of voters |
allHunterGenCompType |
logical If If FALSE (the default) then the distribution of competitor types is determined by the other parameters in this function. If TRUE then all agents will be of the Humter type and will seek votes by first miving at random. If the move increaes vote share then they continue to move in that directon. If the vote share stays the same or decreases then the competitor randomly selects a move that is between 90 and 270 degrees from the direction of their previous move. |
probabilityHunterGenCompType |
scalar [0,1] The probability that any given competitor will have the Hunter type. |
probabilityAggregatorGenCompType |
scalar [0,1] The probability that any given competitor will have the Aggregator type. |
probabilityPredatorGenCompType |
scalar [0,1] The probability that any given competitor will have the Predator type. |
outCompetitorType numCompetitors x 1 A vector of competitor types, one for each competitor.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.