hmm.setup {tileHMM} | R Documentation |
Convenient way to obtain initial parameter estimates from data.
hmm.setup(data, state = c("enriched", "non-enriched"), probe.region = 35, frag.size = 1000, pos.state = 1, em.type = "tDist", max.prob = 1, df = 9)
data |
Observation sequence. This can be either a single sequence or a list of sequences. |
state |
Vector of state names for HMM. |
probe.region |
Length of genomic region represented by one probe (on average). |
frag.size |
Expected size of ChIP fragments. |
pos.state |
Index of state which is considered to represent ‘positive’ result. |
em.type |
Character string identifying type of emission distribution to be used. Currently only "tDist "
is supported. |
max.prob |
Maximum probability allowed in transition matrix. Setting this to less than 1 ensures that there are no null transitions. |
df |
Degrees of freedom for emission distributions. |
The parameter estimates are obtained by first clustering the observations, then the mean and variance of the resulting groups are used together with cluster size, expected fragment size and probe density to generate initial values for model parameters.
The parameter values generated by this procedure are only a rough guess and have to be optimised before the model is used for data analysis.
Object of class contHMM
.
This method currently only supports two state HMMs with t distributions.
Peter Humburg
contHMM
, getHMM
, tDist
, viterbiEM
## create two state HMM with t distributions state.names <- c("one","two") transition <- c(0.035, 0.01) location <- c(-1, 2) scale <- c(1, 1) df <- c(4, 6) hmm <- getHMM(list(a=transition, mu=location, sigma=scale, nu=df), state.names) ## obtain observation sequence from model obs <- sampleSeq(hmm, 500) ## build model from data model <- hmm.setup(obs, state = c("one", "two"),df=5)