sample_q: Sample transition matrix of environment process

Description Usage Arguments Value

Description

Produce a Gibbs sample of transition matrix of environment process of a subject

Usage

1
sample_q(q, et, prior, ntrial, nenv)

Arguments

q

a matrix of current update of transition matrix of environment process

et

a vector of current update of environment process of a subject

prior

a matrix of concentration parameters of Dirichlet priors, each row corresponds to a row of transition matrix

ntrial

total number of trials

nenv

total number of environments

Value

A list with the following components:

q

a Gibbs sample of transition matrix of environment process

accept

a binary indicator vector of acceptance or rejection of proposed sample of each row of transition matrix in the independent Metropolis–Hastings algorithm


zhifeiyan/WeibullHM documentation built on May 4, 2019, 11:21 p.m.