calc.post: Calculates SAVER posterior

Description Usage Arguments Details Value

View source: R/calc_posterior.R

Description

Given prediction and prior variance, calculates the Gamma posterior distribution parameters for a single gene.

Usage

1
calc.post(y, mu, sf, scale.sf)

Arguments

y

A vector of observed gene counts.

mu

A vector of prior means.

sf

Vector of normalized size factors.

scale.sf

Mean of the original size factors.

Details

Let α be the shape parameter and β be the rate parameter of the prior Gamma distribution. Then, the posterior Gamma distribution will be

Gamma(y + α, sf + β),

where y is the observed gene count and sf is the size factor.

Value

A list with the following components

estimate

Recovered (normalized) expression

se

Standard error of expression estimate


SAVER documentation built on Nov. 14, 2019, 1:06 a.m.