Transform the natural parameters of autoregressive HMMs to their working parameters for optimization (theta -> theta.star). Currently only works for distributions with exactly two parameters.
Arguments
- theta
Vector of natural parameters.
- N
Number of states of the HMM.
- p
Vector of degree of autoregression within the distributions (one value for each state).
- dists
Vector of the distributions in the HMM.
- scale_kappa
Default 1, Scaling factor for kappa to avoid numerical issues in optimization for large kappa.
- zero_inf
Default FALSE, indicates if the gamma distributed variables should incorporate zero-inflation.