Learn R Programming

countprop (version 1.1.1)

naiveVariation: Naive (Empirical) Variation

Description

Naive (empirical) estimates of proportionality metrics using only the observed counts.

Usage

naiveVariation(
  counts,
  pseudo.count = 0,
  type = c("standard", "phi", "phis", "rho"),
  lr = c("alr", "clr"),
  impute.zeros = TRUE,
  ...
)

Value

An estimate of the requested metric of proportionality.

Arguments

counts

Matrix of counts; samples are rows and features are columns

pseudo.count

Positive count to be added to all elements of count matrix.

type

Type of variation metric to be calculated: standard, phi, phis (a symmetric version of phi), rho, or logp (the variance-covariance matrix of log-transformed proportions)

lr

Which scale to calculate the proportionality metric on, either alr or clr.

impute.zeros

If TRUE, then cmultRepl() from the zCompositions package is used to impute zero values in the counts matrix.

...

Optional arguments passed to zero-imputation function cmultRepl()

Examples

Run this code
#' data(singlecell)

naiveVariation(singlecell)
naiveVariation(singlecell, type="phi")
naiveVariation(singlecell, type="rho")
naiveVariation(singlecell, type="rho", lr="clr")

Run the code above in your browser using DataLab