Description Usage Arguments Details Value Examples

Parameter transformation from the natural (constraint) HSMM parameters into unconstraint working parameters which are used in the numerical maximum likelihood estimation. Not intended to be run by the user (internal function, called by the function `pmleHSMM`

).

1 2 |

`N` |
number of states of the HSMM, integer greater than 1. |

`p_list` |
list containing the parameters of the states' dwell-time distributions. The list consists of |

`mu` |
vector of length |

`sigma` |
vector of length |

`omega` |
conditional transition probability matrix of the underlying semi-Markov chain. Only needed if the number of states is greater than 2, |

`delta` |
vector of length N containing the initial distribution. Only needed if |

`y_dist` |
character determining the class of state-dependent distributions. Supported values are |

`stationary` |
Logical, if |

`p_ref` |
positive integer determining the reference dwell-time probability used for the multinomial logit parameter transformation. Default value is 2. Only needs to be changed if the dwell-time probability for dwell time r=2 is estimated very close to zero in order to avoid numerical problems. |

The transformation from natural to working parameters is needed to carry out an unconstraint optimisation. The function includes log-transformations for positive parameters and (multinomial) logit-transformations for probabilities, probability vectors and matrices.

A vector of unconstraint working parameters characterising the HSMM.

1 2 3 4 5 6 7 8 9 | ```
# natural parameters for 2-state HSMM with state-dependent normal distributions
p_list0<-list() # list of dwell-time distribution vectors,
# vector elements must sum to one
p_list0[[1]]<-c(dgeom(0:9,0.2),1-pgeom(9,0.2))
p_list0[[2]]<-c(dgeom(0:9,0.1),1-pgeom(9,0.1))
mu0<-c(-10,10) # mean values
sigma0<-c(3,5) # standard deviations
# parameter transformation:
n2wHSMM(N=2,p_list=p_list0,mu=mu0,sigma=sigma0,y_dist='norm',stationary=TRUE)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.