BBPMM.row(misDataPat, blockImp=length(misDataPat$blocks), M=10, outfile=NULL, manWeights=NULL, stepmod="stepAIC", verbose=TRUE, tol=0.25, setSeed=NULL, ...)
rowimpPrep
that
contains information on all identified missing-data patterns.qr
that specifies the
tolerance level for linear dependencies among the complete
variables and defaults to 0.25.BBPMM.row
.Random.Seed
before imputation starts..Random.Seed
after function is done.rowimpPrep
.
The donor/recipient ID pairlist for each imputation and identified pattern
(block) is stored. In general, weightMatrix, model and pairlist
are list objects named M1 to Mlm
-objects for all variables in a particular block.
Unlike BBPMM
this algorithm is not based on sequential
regression. Therefore, imputed variables are conditionally independent
given the completely observed variables (of which at least one must exist).Eddelbuettel, D. and Francois, R. (2011) Rcpp: Seamless R and C++ Integration. Journal of Statistical Software, Vol. 40, No. 8, pp. 1--18. URL http://www.jstatsoft.org/v40/i08/. Eddelbuettel, D. and Sanderson, C. (2014) RcppArmadillo: Accelerating R with high-performance C++ linear algebra. Computational Statistics and Data Analysis, Vol. 71, March 2014, pp. 1054--1063.
Koller-Meinfelder, F. (2009) Analysis of Incomplete Survey Data -- Multiple Imputation Via Bayesian Bootstrap Predictive Mean Matching, doctoral thesis.
Little, R.J.A. (1988) Missing-Data Adjustments in Large Surveys, Journal of Business and Economic Statistics, Vol. 6, No. 3, pp. 287-296. Raghunathan T.E. and Lepkowski, J.M. and Van Hoewyk, J. and Solenberger, P (2001) A multivariate technique for multiply imputing missing values using a sequence of regression models. Survey Methodology, Vol. 27, pp. 85--95. Rubin DB (1981) The Bayesian Bootstrap. The Annals of Statistics, Vol. 9, pp. 130--134. Rubin, D.B. (1987) Multiple Imputation for Non-Response in Surveys. New York: John Wiley & Sons, Inc. Van Buuren, S. and Brand, J.P.L. and Groothuis-Oudshoorn, C.G.M. and Rubin, D.B. (2006) Fully conditional specification in multivariate imputation. Journal of Statistical Computation and Simulation, Vol. 76, No. 12, pp. 1049--1064. Van Buuren, S. and Groothuis-Oudshoorn, K. (2011) mice: Multivariate Imputation by Chained Equations in R. Journal of Statistical Software, Vol. 45, No. 3, pp. 1--67. URL http://www.jstatsoft.org/v45/i03/. Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S. Fourth Edition. New York: Springer.
rowimpPrep
, BBPMM
### sample data set with non-normal variables and a single
### missingness pattern
set.seed(1000)
n <- 50
x1 <- round(runif(n,0.5,3.5))
x2 <- as.factor(c(rep(1,10),rep(2,25),rep(3,15)))
x3 <- round(rnorm(n,0,3))
y1 <- round(x1-0.25*(x2==2)+0.5*x3+rnorm(n,0,1))
y1 <- ifelse(y1<1,1,y1)
y1 <- ifelse(y1>4,5,y1)
y2 <- y1+rnorm(n,0,0.5)
y3 <- round(x3+rnorm(n,0,2))
data <- as.data.frame(cbind(x1,x2,x3,y1,y2,y3))
misrow1 <- sample(n,20)
data[misrow1, c(4:6)] <- NA
### preparation step
impblock <- rowimpPrep(data)
### imputation
imputed.data <- BBPMM.row(impblock, M=5)
Run the code above in your browser using DataLab