mi.fixed {mi} | R Documentation |
Imputes univariate constant missing data.
mi.fixed( formula, data = NULL, ... ) mi.copy(Y, X, ...)
formula |
an object of class '"formula"' (or one that can be coerced to that class): a symbolic description of the model to be fitted. See bayesglm 'formula' for details. |
data |
A data frame containing the incomplete data and the matrix of the complete predictors. |
Y |
A variable that is correlated with X |
X |
A variable that is correlated with Y |
... |
Currently not used |
model |
A summary of the fitted model. |
expected |
The expected values estimated by the model. |
random |
Vector of length n.mis of random predicted values predicted by using the normal distribution. |
Masanao Yajima yajima@stat.columbia.edu, 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, 2006.
# fake data n <- 100 x1 <- rbinom(n, 1, .45) x2 <- 2*x1 x1[c(1, 3, 5, 20, 26)] <- NA # impute data mi.copy(x1, x2)