# Initialisation function for von Mises MSAR model fitting

### Description

Initialization before fitting von Mises (non) homogeneous Markov switching autoregressive models by EM algorithm. Non homogeneity may be introduce in the probability transitions. The link function is defined here.

### Usage

1 2 3 4 |

### Arguments

`data` |
array of univariate or multivariate series with dimension T*N.samples*d with T: number of time steps of each sample, N.samples: number of realisations of the same stationary process, d: dimension |

`M` |
number of regimes |

`order` |
order of AR processes |

`label` |
"HH" (default) for homogeneous MS AR model "NH" for non homogeneous transitions |

`regime_names` |
(optional) regime's names may be chosen |

`nh.emissions` |
not available - under development. |

`nh.transitions` |
link function for non homogeneous transitions. Default: von Mises (see details). |

`ncov.emis` |
not available - under development. |

`ncov.trans` |
number of covariates in NH model |

`...` |

### Details

The model with non homogeneous transitions is labeled "NH" and it is written

*P(X_t|X_{t-1}=x_{t-1}) = q(z_t,θ_{z_t})*

with *X_t* the hidden process and *q* von Mises link function such that

*p_1(x_t|x_{t-1},z_{t}) =\frac{ q_{x_{t-1},x_t}≤ft|\exp
≤ft(\tildeλ_{x_{t-1},x_t} e^{-iz_{t}} \right)\right|}
{∑_{x'=1}^M q_{x_{t-1},x'}≤ft|\exp
≤ft(\tildeλ_{x_{t-1},x'} e^{-iz_{t}} \right)\right|},
*

with *\tildeλ_{x,x'}* a complex parameter (by taking *\tildeλ_{x,x'}=λ_{x,x'}
e^{iψ_{x,x'}}*).

### Value

return a list of class MSAR including

`theta` |
parameter |

`..$transmat` |
transition matrix |

`..$prior` |
prior probabilities |

`..$mu` |
vector of intercepts |

`..$kappa` |
matrix of 'AR' coefficients (not complex by default) |

`..$par.emis` |
parameters of non homogeneous emissions (not used) |

`..$par.trans` |
parameters of non homogeneous transitions |

`label` |
model's label |

### Author(s)

Val\'erie Monbet, valerie.monbet@univ-rennes1.fr

### References

Ailliot P., Bessac J., Monbet V., Pene F., (2014) Non-homogeneous hidden Markov-switching models for wind time series. JSPI.

### See Also

fit.MSAR.VM