computeL: computeL

Description Usage Arguments Value Examples

Description

computeL calculates L_k(t), where L_k(t) = P( Z[t]=k | x[1:n])

Usage

1
computeL(la, lb)

Arguments

la

a matrix from forward algorithm

lb

a matrix from backward algorithm

Value

A matrix, L.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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)
lb <- backwardAlg(x, RNA, trans, a, b, E)
L <- computeL(la, lb)
table(df$z)       # check the first few entries of L against df$z
View(L)           # note 1st column and number of 1 in df$z

rowSums(L)        # should all be 1

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