tpm function

Build the transition probability matrix from unconstrained parameter vector