sampleDMC.Rd
This function draws independent random samples of a discrete Markov chain.
sampleDMC(pInit, Q, n = 1)
pInit | an array of length K, containing the marginal distribution of the states for the first variable. |
---|---|
Q | an array of size (p-1,K,K), containing a list of p-1 transition matrices between the K states of the Markov chain. |
n | the number of independent samples to be drawn (default: 1). |
A matrix of size n-by-p containing the n observed Markov chains of length p.
Each element of the output matrix is an integer value between 0 and K-1. The transition matrices contained in Q are defined such that \(P[X_{j+1}=k|X_{j}=l]=Q[j,l,k]\).
Sesia M, Sabatti C, Candès EJ (2019). “Gene hunting with hidden Markov model knockoffs.” Biometrika, 106, 1--18. doi: 10.1093/biomet/asy033 .
Other models: sampleHMM