sample.saver: Samples from SAVER

View source: R/sample_saver.R

sample.saverR Documentation

Samples from SAVER

Description

Samples from the posterior distribution output by SAVER.

Usage

sample.saver(x, rep = 1, efficiency.known = FALSE, seed = NULL)

Arguments

x

A saver object.

rep

Number of sampled datasets. Default is 1.

efficiency.known

Whether the efficiency is known. Default is FALSE.

seed

seed used in set.seed.

Details

The SAVER method outputs a posterior distribution, which we can sample from for downstream analysis. The posterior distribution accounts for uncertainty in the SAVER estimation procedure. If the efficiency is known, negative binomial sampling is performed; otherwise, gamma sampling is performed.

Value

A matrix of expression values sampled from SAVER posterior. If rep > 1, a list of matrices is returned

Examples

data("linnarsson_saver")

samp1 <- sample.saver(linnarsson_saver, seed = 50)



mohuangx/SAVER documentation built on June 16, 2022, 2:42 p.m.