Skip to:Content
|
Bottom
Cover image for Hidden markov models for time series : an introduction using R
Title:
Hidden markov models for time series : an introduction using R
Personal Author:
Series:
Monographs on statistics and applied probability ; 110
Publication Information:
Boca Raton, FL : Chapman & Hall, 2009
Physical Description:
xxii, 275 p. : ill. ; 24 cm.
ISBN:
9781584885733
Added Author:

Available:*

Library
Item Barcode
Call Number
Material Type
Item Category 1
Status
Searching...
30000010226352 QA280 Z83 2009 Open Access Book Book
Searching...
Searching...
30000010117592 QA280 Z83 2009 Open Access Book Book
Searching...

On Order

Summary

Summary

Reveals How HMMs Can Be Used as General-Purpose Time Series Models

Implements all methods in R
Hidden Markov Models for Time Series: An Introduction Using Rapplies hidden Markov models (HMMs) to a wide range of time series types, from continuous-valued, circular, and multivariate series to binary data, bounded and unbounded counts, and categorical observations. It also discusses how to employ the freely available computing environment R to carry out computations for parameter estimation, model selection and checking, decoding, and forecasting.

Illustrates the methodology in action
After presenting the simple Poisson HMM, the book covers estimation, forecasting, decoding, prediction, model selection, and Bayesian inference. Through examples and applications, the authors describe how to extend and generalize the basic model so it can be applied in a rich variety of situations. They also provide R code for some of the examples, enabling the use of the codes in similar applications.

Effectively interpret data using HMMs
This book illustrates the wonderful flexibility of HMMs as general-purpose models for time series data. It provides a broad understanding of the models and their uses.



Table of Contents

