impCoda(x, maxit = 10, eps = 0.5, method = "ltsReg", closed = FALSE, init = "KNN", k = 5, dl = rep(0.05, ncol(x)), noise = 0.1, bruteforce = FALSE)
closed
equals TRUE)method: Several different methods can be chosen, such as ltsReg:
least trimmed squares regression is used within the iterative procedure.
lm: least squares regression is used within the iterative
procedure. classical: principal component analysis is used within
the iterative procedure. ltsReg2: least trimmed squares regression
is used within the iterative procedure. The imputated values are perturbed
in the direction of the predictor by values drawn form a normal distribution
with mean and standard deviation related to the corresponding residuals and
multiplied by noise
.
method roundedZero is experimental. It imputes rounded zeros within our iterative framework.
impKNNa
, isomLR
data(expenditures)
x <- expenditures
x[1,3]
x[1,3] <- NA
xi <- impCoda(x)$xImp
xi[1,3]
s1 <- sum(x[1,-3])
impS <- sum(xi[1,-3])
xi[,3] * s1/impS
Run the code above in your browser using DataLab