Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

impute.ZERO

Imputation of missing entries by 0.


Description

This function performs the trivial imputation of missing values by 0. Is is only used for comparison purposes.

Usage

impute.ZERO(dataSet.mvs)

Arguments

dataSet.mvs

A data matrix containing left-censored missing data.

Value

A complete expression data matrix with missing values imputed.

Author(s)

Cosmin Lazar

See Also

Examples

# generate expression data matrix
exprsDataObj = generate.ExpressionData(nSamples1 = 6, nSamples2 = 6,
                          meanSamples = 0, sdSamples = 0.2,
                          nFeatures = 1000, nFeaturesUp = 50, nFeaturesDown = 50,
                          meanDynRange = 20, sdDynRange = 1,
                          meanDiffAbund = 1, sdDiffAbund = 0.2)
exprsData = exprsDataObj[[1]]
  
# insert 15% missing data with 100% missing not at random
m.THR = quantile(exprsData, probs = 0.15)
sd.THR = 0.1
MNAR.rate = 100
exprsData.MD.obj = insertMVs(exprsData,m.THR,sd.THR,MNAR.rate)
exprsData.MD = exprsData.MD.obj[[2]]

# perform missing data imputation  
exprsData.imputed = impute.ZERO(exprsData.MD)

## Not run: 
hist(exprsData[,1])
hist(exprsData.MD[,1])
hist(exprsData.imputed[,1])

## End(Not run)

## The function is currently defined as
function (dataSet.mvs) 
{
    dataSet.imputed = dataSet.mvs
    dataSet.imputed[which(is.na(dataSet.mvs))] = 0
    return(dataSet.imputed)
  }

imputeLCMD

A collection of methods for left-censored missing data imputation

v2.0
GPL (>= 2)
Authors
Cosmin Lazar
Initial release
2015-01-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.