Prefacep. xvii
Notation and abbreviationsp. xxi
Part 1 Model structure, properties and methodsp. 1
1 Preliminaries: mixtures and Markov chainsp. 3
1.1 Introductionp. 3
1.2 Independent mixture modelsp. 6
1.2.1 Definition and propertiesp. 6
1.2.2 Parameter estimationp. 9
1.2.3 Unbounded likelihood in mixturesp. 10
1.2.4 Examples of fitted mixture modelsp. 11
1.3 Markov chainsp. 15
1.3.1 Definitions and examplep. 16
1.3.2 Stationary distributionsp. 18
1.3.3 Reversibilityp. 19
1.3.4 Autocorrelation functionp. 19
1.3.5 Estimating transition probabilitiesp. 20
1.3.6 Higher-order Markov chainsp. 22
Exercisesp. 24
2 Hidden Markov models: definition and propertiesp. 29
2.1 A simple hidden Markov modelp. 29
2.2 The basicsp. 30
2.2.1 Definition and notationp. 30
2.2.2 Marginal distributionsp. 32
2.2.3 Momentsp. 34
2.3 The likelihoodp. 35
2.3.1 The likelihood of a two-state Bernoulli-HMMp. 35
2.3.2 The likelihood in generalp. 37
2.3.3 The likelihood when data are missing at randomp. 39
2.3.4 The likelihood when observations are interval-censoredp. 40
Exercisesp. 41
3 Estimation by direct maximization of the likelihoodp. 45
3.1 Introductionp. 45
3.2 Scaling the likelihood computationp. 46
3.3 Maximization subject to constraintsp. 47
3.3.1 Reparametrization to avoid constraintsp. 47
3.3.2 Embedding in a continuous-time Markov chainp. 49
3.4 Other problemsp. 49
3.4.1 Multiple maxima in the likelihoodp. 49
3.4.2 Starting values for the iterationsp. 50
3.4.3 Unbounded likelihoodp. 50
3.5 Example: earthquakesp. 50
3.6 Standard errors and confidence intervalsp. 53
3.6.1 Standard errors via the Hessianp. 53
3.6.2 Bootstrap standard erros and confidence intervalsp. 55
3.7 Example: parametric bootstrapp. 55
Exercisesp. 57
4 Estimation by the EM algorithmp. 59
4.1 Forward and backward probabilitiesp. 59
4.1.1 Forward probabilitiesp. 60
4.1.2 Backward probabilitiesp. 61
4.1.3 Properties of forward and backward probabilitiesp. 62
4.2 The EM algorithmp. 63
4.2.1 EM in generalp. 63
4.2.2 EM for HMMsp. 64
4.2.3 M step for Poisson-and normal-HMMsp. 66
4.2.4 Starting from a specified statep. 67
4.2.5 EM for the case in which the Markov chain is stationaryp. 67
4.3 Examples of EM applied to Poisson-HMMsp. 68
4.3.1 Earthquakesp. 68
4.3.2 Foetal movement countsp. 70
4.4 Discussionp. 72
Exercisesp. 73
5 Forecasting, decoding and state predictionp. 75
5.1 Conditional distributionsp. 76
5.2 Forecast distributionsp. 77
5.3 Decodingp. 80
5.3.1 State probabilities and local decodingp. 80
5.3.2 Global decodingp. 82
5.4 State predictionp. 86
Exercisesp. 87
6 Model selection and checkingp. 89
6.1 Model selection by AIC and BICp. 89
6.2 Model checking with pseudo-residualsp. 92
6.2.1 Introducing pseudo-residualsp. 93
6.2.2 Ordinary pseudo-residualsp. 96
6.2.3 Forecast pseudo-residualsp. 97
6.3 Examplesp. 98
6.3.1 Ordinary pseudo-residuals for the earthquakesp. 98
6.3.2 Dependent ordinary pseudo-residualsp. 98
6.4 Discussionp. 100
Exercisesp. 101
7 Bayesian inference for Poisson-HMMsp. 103
7.1 Applying the Gibbs sampler to Poisson-HMMsp. 103
7.1.1 Generating sample paths of the Markov chainp. 105
7.1.2 Decomposing observed countsp. 106
7.1.3 Updating the parametersp. 106
7.2 Bayesian estimation of the number of statesp. 106
7.2.1 Use of the integrated likelihoodp. 107
7.2.2 Model selection by parallel samplingp. 108
7.3 Example: earthquakesp. 108
7.4 Discussionp. 110
Exercisesp. 112
8 Extensions of the basic hidden Markov modelp. 115
8.1 Introductionp. 115
8.2 HMMs with general univariate state-dependent distributionp. 116
8.3 HMMs based on a second-order Markov chainp. 118
8.4 HMMs for multivariate seriesp. 119
8.4.1 Series of multinomial-like observationsp. 119
8.4.2 A model for categorical seriesp. 121
8.4.3 Other multivariate modelsp. 122
8.5 Series that depend on covariatesp. 125
8.5.1 Covariates in the state-dependent distributionsp. 125
8.5.2 Covariates in the transition probabilitiesp. 126
8.6 Models with additional dependenciesp. 128
Exercisesp. 129
Part 2 Applicationsp. 133
9 Epileptic seizuresp. 135
9.1 Introductionp. 135
9.2 Models fittedp. 135
9.3 Model checking by pseudo-residualsp. 138
Exercisesp. 140
10 Eruptions of the Old Faithful geyserp. 141
10.1 Introductionp. 141
10.2 Binary time series of short and long eruptionsp. 141
10.2.1 Markov chain modelsp. 142
10.2.2 Hidden Markov modelsp. 144
10.2.3 Comparison of modelsp. 147
10.2.4 Forecast distributionsp. 148
10.3 Normal-HMMs for durations and waiting timesp. 149
10.4 Bivariate model for durations and waiting timesp. 152
Exercisesp. 153
11 Drosophila speed and change of directionp. 155
11.1 Introductionp. 155
11.2 Von Mises distributionsp. 156
11.3 Von Mises-HMMs for the two subjectsp. 157
11.4 Circular autocorrelation functionsp. 158
11.5 Bivariate modelp. 161
Exercisesp. 165
12 Wind direction at Koebergp. 167
12.1 Introductionp. 167
12.2 Wind direction classified into 16 categoriesp. 167
12.2.1 Three HMMs for hourly averages of wind directionp. 167
12.2.2 Model comparisons and other possible modelsp. 170
12.2.3 Conclusionp. 173
12.3 Wind direction as a circular variablep. 174
12.3.1 Daily at hour 24: von Mises-HMMsp. 174
12.3.2 Modelling hourly change of directionp. 176
12.3.3 Transition probabilities varying with lagged speedp. 176
12.3.4 Concentration parameter varying with lagged speedp. 177
Exercisesp. 180
13 Models for financial seriesp. 181
13.1 Thinly traded sharesp. 181
13.1.1 Univariate modelsp. 181
13.1.2 Multivariate modelsp. 183
13.1.3 Discussionp. 185
13.2 Multivariate HMM for returns on four sharesp. 186
13.3 Stochastic volatility modelsp. 190
13.3.1 Stochastic volatility models without leveragep. 190
13.3.2 Application: FTSE 100 returnsp. 192
13.3.3 Stochastic volatility models with leveragep. 193
13.3.4 Application: TOPIX returnsp. 195
13.3.5 Discussionp. 197
14 Births at Edendale Hospitalp. 199
14.1 Introductionp. 199
14.2 Models for the proportion Caesareanp. 199
14.3 Models for the total number of deliveriesp. 205
14.4 Conclusionp. 208
15 Homicides and suicides in Cape Townp. 209
15.1 Introductionp. 209
15.2 Firearm homicides as a proportion of all homicides, suicides and legal intervention homicidesp. 209
15.3 The number of firearm homicidesp. 211
15.4 Firearm homicide and suicide proportionsp. 213
15.5 Proportion in each of the five categoriesp. 217
16 Animal behaviour model with feedbackp. 219
16.1 Introductionp. 219
16.2 The modelp. 220
16.3 Likelihood evaluationp. 222
16.3.1 The likelihood as a multiple sump. 223
16.3.2 Recursive evaluationp. 223
16.4 Parameter estimation by maximum likelihoodp. 224
16.5 Model checkingp. 224
16.6 Inferring the underlying statep. 225
16.7 Models for a heterogeneous group of subjectsp. 226
16.7.1 Models assuming some parameters to be constant across subjectsp. 226
16.7.2 Mixed modelsp. 227
16.7.3 Inclusion of covariatesp. 227
16.8 Other modifications of extensionsp. 228
16.8.1 Increasing the number of statesp. 228
16.8.2 Changing the nature of the state-dependent distributionp. 228
16.9 Application to caterpillar feeding behaviourp. 229
16.9.1 Date description and preliminary analysisp. 229
16.9.2 Parameter estimates and model checkingp. 229
16.9.3 Runlength distributionsp. 233
16.9.4 Joint models for seven subjectsp. 235
16.10 Discussionp. 236
A Examples of R codep. 239
A.1 Stationary Poisson-HMM, numerical maximizationp. 239
A.1.1 Transform natural parameters to workingp. 240
A.1.2 Transform working parameters to naturalp. 240
A.1.3 Log-likelihood of a stationary Poisson-HMMp. 240
A.1.4 ML estimation of a stationary Poisson-HMMp. 241
A.2 More on Poisson-HMMs, including EMp. 242
A.2.1 Generate a realization of a Poisson-HMMp. 242
A.2.2 Forward and backward probabilitiesp. 242
A.2.3 EM estimation of a Poisson-HMMp. 243
A.2.4 Viterbi algorithmp. 244
A.2.5 Conditional state probabilitiesp. 244
A.2.6 Local decodingp. 245
A.2.7 State predictionp. 245
A.2.8 Forecast distributionsp. 246
A.2.9 Conditional distribution of one observation given the restp. 246
A.2.10 Ordinary pseudo-residualsp. 247
A.3 Bivariate normal state-dependent distributionsp. 248
A.3.1 Transform natural parameters to workingp. 248
A.3.2 Transform working parameters to naturalp. 249
A.3.3 Discrete log-likelihoodp. 249
A.3.4 MLEs of the parametersp. 250
A.4 Categorical HMM, constrained optimizationp. 250
A.4.1 Log-likelihoodp. 251
A.4.2 MLEs of the parametersp. 252
B Some proofsp. 253
B.1 Factorization needed for forward probabilitiesp. 253
B.2 Two results for backward probabilitesp. 255
B.3 Conditional independence of Xt1 and $$p. 256
Referencesp. 257
Author indexp. 267
Subject indexp. 271
Go to:Top of Page