Description Usage Arguments Details Value Author(s) References See Also Examples
Imputes missing data in a categorical variable using multinomial Log-linear Models.
1 2 3 4 5 6 |
formula |
a formula expression as for regression models, of the form
|
data |
A data frame containing the incomplete data and the matrix of the complete predictors. |
maxit |
Maximum number of iteration. |
MaxNWts |
The maximum allowable number of weights. See nnet for detail. |
missing.index |
The index of missing units of the outcome variable |
object |
|
x |
|
y |
Observed values. |
main |
main title of the plot. |
gray.scale |
When set to TRUE, makes the plot into gray scale with predefined color and line type. |
... |
Currently not used. |
multinom
calls the library nnet. See multinom
for other details.
model |
A summary of the multinomial fitted model. |
expected |
The expected values estimated by the model. |
random |
Vector of length n.mis of random predicted values predicted by using the multinomial distribution. |
Masanao Yajima yajima@stat.columbia.edu, Yu-Sung Su suyusung@tsinghua.edu.cn, M.Grazia Pittau grazia@stat.columbia.edu, Andrew Gelman gelman@stat.columbia.edu
Andrew Gelman and Jennifer Hill, Data Analysis Using Regression and Multilevel/Hierarchical Models, Cambridge University Press, 2007.
Yu-Sung Su, Andrew Gelman, Jennifer Hill, Masanao Yajima. (2011). “Multiple Imputation with Diagnostics (mi) in R: Opening Windows into the Black Box”. Journal of Statistical Software 45(2).
1 2 3 4 5 6 7 8 | x <-rnorm(100,0,1)
y <- x+4
y <- round(y)
y[y<0] <- 0
# create artificial missingness on y
y[seq(1,100,10)] <- NA
dat.xy <- data.frame(x,y)
mi.categorical(formula = y ~ x, data = dat.xy)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.