Construct a MCMC state vector.

MCMCStateVector(K, n, l, r, m, v)

Arguments

K

an integer (see Details).

n

an integer vector of length K denoting shift nodes (see Details).

l

a real vector of length K (see Details).

r

an integer vector of length K (see Details).

m

an integer vector of length R, where R denotes the total number of regimes (see Details).

v

a real vector of length P, where P denotes the total number of numeric parameters of the MCMC model represented by the state (see Details).

Value

a numerical vector representing the concatenation of K, n, l, r, m, v, with S3 class set to 'MCMCStateVector'.

Details

The MCMCState of an MCMC is represented by a numerical vector: $$\vec{s}=(K, n_2,...,n_{K+1}, l_2,...,l_{K+1}, r_2,...,r_{K+1}, m_1,...,m_R, v_1,...,v_P)^T$$ The element of this vector are described as follows:

\(K\):

number of shifts;

\((n_2,...,n_{K+1})^T\):

shift nodes - the shifts in the model occur at points within the branches leading to the shift nodes in tip-ward direction. The corresponding locations of these points are specified by \((l_2,...,l_{K+1})^T\). The nodes \((n_2,...,n_{K+1})^T\) should be ordered according to PCMTreePreorder(ctx$tree).

\((l_2,...,l_{K+1})^T\):

offset of the shift points measured as distances from the beginnings of the branches leading to shift nodes in tip-ward direction.

\((r_2,...,r_{K+1})^T\):

regime index vector. This is an integer vector with elements among \((N+1,n_2,...,n_{K+1})^T\), indicating the regime associated with each part in the tree. The regimes are named as the shift nodes, with N+1 corresponding to the part (and regime) originating at the root. It is possible to have lumped regimes, that is, different parts of the tree having the same regime. This regime-lumping must obey the following rules:

  1. neighbor parts cannot have a lumped regime. Two parts originating at nodes \(n_i\) and \(n_j\) in the tree are called neighbor parts if they are separated solely by \(n_i\) or by \(n_j\);

  2. to resolve the conflict between the shift nodes of the different parts covered by a lumped regime, it is established that the name of a lumped regime must equal the shift-node that appears first, according to PCMTreePreorder(ctx$tree).

\((m_1,...,m_R)^T\):

model type assignment to the unique regimes. This is an integer vector with elements between 1 and M, M denoting the total number of model types possible. Each element corresponds to an element in unique(c(N+1,r_2,...,r_{K+1}))

\((v_1,...,v_P)^T\):

real numbers passed to PCMParamLoadOrStore. This is a vectorized form of all model parameters.

See also