Description Usage Arguments Details Value Note Author(s) Examples
View source: R/simulation.functions2.R
Generates a random count vector for one observation of a multinomial
distribution for n
trials with probability vector pr
.
1 | rmultinomial(n = 5, pr = c(0.5, 0.5), long = FALSE)
|
n |
Number of trials. |
pr |
Probability vector. |
long |
|
Generates a random count vector for one observation of a multinomial
distribution for n
trials with probability vector pr
.
x |
Vector of counts. |
This function is only used in the examples and not in the
multinomRob
code.
Walter R. Mebane, Jr., University of Michigan,
wmebane@umich.edu, http://www-personal.umich.edu/~wmebane
Jasjeet S. Sekhon, UC Berkeley, sekhon@berkeley.edu, http://sekhon.berkeley.edu/
1 | rmultinomial(10, c(.3, .3, .4));
|
Loading required package: rgenoud
## rgenoud (Version 5.7-12.4, Build Date: 2015-07-19)
## See http://sekhon.berkeley.edu/rgenoud for additional documentation.
## Please cite software as:
## Walter Mebane, Jr. and Jasjeet S. Sekhon. 2011.
## ``Genetic Optimization Using Derivatives: The rgenoud package for R.''
## Journal of Statistical Software, 42(11): 1-26.
##
Loading required package: MASS
Loading required package: mvtnorm
##
## multinomRob (Version 1.8-6.1, Build Date: 2013/02/15)
## See http://sekhon.berkeley.edu/robust for additional documentation.
## Please cite as: Walter R. Mebane, Jr. and Jasjeet S. Sekhon. "Robust Estimation
## and Outlier Detection for Overdispersed Multinomial Models of Count Data".
## American Journal of Political Science, 48 (April): 391-410. 2004.
##
[1] 1 5 4
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.