tpm: Build the transition probability matrix from unconstraint parameter vector
Description
This function builds the transition probability matrix from an unconstraint parameter vector.
For each row of the matrix, the inverse multinomial logistic link is applied.
Usage
tpm(param, byrow = FALSE)
Value
Transition probability matrix of dimension c(N,N)
Arguments
param
Unconstraint parameter vector of length N*(N-1) where N is the number of states of the Markov chain
byrow
Logical that indicates if the transition probability matrix should be filled by row.
Defaults to FALSE, but should be set to TRUE if one wants to work with a matrix of beta parameters returned by popular HMM packages like moveHMM, momentuHMM, or hmmTMB.