Description Usage Arguments Details Value Author(s) References See Also Examples

These methods are for SIMULATION STUDIES. These functions will build a sample, i.e. simulated, record of votes given certain parameters.

1 2 3 4 5 6 7 | ```
make.cartoon(n = 400, vote.dist = c(125, 113, 13),
stratify = TRUE)
make.sample(M, N, strata = 1, per.winner = NULL,
worst.e.max = NULL, R = NULL,
tot.votes = 1e+05)
make.sample.from.totals(vote.W, vote.L, totals)
make.sample.from.totals.margin(M, totals, per.winner = NULL)
``` |

`M` |
The margin desired between the winner and loser (as a percent). |

`N` |
Number of precincts desired. |

`strata` |
Number of strata desired. |

`per.winner` |
The percent of votes the winner should receive. |

`worst.e.max` |
The worst e.max possible for any precinct. |

`R` |
The "dispersion" a measure of how unequal in size precincts should be. R needs to be greater than 0. NULL indicates equal size. For R between 0 and 1, the precincts are distributed 'linearly', i.e., the size of precinct i is proportional to i. At 2, the smallest precint will be near 0 and the largest twice the average votes per precinct. After 2, the precincts are distributed in a more curved fashion so that the smaller precincts do not go negative. |

`tot.votes` |
The total votes desired. |

`vote.W` |
Total votes for winner. |

`vote.L` |
Total votes for loser. |

`totals` |
Vector of total votes for precincts. |

`vote.dist` |
reported votes for C1, C2, and C3 in order for all precincts.prompt |

`n` |
Size of sample. |

`stratify` |
Should the sample be stratified? |

make.cartoon() makes the sample scenario described in Stark's CAST paper.

A elec.data object meeting the desired specifications.

Luke W. Miratrix

See http://www.stat.berkeley.edu/~stark/Vote/index.htm for relevant information.

1 2 3 4 5 6 7 8 9 10 | ```
Z = make.sample(0.08, 150, per.winner=0.4)
Z
Z2 = make.sample(0.08, 150, per.winner=0.4, R=2.2)
Z2
## Note how they have different precinct sizes.
summary(Z$V$tot.votes)
summary(Z2$V$tot.votes)
``` |

elec documentation built on May 30, 2017, 5:51 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.