Learn R Programming

treeHMM (version 0.1.1)

noisy_or: Calculating the probability of transition from multiple nodes to given node in the tree

Description

Calculating the probability of transition from multiple nodes to given node in the tree

Usage

noisy_or(hmm, prev_state, cur_state)

Arguments

hmm

Object of class List given as output by initHMM,

prev_state

vector containing state variable values for the previous nodes

cur_state

character denoting the state variable value for current node

Value

The Noisy_OR probability for the transition

Examples

Run this code
# NOT RUN {
tmat = matrix(c(0,0,1,0,0,0,0,1,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0),
               5,5, byrow= TRUE ) #for "X" (5 nodes) shaped tree
hmmA = initHMM(c("P","N"),list(c("L","R")), tmat) #one feature with two discrete levels "L" and "R"
Transprob = noisy_or(hmmA,c("P","N"),"P") #for transition from P & N simultaneously to P
# }

Run the code above in your browser using DataLab