When L>1, calculate values for backward, forward variables, probabilities of hidden states. A supporting function called by em.hmm.
bwfw.hmm(x, pii, A, pc, f0, f1)
rescaled backward variables
rescaled forward variables
lfdr variables
probabilities of hidden states
rescaled transition variables
rescaled weight variables
the observed Z values
(prob. of being 0, prob. of being 1), the initial state distribution
A=(a00 a01\\ a10 a11), transition matrix
(c[1], ..., c[L])--the probability weights in the mixture for each component
(mu, sigma), the parameters for null distribution
(mu[1], sigma[1]\\...\\mu[L], sigma[L])--an L by 2 matrix, the parameter set for the non-null distribution
Wei Z, Sun W, Wang K and Hakonarson H
calculates values for backward, forward variables, probabilities of hidden states,
--the lfdr variables and etc.
--using the forward-backward procedure (Rabiner 89)
--based on a sequence of observations for a given hidden markov model M=(pii, A, f)
--see Sun and Cai (2009) for a detailed instruction on the coding of this algorithm
Multiple Testing in Genome-Wide Association Studies via Hidden Markov Models, Bioinformatics, 2009
Large-scale multiple testing under dependence, Sun W and Cai T (2009), JRSSB, 71, 393-424
A Tutorial on Hidden Markov Models and Selected Applications in Speech Recognition, Rabiner L (1989), Procedings of the IEEE, 77, 257-286.