mi.fixed {mi}R Documentation

Elementary function: imputation of constant variable.

Description

Imputes univariate constant missing data.

Usage

 mi.fixed( formula, data = NULL, ... )
 mi.copy(Y, X, ...)

Arguments

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

Value

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.

Author(s)

Masanao Yajima yajima@stat.columbia.edu, M.Grazia Pittau grazia@stat.columbia.edu, Andrew Gelman gelman@stat.columbia.edu

References

Andrew Gelman and Jennifer Hill, Data Analysis Using Regression and Multilevel/Hierarchical Models, Cambridge University Press, 2006.

See Also

mi.info, mi.method, mi

Examples

# 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)


[Package mi version 0.04-6 Index]