hmm.setup: Create HMM from Initial Parameter Estimates Obtained from...

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/utils.R

Description

Convenient way to obtain initial parameter estimates from data.

Usage

1
2
3
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)

Arguments

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.

Details

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.

Value

Object of class contHMM.

Note

This method currently only supports two state HMMs with t distributions.

Author(s)

Peter Humburg

See Also

contHMM, getHMM, tDist, viterbiEM

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## 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)

tileHMM documentation built on May 30, 2017, 3:41 a.m.