mi.fixed: Elementary function: imputation of constant variable.

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

Description

Imputes univariate constant missing data.

Usage

1
2
 mi.fixed( formula, data = NULL, missing.index = NULL, ... )
 mi.copy(Y, X, missing.index = NULL, ...)

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.

missing.index

The index of missing units of the outcome variable

Y

A variable that is collinear with X

.

X

A variable that is colliear 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

1
2
3
4
5
6
7
8
# 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)

mi documentation built on May 2, 2019, 4:43 p.m.

Related to mi.fixed in mi...