Learn R Programming

Iscores: scoring imputations methods

Overview

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.

Installation

The package should be (soon) available on CRAN, To install the package from github you can run

install.packages("devtools")
devtools::install_github("missValTeam/Iscores")

Examples:

n <- 20
X <- cbind(rnorm(n),rnorm(n))
X.NA <- X
X.NA[,1] <- ifelse(runif(n)<=0.2, NA, X[,1])

imputations <- list()

imputations[[1]] <- lapply(1:5, function(i) {
  X.loc <- X.NA
  X.loc[is.na(X.NA[,1]),1] <- mean(X.NA[,1],na.rm=TRUE)
  return(X.loc)
})

imputations[[2]] <- lapply(1:5, function(i) {
  X.loc <- 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)
  return(X.loc)
})

methods <- c("mean","sample")

Iscores(imputations = imputations, methods = methods, X.NA = X.NA)

Issues

To report an issue, please use the issue tracker on github.com.

Copy Link

Version

Install

install.packages('Iscores')

Monthly Downloads

234

Version

1.1.0

License

GPL-3

Maintainer

Loris Michel

Last Published

January 5th, 2022

Functions in Iscores (1.1.0)

combine2Forests

Combining projection forests
compute_drScore

compute the density ratio score
combineForests

Combining a list of forest
sample.vars.proj

Sampling of Projections
truncProb

Truncation of probability
doevaluation

doevaluation: compute the imputation KL-based scoring rules
Iscores

Iscores: compute the imputation KL-based scoring rules
class.balancing

Balancing of Classes
densityRatioScore

Computation of the density ratio score