mc_multinomFunction that builds the contrast and design matrices required by mc_multinom to parameterize, through multinomial logits, the initial and the transition probabilities of a Markov chain model.
design_matrices(k, nc, baseline, model_int, model_cov)
Contrast matrix used to parameterize the initial probabilities in the mc_multinom function
Design matrix mapping the reduced parameter vector to the transition-logit parameters under the selected intercept and covariate constraints
Array of contrast matrices used to parameterize the transition probabilities for each origin state
Design matrix defining the constraint structure for the intercepts of the transition logits
Design matrix defining the constraint structure for the covariate effects on the transition logits. This component is returned only when nc > 0
Number of response categories (or observed states) in the Markov chain, coded as 1, ..., k. Note that the structures "dist1", "dist2", "dist3", "two" and "diff" (see model_int) rely on the distance or on the direction between categories, and are therefore meaningful only when the categories are ordered; the remaining structures do not require any ordering
Number of covariates affecting the transition probabilities, excluding the intercept. Set nc = 0 when no transition covariates are included
Character string specifying the reference category in the multinomial logit parameterization. With "initial", category (1) is the reference category for both initial and transition probabilities. With "central", category (1) remains the reference category for the initial probabilities, whereas the current state is the reference category for each row of the transition matrix
Character string specifying the constraint structure for the intercepts of the transition logits. Possible values are:
"all"unconstrained transition-specific intercepts, one for each of the \(k(k-1)\) transitions
"const"one common intercept for all transitions
"dist1"one parameter for each signed distance \(v-u\) between the destination category \(v\) and the origin category \(u\) (\(2(k-1)\) parameters)
"dist2"one parameter for each absolute distance \(|v-u|\), shared by the two directions (\(k-1\) parameters)
"dist3"as "dist2", but the parameter enters with a positive sign for upward transitions and with a negative sign for downward ones (\(k-1\) parameters)
"two"separate parameters for upward and downward transitions
"symm"one parameter for each pair of categories, shared by the two directions (\(k(k-1)/2\) parameters)
"rsymm"as "symm", but the parameter enters with opposite signs in the two directions
"diff"effects expressed as differences between destination- and origin-specific parameters, with the parameter of the first category set to zero (\(k-1\) parameters)
Character string specifying the constraint structure for the regression coefficients of the transition covariates. The admissible values and their interpretation are the same as for model_int. This argument is used only when nc > 0
Francesco Bartolucci, Silvia Pandolfi, University of Perugia (IT), Luca Brusa and Fulvia Pennoni, University of Milano-Bicocca (IT)
Bartolucci, F., Pandolfi, S., and Pennoni, F. (2026). Parsimonious parametrizations of transition matrices of Markov chain and hidden Markov models, Annals of Operations Research, 363, 233–266.