BUM_FWBW: Function BUM_FWBW

Description Usage Arguments Value

Description

Computes posteriors in Beta-Uniform mixture HMM (possibly from multiple exps). pVals is a matrix of empirical p-values at each position, 1 row per each experiment (only treatment). trans is the transition matrix (2x2, we assume only 2 hidden states,state 1 is always the unbound state).beta is the beta parameter (the Beta component is assumed to be Beta(1,beta))

Usage

1
2
BUM_FWBW(pVals, trans = matrix(c(0.95, 0.2, 0.05, 0.8), nrow = 2, ncol = 2),
  beta = 10, in_prob = c(1, 0))

Arguments

pVals

a matrix of empirical p-values at each position, 1 row per each experiment.

trans

the transition matrix (2x2, we assume only 2 hidden states, state 1 is always the unbound state). By default, we expect unbound stretches of average length 20 and bound stretches of average length 5.

beta

the beta parameter (the Beta component is assumed to be Beta(1,beta)). The default value, 10, is chosen heuristically so that a p-value of 0.2 has roughly equal probability of coming from each mixture.

in_prob

vector with initial probabilities. By default, we assume we always start in unbound state, so the vector has value c(1,0).

Value

a matrix containing posteriors in Beta-Uniform mixture HMM (possibly from multiple exps).


tomateba/clipR documentation built on May 31, 2019, 6:10 p.m.