# meanDifferences: meanDifferences In mcalgaro93/benchdamic: Benchmark of differential abundance methods on microbiome data

 meanDifferences R Documentation

## meanDifferences

### Description

Compute the differences between the estimated and the observed continuity corrected logarithms of the average count values (MD), and between the estimated average probability to observe a zero and the the observed zero rate (ZPD).

### Usage

``````meanDifferences(estimated, observed)
``````

### Arguments

 `estimated` a two column data.frame, output of `fitNB`, `fitZINB`, `fitDM`, `fitZIG`, or `fitHURDLE` functions. More in general, a data frame containing the continuity corrected logarithm for the average of the fitted values for each row of a matrix of counts in the `Y` column, and the estimated probability to observe a zero in the `Y0` column. `observed` a two column data.frame, output of `prepareObserved` function. More in general, a data frame containing the continuity corrected logarithm for the average of the observed values for each row of a matrix of counts in the `Y` column, and the estimated proportion of zeroes in the `Y0` column.

### Value

a `data.frame` containing the differences between the estimated and the observed continuity corrected logarithms of the average count values in the `MD` column, and between the estimated average probability to observe a zero and the the observed zero rate in the `ZPD` column.

`prepareObserved`.

### Examples

``````# Randomly generate the observed and estimated data.frames
observed <- data.frame(Y = rpois(10, 5), Y0 = runif(10, 0, 1))
estimated <- data.frame(Y = rpois(10, 5), Y0 = runif(10, 0, 1))

# Compute the mean differences between estimated and observed data.frames
meanDifferences(estimated, observed)
``````

mcalgaro93/benchdamic documentation built on March 10, 2024, 10:40 p.m.