fitZIG {benchdamic} | R Documentation

## fitZIG

### Description

Fit a Zero-Inflated Gaussian (ZIG) distribution for each taxon of the count data. The model estimation procedure is performed by metagenomeSeq `fitZig` function without assuming the presence of any group in the samples (design matrix equal to a column of ones.)

### Usage

    fitZIG(counts, scale = "default", verbose = TRUE)

### Arguments

`counts` | a phyloseq object or a matrix of counts with features (OTUs, ASVs, genes) by row and samples by column.
`scale` | Character vector, either `median` or `default` to choose between the median of the library size or one thousand to scale normalization factors.
`verbose` | an optional logical value. If `TRUE` information on the steps of the algorithm is printed. Default `verbose = TRUE`.

### Value

A data frame containing the continuity corrected logarithms of the average fitted values for each row of the matrix of counts in the `Y` column, and the estimated probability to observe a zero in the `Y0` column.

### Examples

    # Generate some random counts
    counts = matrix(rnbinom(n = 60, size = 3, prob = 0.5), nrow = 10, ncol = 6)

    # Fit model on the counts matrix
    ZIG <- fitZIG(counts, scale = "median")
    head(ZIG)

[Package benchdamic version 1.0.0 Index]