calcMV: calcMV

View source: R/Single_Cell_Simu.R

calcMVR Documentation

calcMV

Description

Calculate empirical means and variances of selected genes in a given dataset.

Usage

calcMV(a, FC = 1, FC.thresh = NA, threshold = Inf,
  include.zeroes = FALSE)

Arguments

a

Numeric vector of values to calculate empirical mean and variance.

FC

Fold change for the mean and standard deviation. Default value is 1.

FC.thresh

Alternate fold change for the mean and standard deviation when the (log nonzero) mean is above the value of threshold. Default value is FC.

threshold

Mean threshold value which dictates which fold change value to use for multiplying mean and standard deviation. Default value is Inf (so FC is always used).

include.zeroes

Logical value indicating whether the zero values should be included in the calculations of the empirical means and variances.

Details

Calculate empirical means and variances of selected genes in a given dataset. Optionally, multiply the means and standard deviations by a fold change value, which can also vary by mean value. If the mean is below some specified threshold threshold, use one fold change value FC. If above the threshold, use the alternate fold change value FC.thresh. Estimates of mean and variance are robust to outliers.

Value

MV Vector of two elements, first contains the empirical mean estimate, second contains the empirical variance estimate (optionally multiplied by a fold change).


kdkorthauer/scDD documentation built on March 27, 2022, 5:11 a.m.