Table Of ContentNONLINEAR TIME SERIES ANALYSIS WITH R
Nonlinear Time Series Analysis with R
Ray Huffaker
DepartmentofAgriculturalandBiologicalEngineering,
UniversityofFlorida,USA
Marco Bittelli
DepartmentofAgriculturalSciences,UniversityofBologna,Italy
Rodolfo Rosa
NationalResearchCouncil(CNR),InstituteforMicroelectronicsandMicrosystems,
SectionofBologna,Italy
3
3
GreatClarendonStreet,Oxford,OX26DP,
UnitedKingdom
OxfordUniversityPressisadepartmentoftheUniversityofOxford.
ItfurtherstheUniversity’sobjectiveofexcellenceinresearch,scholarship,
andeducationbypublishingworldwide.Oxfordisaregisteredtrademarkof
OxfordUniversityPressintheUKandincertainothercountries
©RayHuffaker,MarcoBittelliandRodolfoRosa2017
Themoralrightsoftheauthorshavebeenasserted
FirstEditionpublishedin2017
Impression:1
Allrightsreserved.Nopartofthispublicationmaybereproduced,storedin
aretrievalsystem,ortransmitted,inanyformorbyanymeans,withoutthe
priorpermissioninwritingofOxfordUniversityPress,orasexpresslypermitted
bylaw,bylicenceorundertermsagreedwiththeappropriatereprographics
rightsorganization.Enquiriesconcerningreproductionoutsidethescopeofthe
aboveshouldbesenttotheRightsDepartment,OxfordUniversityPress,atthe
addressabove
Youmustnotcirculatethisworkinanyotherform
andyoumustimposethissameconditiononanyacquirer
PublishedintheUnitedStatesofAmericabyOxfordUniversityPress
198MadisonAvenue,NewYork,NY10016,UnitedStatesofAmerica
BritishLibraryCataloguinginPublicationData
Dataavailable
LibraryofCongressControlNumber:2017953063
ISBN978–0–19–878293–3(hbk.)
ISBN978–0–19–880825–1(pbk.)
DOI10.1093/oso/9780198782933.001
Printedandboundby
CPIGroup(UK)Ltd,Croydon,CR04YY
LinkstothirdpartywebsitesareprovidedbyOxfordingoodfaithand
forinformationonly.Oxforddisclaimsanyresponsibilityforthematerials
containedinanythirdpartywebsitereferencedinthiswork.
Preface
Nonlinear Time Series Analysis with R joins the chorus of voices recommending ‘get-
ting to know your data’ as an essential preliminary evidentiary step in scientific in-
quiry. Time series are often highly fluctuating, with a random appearance. Observed
volatility is commonly attributed to exogenous random shocks to stable real-world
systems. Consequently, investigators are driven to reproduce volatility with a variety
of linear-stochastic and probabilistic methods. However, breakthroughs in nonlinear
dynamicsraiseanotherpossibility:highlycomplexdynamicscanemergeendogenously
from astoundingly parsimonious deterministic models.
Nonlinear time series analysis (NLTS) is a collection of empirical tools that allow
practitioners to diagnose whether observed data are most likely generated by stochas-
ticordeterministicdynamics.Inparticular,practitionerscanuseNLTSinanattempt
to reconstruct, characterize and model real-world dynamics from a single time series
or multiple causally interactive time series. This information can be used, along with
scientific principles and other expert information, to guide the specification of mech-
anistic models used to build theory or to support high-stakes public policy. Models
used for public policy are increasingly subjected to formal government audit to ascer-
tain how well they correspond to reality. The compatibility of audited models with
NLTS-detected dynamics offers evidence of proper model specification.
This book targets students and professionals in physics, engineering, biology, agri-
culture, and economics and other social sciences. Our major objectives are to put key
concepts of NLTS – developed in the mathematical physics literature – within the op-
erational reach of non-mathematicians with limited knowledge of nonlinear dynamics,
andinthiswaytopavethewayforNLTStobeadoptedintheconventionalempirical
toolbox and core coursework of other disciplines. Consistent with modern trends in
universityinstruction,thebookmakesreadersactivelearnerswithhands-oncomputer
experiments in R code directing them through NLTS methods. The computer code is
explained in detail so that readers can adjust it for use in their own work. The book
also provides readers with an explicit framework – condensed from sound empirical
practices recommended in the literature – that proposes a strategy for implementing
NLTS in real-world data diagnostics. Practitioners become ‘data detectives’, accumu-
lating hard empirical evidence directing scientific inquiry.
We used R 3.3.1 and the following packages to construct the code in this book:
animation 2.5; boot 1.3-18; crqa 1.0.6; deSolve 1.12; extRemes 2.0-7; fields 8.4-1;
fractal 2.0-1; glmnet 2.0-5; gplots 3.0.1; graphics 3.3.1; igraph 1.0.1; MESS 0.4-3;
mpoly 1.0.3; multispatialCCM 1.0; nonlinearTseries 0.2.3; pdc 1.0.3; pdist 1.2;
phaseR 1.3; plotrix 3.6-3; ppls 1.6-1; psych 1.7.3.21; rgl; Rssa 0.13-1;
scatterplot3d 0.3-37; stats 3.5.0; tseriesChaos 0.1-13; tseriesEntropy 0.6-0
Acknowledgements
We would like to thank the following institutions for institutional and financial sup-
port: the University of Florida (USA), the University of Bologna (Italy) and the Na-
tional Research Council (Italy). MB thanks Roberto Olmi and RR thanks Simone
Giannerini for collaborative and fruitful research over many years of friendship and
collaboration. We also wish to thank our students, whose feedback helped us to im-
prove the material presented in this book. RGH gratefully acknowledges Dr Gerhard
Schiefer for providing numerous opportunities to present this material and develop
productiveinternationalcollaborationsattheannualIGLS-FORUM‘SystemDynam-
ics and Innovation in Food Networks’, and Maurizio Canavari, Ernst Berg, Rafael
Mun˜oz-Carpena, Klaus Frohberg and Miles Medina for valuable input and collabora-
tions. We thank Sonke Adlung, Ania Wronski and especially Mac Clarke for expert
editorial support. And thanks for their endearing support to Ann Huffaker, Andrea
Vogt and AnnaMaria Bononcini.
Contents
1 Why Study Nonlinear Time Series Analysis? 1
1.1 Introduction 1
1.2 Nonlinear Dynamics and a Strategy for Applying NLTS 4
1.3 The Contribution of NLTS Diagnostics to Theoretical Modelling 8
1.4 Caveats in Application 8
1.5 Summary 9
2 Linear and Nonlinear Dynamic Behaviour 10
2.1 Introduction 10
2.2 Discrete Linear Dynamics 10
2.3 The Nonlinear Logistic Map 14
2.4 Stability of Fixed Points 17
2.5 Dynamics of the Logistic Map 19
2.6 Analyzing Period Doubling with Bifurcation Diagrams 25
2.7 Chaotic Behaviour 32
2.8 Statistical Description of Chaotic Dynamics 43
2.9 Summary 49
3 Phase Space Reconstruction 51
3.1 Introduction 51
3.2 Ideal Simple Pendulum 52
3.3 Embedding Procedure 57
3.4 Phase Space Reconstruction with R packages 61
3.5 Summary 81
4 The Features of Chaos 83
4.1 Introduction 83
4.2 Lyapunov Exponent 84
4.3 Recurrence Plots 90
4.4 Correlation Dimension 102
4.5 Poincar´e Map 111
4.6 Summary 121
5 Entropy and Surrogate Testing 123
5.1 Introduction 123
5.2 Shannon Entropy of the Logistic Map 127
5.3 Entropy Test 128
5.4 Surrogate Test 130
5.5 Tests for Nonlinear Serial Dependence with R Packages 132
5.6 Summary 137
viii Contents
6 Data Preprocessing 140
6.1 Introduction 140
6.2 Regular Behaviour of Linear ODE Models 142
6.3 Noisy Linear Dynamics 151
6.4 Singular Spectrum Analysis 154
6.5 Nonstationary Dynamics 174
6.6 Testing for Nonstationarity in Time Series Data 175
6.7 Endogenous Complexity with Nonlinear Dynamics 188
6.8 Summary 190
7 Surrogate Data Testing 192
7.1 Introduction 192
7.2 Surrogate Data Testing in a Nutshell 194
7.3 Surrogate Types 195
7.4 Discriminating Statistics 198
7.5 Rank Order Statistics 210
7.6 R Code for Surrogate Data Testing 211
7.7 Summary 219
8 Empirically Detecting Causality 221
8.1 Introduction 221
8.2 Convergent Cross Mapping with R 222
8.3 Extended (Delayed) Cross Convergent Mapping 230
8.4 Network Plots 239
8.5 Real-World Application 244
8.6 Detecting Change Points 249
8.7 Detecting Tipping Points 258
8.8 Summary 262
9 Phenomenological Modelling 264
9.1 Introduction 264
9.2 Components of a Phenomenological Model 264
9.3 Approximation of Derivatives with Finite Differences 265
9.4 Multivariate Polynomial Expansions 266
9.5 Estimating System Coefficients: Ordinary Least Squares 270
9.6 EstimatingSystemCoefficients:RegularizedRegressionMethods 273
9.7 Goodness of Fit 276
9.8 Solution of Phenomenological Model 283
9.9 Phenomenological Model Extracted from Three Observed Vari-
ables 287
9.10 PhenomenologicalModelExtractedfromaSingleObservedVari-
able 291
9.11 Summary 295
10 Capstone: Application of NLTS to Real-World Data 298
10.1 Data Preprocessing 299
10.2 Phase Space Reconstruction 301
Contents ix
10.3 Surrogate Data Testing 303
10.4 Convergent Cross Mapping 306
10.5 Phenomenological Model 308
10.6 Summary 311
11 Extreme Value Statistics 313
11.1 Introduction 313
11.2 The Generalized Pareto Distribution 313
11.3 Extreme Value Statistics with R 314
Appendix A 319
A.1 Probability Density for the Logistic Map 319
A.2 Elements of Ergodic Theory 320
A.3 Dirac Delta Function 324
Appendix B 327
B.1 Introduction to the Bootstrap 327
B.2 Bootstrap Standard Error 329
B.3 Bootstrapping in R 332
B.4 Comments 334
Appendix C 336
C.1 Properties of Square Matrices 336
C.2 Analytical Construction of a Phase Diagram 339
List of Symbols 342
List of R Codes 344
References 347
Index 357
Description:Nonlinear Time Series Analysis with R provides a practical guide to emerging empirical techniques allowing practitioners to diagnose whether highly fluctuating and random appearing data are most likely driven by random or deterministic dynamic forces. It joins the chorus of voices recommending 'gett