R/kMajorityRule-package.R

#' kMajorityRule: A package for simulating and investigating various kMajority Rule scenarios.
#'
#' The kMajorityRule package enables the simulation of various kMajority Rule scenarios. 
#' It allows for the examination of the code use in "An Expected Utility Analysis of the Optimal k-majority rule"
#'
#'
#' @section Functions:
#' 
#' The major fucntions in the package are:
#' \itemize{
#' \item \code{\link{aKMajorityRuleSimulation}}: Runs a series of proposals for J iterations, for all possible k-majority rules.
#' \item \code{\link{iterations}}: Runs numberOfIterations of seriesOfProposals() with the same set of initial parameters. Stores all of the input parameters, generated values and output for further analysis.
#' \item \code{\link{updateVoterLevelDataFrame}}: Takes an existing voter level data frame and a group level data frame that has had it's parameters changed and outputs a new voter level data frame.
#' \item \code{\link{seriesOfProposals}}: Runs a series of votes/multiple alternatives following a follows a "successive" voting procedure. Stores all of the input parameters, generated values and output for further analysis.
#' \item \code{\link{genVoterLevelDataFrame}}: Takes the information from a group level data frame generated by genGroupLevelDataframe(), and draws ui and ei for the groups of voters based on it.
#' \item \code{\link{genGroupLevelDataFrame}}: Creates a data.frame to hold the group level data for the simulation.
#' \item \code{\link{drawNormalValues}}: Draws ui or ei values from N(groupMean, groupStandardDeviation).
#' \item \code{\link{plotExpectedUtilityTotalCost}}: Plots the Total Cost, Decision Cost and Expected Utility measures for the voters of interest, in the round the proposal passed, for each of the kMajority rules.
#' \item \code{\link{plotNumberOfRounds}}: Plots the mean number of rounds it took for the status quo to be defeated for each k-majority rule, across all the iterations.
#' \item \code{\link{plotOnlyExpectedUtility}}: Plots the expected utility measures for the voters of interest, in the round the proposal passed, for each of the kMajority rules.
#' \item \code{\link{plotPareto}}: Plot the number of rounds (y-axis) where a Pareto preferred proposal failed by k-majority (x-axis).
#' }
#'Each function has detailed documentation that can be accessed using \code{?functionName}. For example \code{?iterations} with show the documentation for the \code{iterations()} function.
#'
#'  @section Demos:
#'  
#'  Each of the Figures can be replicated by calling its coresponding \code{demo()} at the console prompt.
#'  
#'  \itemize{
#'  \item \code{demo(demoFigure4A)}
#'  \item \code{demo(demoFigure4B)}
#'  \item \code{demo(demoFigure4C)}
#'  \item \code{demo(demoFigure4D)}
#'  \item \code{demo(demoFigure6A)}
#'  \item \code{demo(demoFigure6B)}
#'  \item \code{demo(demoFigure7A)}
#'  \item \code{demo(demoFigure7B)}
#'  \item \code{demo(demoFigure8A)}
#'  \item \code{demo(demoFigure8B)}
#'  }
#'  
#'  @section Psuedocode:
#'  The appendix to the paper contais extensive psuedo code that explains the basic logic of the code. 
#'  
#' @docType package
#' @name kMajorityRule
NULL
codeForReviewer/kMajorityRule documentation built on May 13, 2019, 8:47 p.m.