EM: The EM algorithm

Description Usage Arguments Value

View source: R/EM algorithm.R

Description

A function to perform EM algorithm to estimate parameters and find the best sequence of the hidden state.

Usage

1
EM(initial.value, obs, decoding)

Arguments

initial.value

A list contains the initial estimates of parameters which is a result of data.trans function.

obs

A S by 5 dataframe returned by data.trans function where S is total number of SNPs.

decoding

Specification of the decoding method for Hidden markov model, which can be either "Local" or "Global", with the latter one referring to the Viterbi algorithm.

Value

A list contains the following elements:

res

A dataframe contains the input data as well as the corresponding predicted hidden states for each SNP.

par

A list contains the final estimates of the parameters.


JingXieMIZZOU/hmmASE documentation built on Dec. 31, 2019, 12:52 a.m.