Description Usage Arguments Value Examples
View source: R/genInitialStatusQuos.R
Generates a set of initial staus quo policies, each with a initialStatusQuoID number, an initial location using genIdeals
.
1 2 3 4 5 6 7 8 | genInitialStatusQuos(
numberOfDimensionsGenInitialStatusQuos = 2,
numberOfInitialStatusQuosGenInitialStatusQuos = 3,
distributionTypeGenInitialStatusQuos = "unif",
distributionParametersGenInitialStatusQuos = c(-1, 1),
dimOneBoundsGenInitialStatusQuos = c(-Inf, Inf),
dimTwoBoundsGenInitialStatusQuos = c(-Inf, Inf)
)
|
numberOfDimensionsGenInitialStatusQuos |
scalar Number of policy dimensions. Can be 1 or 2. |
numberOfInitialStatusQuosGenInitialStatusQuos |
Number of competitors to generate. |
distributionTypeGenInitialStatusQuos |
A string identifying the base R discribution to draw the ideal points from. Uses the base R random number generation family of commands rxxxx (see ?distributions). The user should specify the distribution as a string using the standard R abreviation for the distribution (see ?distributions for a list). Currently supported are: "norm", "unif", "beta", "cauchy", "chisq", "weibull" |
distributionParametersGenInitialStatusQuos |
A vector that contains the additional parameters needed by the particular rxxxx function for a distribtuion. (see ?rxxxx where xxxx is a function listed under ?distribution). Example for a Normal(0,1), use: c(0,1). |
dimOneBoundsGenInitialStatusQuos |
A vector that contains the starting and ending points of the first dimension. Example: c(0,1). Defaults to c(-Inf, Inf) if no boundary is provided. |
dimTwoBoundsGenInitialStatusQuos |
A vector that contains the starting and ending points of the second dimension. Example: c(0,1). Defaults to c(-Inf, Inf) if no boundary is provided. |
outInitialIdealsDataFrame data.frame. The initial status quos data frame will have the following format.
statusQuoID: A numeric identifier unique to the voter. xCord: The x coordinate of the initial status quo. yCord: The y coordinate of the voter's ideal point.
1 2 3 4 5 6 | genInitialStatusQuos(numberOfDimensionsGenInitialStatusQuos=1, numberOfInitialStatusQuosGenInitialStatusQuos=10, distributionTypeGenInitialStatusQuos ="unif", distributionParametersGenInitialStatusQuos = c(-1,1), dimOneBoundsGenInitialStatusQuos = c(-Inf,Inf), dimTwoBoundsGenInitialStatusQuos = c(-Inf,Inf) )
genInitialStatusQuos(numberOfDimensionsGenInitialStatusQuos=1, numberOfInitialStatusQuosGenInitialStatusQuos=100, distributionTypeGenInitialStatusQuos ="beta", distributionParametersGenInitialStatusQuos = c(.5,2) )
genInitialStatusQuos(numberOfDimensionsGenInitialStatusQuos=2, numberOfInitialStatusQuosGenInitialStatusQuos=1000, distributionTypeGenInitialStatusQuos ="norm", distributionParametersGenInitialStatusQuos = c(0,1) )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.