forwardAlg: forwardAlg

Description Usage Arguments Value Examples

Description

forwardAlg performs the forward algorithm on a single trajecture of observed chain x. a (in log scale), where a[k,t] = P(Z[t]=k, x[1:t])

Usage

1
forwardAlg(x, RNA, trans, alpha, beta, E)

Arguments

x

a vector of observed states

RNA

a 0-1 vector. 1 if next 3-base is stop codon

trans

a vector c(rho_u, rho, delta)

alpha

shape parameter in gamma distribution

beta

rate parameter in gamma distribution

E

a scalar. Normalizing constant for the observed chain x.

Value

A matrix, a (in log scale).

Examples

1
2
3
4
df <- uORF[[1]]
x=df$x; RNA=df$RNA; trans=df$trans; a=df$v; b=df$v/df$m; E=df$E

la <- forwardAlg(x, RNA, trans, a, b, E)

shimlab/riboHMM2 documentation built on May 19, 2019, 6:23 p.m.