Treatment of Zeros, Left-Censored and Missing Values in Compositional Data Sets

Principled methods for the imputation of zeros, left-censored and missing data in compositional data sets (Palarea-Albaladejo and Martin-Fernandez (2015) ).

Imputation of Zeros, Nondetects and Missing Data in Compositional Data Sets



CHANGES IN zCompositions VERSION 1.2.0 [2019-02]:


  • lrEMplus: new function to simultaneously deal with zeros and missing data based on the EM algorithm.


  • zPatterns able to separate zero and missingness patterns. New warnings about either zeros or NAs not identified by the label argument.
  • Updated documentation.

CHANGES IN zCompositions VERSION 1.1.2 [2018-11]:


  • Minor bug fixed.
  • Updated documentation.

CHANGES IN zCompositions VERSION 1.1.1 [2017-08]:


  • lrEM now allows to impute missing data.
  • zVarArray: variation arrays by zero/unobserved data patterns or groups.
  • zVarArrayError: squared relative errors in variation arrays across groups.
  • zVarArrayTest: homogeneity test of variation arrays across groups.
  • lcTest: homogeneity test of log-contrast across groups.


  • Improved documentation.
  • Verbosity controlled throughout by suppress.print argument.
  • zPatterns: argument to show means (geometric or arithmetic) by pattern included.

CHANGES IN zCompositions VERSION 1.0.3-1 [2016-04]:


  • References updated and adaptation to new CRAN policies.

CHANGES IN zCompositions VERSION 1.0.3 [2014-09]:


  • Support for multiple limits of detection/threshold values by component.
  • Choice for storing multiply imputed data sets in lrDA function.
  • multKM: new non-parametric imputation method added.
  • splineKM: visualisation of Kaplan-Meier and cubic spline smoothed empirical cumulative distribution function (helper function for multKM).
  • New example data set included (Water).


  • Alternative imputation by multRepl in lrEM and lrDA of censoring patterns with only one observed component.

  • Fixed problem that caused error when a censoring pattern consisted of a single sample.

  • Improved documentation.

CHANGES IN zCompositions VERSION 1.0.1 [2014-06]:

  • Minor bugs in error messages fixed.

  • cmultRepl: label argument added (default label = 0).

CHANGES IN zCompositions VERSION 1.0.0 [2014-05]:


  • cmultRepl function: bayesian-multiplicative replacement of compositional count zeros included.

  • lrDA function: data augmentation algorithm, including multiple imputation, to replace left-censored values.

  • zPatterns function: summarises the patterns of unobserved values (censored, nondetects, ...) in a data set and generates a vector of labels.


  • General revision and optimisation. Documentation improvements.

  • multLN: parameter estimates based on the normal distribution on the positive real line. Random imputation based on truncated normal instead of rejection method.

  • Re-scaling to preserve ratios that leaves absolute observed values unaltered when working with non-closed data now implemented for all the methods (continuous data).

  • The replacement methods include an argument 'label' allowing the user to enter the label (special character, number, ...) denoting unobserved value in a data set.

  • Error handling introduced.

  • New lrEM function: replaces previous alrEM function and implements both ordinary and robust EM-based imputation methods. New arguments allow to specify the method to obtain initial estimates and the convergence criterion.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


1.4.0 by Javier Palarea-Albaladejo, 11 days ago

Browse source code at

Authors: Javier Palarea-Albaladejo [cre, aut] , Josep Antoni Martin-Fernandez [aut]

Documentation:   PDF Manual  

Task views: Missing Data

GPL (>= 2) license

Depends on methods, MASS, NADA, truncnorm

Imported by metamicrobiomeR, robCompositions.

Suggested by codacore.

See at CRAN