get_bbgpMeanStd: Computing means and standard deviations for the BBGP (beta...

Description Usage Arguments Value Author(s) Examples

Description

Function for obtaining the posterior means and standard deviations for the frequencies (counts divided by sequencing depth) by using the counts and sequencing depth values in a beta binomial model. Parameters (alpha and beta) of the model are set to 1 by default, which keeps symmetry between f and (1-f), where f denotes the frequency valued between (0,1).

Usage

1
get_bbgpMeanStd(x, counts, seq_depth, alpha = 1, beta = 1)

Arguments

x

Time vector

counts

Vector containing the counts data at the given time points.

seq_depth

Vector containing the sequencing depth values at the given time points.

alpha

alpha parameter of the beta binomial model.

beta

beta parameter of the beta binomial model.

Value

Return list containing the posterior means and standard deviations of the frequencies at the time points where sequencing depth is larger than zero. x vector is updated so that it excludes the time points with zero sequencing depth, i.e. time points at which no data have been observed. Posterior means and standard deviations and the updated x vecor are assigned to the list elements named 'posteriorMean', 'posteriorStd', and 'time', respectively.

Author(s)

Hande Topa, hande.topa@helsinki.fi

Examples

1
2
3
4
5
6
7
x=c(1,2,3,4,5)
counts=c(12,54,32,0,34)
seq_depth=c(50,70,35,0,40)
bbgp=get_bbgpMeanStd(x,counts,seq_depth)
x=bbgp$time # updated time vector
y=bbgp$posteriorMean # posterior means
v=bbgp$posteriorStd^2 # posterior variances

GPrank documentation built on May 2, 2019, 3:35 p.m.