Iscores is a package intended to provide a framework for scoring imputations methods. It implements the scores described in Michel, Naef, Spohn and Meinshausen. 2021 . Examples of use of the library are shown below.
The package should be (soon) available on CRAN, To install the package from github you can run
install.packages("devtools")
::install_github("missValTeam/Iscores") devtools
<- 20
n <- cbind(rnorm(n),rnorm(n))
X <- X
X.NA 1] <- ifelse(runif(n)<=0.2, NA, X[,1])
X.NA[,
<- list()
imputations
1]] <- lapply(1:5, function(i) {
imputations[[<- X.NA
X.loc is.na(X.NA[,1]),1] <- mean(X.NA[,1],na.rm=TRUE)
X.loc[return(X.loc)
})
2]] <- lapply(1:5, function(i) {
imputations[[<- X.NA
X.loc is.na(X.NA[,1]),1] <- sample(X.NA[!is.na(X.NA[,1]),1], size = sum(is.na(X.NA[,1])), replace = TRUE)
X.loc[return(X.loc)
})
<- c("mean","sample")
methods
Iscores(imputations = imputations, methods = methods, X.NA = X.NA)
To report an issue, please use the issue tracker on github.com.