nn.impute {SAGx}R Documentation

Impute mean based on k nearest neighbours

Description

The function uses the k nearest neighbours to calculate an average which is imputed.

Usage

nn.impute(data = d, k = 5, na.rate = 0.5, normalise = TRUE)

Arguments

data the data matrix containing NA's, with variables in columns
k the number of neighbours to use
na.rate The maximum na.rate tolerated
normalise if TRUE, the matrix will be normalised by column to unit variance

Details

Variables not satisfying the na.rate condition will be excluded

Value

A data matrix with imputed values

Author(s)

Per Broberg

References

Troyanskaya O, Cantor M, Sherlock G, Brown P, Hastie T, Tibshirani R, Botstein D, Altman RB: Missing value estimation methods for DNA microarrays, Bioinformatics 2001 Jun;17(6):520-5


[Package SAGx version 1.5.2 Index]