Autoregressive HMMs: To give all this code some structure
Source:R/package_doc.R
autoregressivehmm.Rd
This package includes functions that employ the user to create simulation studies with autoregressive HMMs (HMMs with within-state autoregression) and to fit autoregressive HMMs to real data. Until now, the motivation of autoregressive HMMs has been animal movement data, using gamma distributed step lengths and von Mises distributed turning angles. Therefore, funcitonalities can only be guaranteed to work with bivariate autoregressive HMMs with one gamma distributed and one von Mises distributed variable (although in principle this can be changed). The functions are primarily used in my Master Thesis (hence the package name :D). Of course, everyone is free to use them in any other context.
Details
Attention: Compared to the description in the thesis, the autoregression parameter matrices \(\phi\) have a reversed column order. \(\phi_{jk}\) should always be supplied as follows: \(\phi_{j,t-p-1+k}\)
Important functions
sample_arp
Simulate data from an autoregressive HMM
mllk
Compute negative log-likelihood of an autoregressive HMM
fit_arp_model
Fit an autoregressive HMM to data
ar_simulation
Simulate data from an autoregressive HMM and refit specified autoregressive HMM to it
full_sim_loop
Simulate and refit models iteratively and record model specifications
References
Zucchini, Walter, Iain L. MacDonald and Roland Langrock (2016). Hidden Markov Models for Time Series: An Introduction Using R. 2nd ed. Boca Raton: Chapman and Hall/CRC. doi: 10.1201/9781420010893.
Michelot, Theo, Roland Langrock and Toby A. Patterson (2016). “moveHMM: an R package for the statistical modelling of animal movement data using hidden Markov models”. In: Methods in Ecology and Evolution 7.11, pp. 1308–1315.
Author
Maintainer: Ferdinand Stoye ferdinand.stoye@uni-bielefeld.de