Professional Documents
Culture Documents
Textbook Introduction To Functional Data Analysis 1St Edition Piotr Kokoszka Ebook All Chapter PDF
Textbook Introduction To Functional Data Analysis 1St Edition Piotr Kokoszka Ebook All Chapter PDF
https://textbookfull.com/product/introduction-to-statistics-and-
data-analysis-roxy-peck/
https://textbookfull.com/product/introduction-to-error-analysis-
the-science-of-measurements-uncertainties-and-data-analysis-
merrin/
https://textbookfull.com/product/introduction-to-data-science-
data-analysis-and-prediction-algorithms-with-r-1st-edition-by-
rafael-a-irizarry/
https://textbookfull.com/product/functional-analysis-an-
introduction-to-metric-spaces-hilbert-spaces-and-banach-algebras-
second-edition-joseph-muscat/
An Introduction to Secondary Data Analysis with IBM
SPSS Statistics 1st Edition John Macinnes
https://textbookfull.com/product/an-introduction-to-secondary-
data-analysis-with-ibm-spss-statistics-1st-edition-john-macinnes/
https://textbookfull.com/product/an-introduction-to-statistical-
methods-and-data-analysis-7th-edition-r-lyman-ott/
https://textbookfull.com/product/an-introduction-to-secondary-
data-analysis-with-ibm-spss-statistics-first-edition-macinnes/
https://textbookfull.com/product/granular-relational-data-mining-
how-to-mine-relational-data-in-the-paradigm-of-granular-
computing-1st-edition-piotr-honko-auth/
https://textbookfull.com/product/an-introduction-to-resting-
state-fmri-functional-connectivity-1st-edition-janine-
bijsterbosch/
Introduction to
Functional
Data Analysis
CHAPMAN & HALL/CRC
Texts in Statistical Science Series
Series Editors
Francesca Dominici, Harvard School of Public Health, USA
Julian J. Faraway, University of Bath, UK
Martin Tanner, Northwestern University, USA
Jim Zidek, University of British Columbia, Canada
Statistical Theory: A Concise Introduction Problem Solving: A Statistician’s Guide,
F. Abramovich and Y. Ritov Second Edition
Practical Multivariate Analysis, Fifth Edition C. Chatfield
A. Afifi, S. May, and V.A. Clark Statistics for Technology: A Course in Applied
Practical Statistics for Medical Research Statistics, Third Edition
D.G. Altman C. Chatfield
Mathematical Statistics: Basic Ideas and Modelling Survival Data in Medical Research,
Selected Topics, Volume I, Third Edition
Second Edition D. Collett
P. J. Bickel and K. A. Doksum Introduction to Statistical Methods for
Mathematical Statistics: Basic Ideas and Clinical Trials
Selected Topics, Volume II T.D. Cook and D.L. DeMets
P. J. Bickel and K. A. Doksum Applied Statistics: Principles and Examples
Analysis of Categorical Data with R D.R. Cox and E.J. Snell
C. R. Bilder and T. M. Loughin Multivariate Survival Analysis and Competing
Statistical Methods for SPC and TQM Risks
D. Bissell M. Crowder
Introduction to Probability Statistical Analysis of Reliability Data
J. K. Blitzstein and J. Hwang M.J. Crowder, A.C. Kimber,
T.J. Sweeting, and R.L. Smith
Bayesian Methods for Data Analysis,
Third Edition An Introduction to Generalized
B.P. Carlin and T.A. Louis Linear Models, Third Edition
A.J. Dobson and A.G. Barnett
Second Edition
R. Caulcutt Nonlinear Time Series: Theory, Methods, and
Applications with R Examples
The Analysis of Time Series: An Introduction,
R. Douc, E. Moulines, and D.S. Stoffer
Sixth Edition
C. Chatfield Introduction to Optimization Methods and
Their Applications in Statistics
Introduction to Multivariate Analysis
B.S. Everitt
C. Chatfield and A.J. Collins
Extending the Linear Model with R: Graphics for Statistics and Data Analysis with R
Generalized Linear, Mixed Effects and K.J. Keen
Nonparametric Regression Models, Second Mathematical Statistics
Edition K. Knight
J.J. Faraway
Introduction to Functional Data Analysis
Linear Models with R, Second Edition P. Kokoszka and M. Reimherr
J.J. Faraway
Introduction to Multivariate Analysis:
A Course in Large Sample Theory Linear and Nonlinear Modeling
T.S. Ferguson S. Konishi
Multivariate Statistics: A Practical Nonparametric Methods in Statistics with SAS
Approach Applications
B. Flury and H. Riedwyl O. Korosteleva
Readings in Decision Analysis Modeling and Analysis of Stochastic Systems,
S. French Second Edition
Discrete Data Analysis with R: Visualization V.G. Kulkarni
and Modeling Techniques for Categorical and Exercises and Solutions in Biostatistical Theory
Count Data L.L. Kupper, B.H. Neelon, and S.M. O’Brien
M. Friendly and D. Meyer
Exercises and Solutions in Statistical Theory
Markov Chain Monte Carlo: L.L. Kupper, B.H. Neelon, and S.M. O’Brien
Stochastic Simulation for Bayesian Inference,
Second Edition Design and Analysis of Experiments with R
D. Gamerman and H.F. Lopes J. Lawson
Bayesian Data Analysis, Third Edition Design and Analysis of Experiments with SAS
A. Gelman, J.B. Carlin, H.S. Stern, D.B. Dunson, J. Lawson
A. Vehtari, and D.B. Rubin A Course in Categorical Data Analysis
Multivariate Analysis of Variance and T. Leonard
Repeated Measures: A Practical Approach for Statistics for Accountants
Behavioural Scientists S. Letchford
D.J. Hand and C.C. Taylor Introduction to the Theory of Statistical
Practical Longitudinal Data Analysis Inference
D.J. Hand and M. Crowder H. Liero and S. Zwanzig
Logistic Regression Models Statistical Theory, Fourth Edition
J.M. Hilbe B.W. Lindgren
Richly Parameterized Linear Models: Stationary Stochastic Processes: Theory and
Additive, Time Series, and Spatial Models Applications
Using Random Effects G. Lindgren
J.S. Hodges Statistics for Finance
Statistics for Epidemiology E. Lindström, H. Madsen, and J. N. Nielsen
N.P. Jewell The BUGS Book: A Practical Introduction to
Stochastic Processes: An Introduction, Bayesian Analysis
Second Edition D. Lunn, C. Jackson, N. Best, A. Thomas, and
P.W. Jones and P. Smith D. Spiegelhalter
The Theory of Linear Models Introduction to General and Generalized
B. Jørgensen Linear Models
Pragmatics of Uncertainty H. Madsen and P. Thyregod
J.B. Kadane Time Series Analysis
Principles of Uncertainty H. Madsen
J.B. Kadane Pólya Urn Models
H. Mahmoud
Randomization, Bootstrap and Monte Carlo A First Course in Linear Model Theory
Methods in Biology, Third Edition N. Ravishanker and D.K. Dey
B.F.J. Manly Essential Statistics, Fourth Edition
Introduction to Randomized Controlled D.A.G. Rees
Clinical Trials, Second Edition Stochastic Modeling and Mathematical
J.N.S. Matthews Statistics: A Text for Statisticians and
Statistical Rethinking: A Bayesian Course with Quantitative Scientists
Examples in R and Stan F.J. Samaniego
R. McElreath Statistical Methods for Spatial Data Analysis
Statistical Methods in Agriculture and O. Schabenberger and C.A. Gotway
Experimental Biology, Second Edition Bayesian Networks: With Examples in R
R. Mead, R.N. Curnow, and A.M. Hasted M. Scutari and J.-B. Denis
Statistics in Engineering: A Practical Approach Large Sample Methods in Statistics
A.V. Metcalfe P.K. Sen and J. da Motta Singer
Statistical Inference: An Integrated Approach, Spatio-Temporal Methods in Environmental
Second Edition Epidemiology
H. S. Migon, D. Gamerman, and G. Shaddick and J.V. Zidek
F. Louzada
Decision Analysis: A Bayesian Approach
Beyond ANOVA: Basics of Applied Statistics J.Q. Smith
R.G. Miller, Jr.
Analysis of Failure and Survival Data
A Primer on Linear Models P. J. Smith
J.F. Monahan
Applied Statistics: Handbook of GENSTAT
Stochastic Processes: From Applications to Analyses
Theory E.J. Snell and H. Simpson
P.D Moral and S. Penev
Applied Nonparametric Statistical Methods,
Applied Stochastic Modelling, Second Edition Fourth Edition
B.J.T. Morgan P. Sprent and N.C. Smeeton
Elements of Simulation Data Driven Statistical Methods
B.J.T. Morgan P. Sprent
Probability: Methods and Measurement Generalized Linear Mixed Models:
A. O’Hagan Modern Concepts, Methods and Applications
Introduction to Statistical Limit Theory W. W. Stroup
A.M. Polansky Survival Analysis Using S: Analysis of
Applied Bayesian Forecasting and Time Series Time-to-Event Data
Analysis M. Tableman and J.S. Kim
A. Pole, M. West, and J. Harrison Applied Categorical and Count Data Analysis
Statistics in Research and Development, W. Tang, H. He, and X.M. Tu
Time Series: Modeling, Computation, and Elementary Applications of Probability Theory,
Inference Second Edition
R. Prado and M. West H.C. Tuckwell
Essentials of Probability Theory for Introduction to Statistical Inference and Its
Statisticians Applications with R
M.A. Proschan and P.A. Shaw M.W. Trosset
Introduction to Statistical Process Control Understanding Advanced Statistical Methods
P. Qiu P.H. Westfall and K.S.S. Henning
Sampling Methodologies with Applications
P.S.R.S. Rao
Statistical Process Control: Theory and Epidemiology: Study Design and
Practice, Third Edition Data Analysis, Third Edition
G.B. Wetherill and D.W. Brown M. Woodward
Generalized Additive Models: Practical Data Analysis for Designed
An Introduction with R Experiments
S. Wood B.S. Yandell
Texts in Statistical Science
Introduction to
Functional
Data Analysis
Piotr Kokoszka
Colorado State University
Ft. Collins, Colorado
Matthew Reimherr
The Pennsylvania State University
University Park, Pennsylvania
CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742
This book contains information obtained from authentic and highly regarded sources. Reasonable
efforts have been made to publish reliable data and information, but the author and publisher cannot
assume responsibility for the validity of all materials or the consequences of their use. The authors and
publishers have attempted to trace the copyright holders of all material reproduced in this publication
and apologize to copyright holders if permission to publish in this form has not been obtained. If any
copyright material has not been acknowledged please write and let us know so we may rectify in any
future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced,
transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or
hereafter invented, including photocopying, microfilming, and recording, or in any information
storage or retrieval system, without written permission from the publishers.
For permission to photocopy or use material electronically from this work, please access
www.copyright.com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc.
(CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization
that provides licenses and registration for a variety of users. For organizations that have been granted
a photocopy license by the CCC, a separate system of payment has been arranged.
Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and
are used only for identification and explanation without intent to infringe.
Visit the Taylor & Francis Web site at
http://www.taylorandfrancis.com
and the CRC Press Web site at
http://www.crcpress.com
To Gudrun and Vanessa
Piotr
4 Scalar–on–function regression 45
4.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4.2 Review of standard regression theory . . . . . . . . . . . . . 48
4.3 Difficulties specific to functional regression . . . . . . . . . . 51
4.4 Estimation through a basis expansion . . . . . . . . . . . . . 54
4.5 Estimation with a roughness penalty . . . . . . . . . . . . . 56
4.6 Regression on functional principal components . . . . . . . . 58
4.7 Implementation in the refund package . . . . . . . . . . . . 60
4.8 Nonlinear scalar–on–function regression . . . . . . . . . . . . 63
4.9 Chapter 4 problems . . . . . . . . . . . . . . . . . . . . . . . 64
xi
xii Contents
References 279
Index 287
xiv Contents
Preface
Audience and scope
This book provides a concise introduction to the field of functional data analy-
sis (FDA). It can be used as a textbook for a semester long course on FDA for
advanced undergraduate or MS statistics majors, as well as for MS and PhD
students in other disciplines, including applied mathematics, environmental
science, public health, medical research, geophysical sciences, and economics.
It can also be used for self–study and as a reference for researchers in those
fields who wish to acquire a solid understanding of FDA methodology and
practical guidance for its implementation. Each chapter contains problems
and plentiful examples of relevant R code.
The field of FDA has seen rapid development over the last two decades. At
present, FDA can be seen as a subfield of statistics that has reached a certain
maturity with its central ideas and methods crystalized and generally viewed
as fundamental to the subject. At the same time, its methods have been ap-
plied to quite broadly in medicine, science, business, and engineering. While
new theoretical and methodological developments, and new applications, are
still being reported at a fair rate, an introductory account will be useful to
students and researchers seeking an accessible and sufficiently comprehensive
introduction to the subject. Several FDA monographs exist, but they are ei-
ther older or cover very specific topics, and none of them is written in the
style of a textbook, with problems that can be assigned as homework or used
as part of examinations. Our objective is to furnish a textbook that provides
an accessible introduction to the field rather than a monograph that explores
cutting edge developments. The book assumes a solid background in calcu-
lus, linear algebra, distributional probability theory, foundations of statistical
inference, and some familiarity with R programming. Such a background is
acquired by US senior and MS students majoring in statistics or mathematics
with a statistics emphasis, and by European third year students with similar
specializations. We do not assume background in nonparametric statistics or
advanced regression methods. The required concepts are explained in scalar
settings before the related functional concepts are developed. References to
more advanced research are provided for those who wish to gain a more in-
depth understanding of a specific topic. Each chapter ends with problems
that fall into two categories: 1) theoretical problems, mostly simple exer-
cises intended to solidify definitions and concepts, 2) R based data analytic
problems.
There are a number of very good books on FDA. The best known is the
monograph of Ramsay and Silverman (2005), which is the second edition of
a book originally published in 1997. The first edition is largely credited with
solidifying FDA as an official subbranch of statistics. Their work provides a
more detailed treatment of many topics only highlighted in our book, including
Contents xv
Acknowledgements
John Kimmel provided useful editorial guidance during the preparation of this
book. The reviews he obtained helped us reshape and enhance the book at
several stages of preparation; we thank the anonymous reviewers. Several re-
searchers provided substantive help in the preparation of this book. Sections
that contain R code are often based on the code provided by researchers in-
volved in the preparation of the specific packages. Jeff Goldsmith provided the
code presented in Section 4.7, Phil Reiss and Fabian Scheipl in Section 5.4,
and Giles Hooker in Section 5.5. Fabian Scheipl also contributed to the code
in Section 6.4. The final version of the code presented in Chapter 8 was pre-
pared by Han Lin Shang, with contributions from Alexander Aue, Siegfried
Hörmann and Gregory Rice. Robertas Gabrys prepared the code presented in
Section 8.7. Pedro Delicado wrote the code shown in Chapter 9 and helped
us improve other sections of that chapter. Some problems were suggested by
PhD students at Colorado State University: Cody Alsaker, Ran Fu, Aaron
Nielsen and Zach Weller. Hyunphil Choi, Johannes Klepsch, Neda Moham-
madi Jouzdani, Stathis Paparoditis, and Ben Zheng found many typos and
recommended improvements to the exposition. We thank them all for their
kind help. We acknowledge generous support from the United States National
Science Foundation and the National Security Agency.
Functional data analysis, FDA, has expanded rapidly in the years leading
up to this text. The wide breadth of applications and tools make a precise
definition of FDA somewhat difficult. At a high level, one should think of
FDA as arising when one of the variables or units of interest in a data set
can be naturally viewed as a smooth curve or function. FDA can then be
thought of as the statistical analysis of samples of curves (possibly combined
with vectors or scalars as well).
This chapter serves the dual purpose of introducing basic concepts and
discussing the most important R functions for manipulating functional data.
Ramsay et al. (2009) provide a much more comprehensive and detailed de-
scription of the R and MATLAB tools used for analysis of functional data.
Our objective is to enable the reader to perform simple analyses in R and gain
some working understanding of FDA. The scope of this chapter is therefore
limited, many more developments will be presented in the following chapters.
In particular, we restrict ourselves to the analysis of random samples of densely
observed curves. The monograph of Ramsay and Silverman (2005) elaborates
on many topics touched upon in this chapter; further detailed examples are
presented in Ramsay and Silverman (2002).
The simplest data set encountered in FDA is a sample of the form
for which the values xn (t) exist at any point t, but are observed only at selected
points tj,n . For example, in a medical treatment, one may be interested in the
1
2 Introduction to Functional Data Analysis
Time in minutes
24.0
Price
23.5
23.0
M T W H F M T W H F
FIGURE 1.2: Microsoft stock prices in one-minute resolution, May 1-5, 8-12,
2006. The closing price on day n is not the same as the opening price on
day n + 1. The displayed data can be viewed as a sample of 10 functional
observations.
In (1.3), the Bm are some standard collection of basis functions, like splines
wavelets, or sine and cosine functions; we will discuss them in the following.
Expansion (1.3) reflects the intuition that the data (1.1) are observations from
4 Introduction to Functional Data Analysis
1.0
0.4
0.8
0.2
0.6
0.0
0.4
−0.2
0.2
−0.4
0.0
0 2 4 6 8 10 0 2 4 6 8 10
FIGURE 1.3: Plots of the first five B–splines (left) and Fourier (right) basis
functions.
smooth functions that share some shape properties, and so can be approxi-
mated as linear combinations of some M basic shapes Bm , with M being
typically smaller than the number of observed time points, Jn . If the num-
ber of points tjn is very large, as for the magnetometer or high frequency
financial data, expansion (1.3) serves the practical purpose of replacing the
original scalar data Xn (tjn ) by a smaller collection of the coefficients cnm .
If the time points tjn differ between subjects, the expansion puts the curves
into a common domain, so that they are more readily comparable. For each
n, the curve xn is represented by the column vector cn = [cn1 , cn2 , . . . , cnM ]T
of dimension M . Expansion (1.3) can also be viewed as a preliminary smooth-
ing of the curves; if the basis functions are smooth, as is the case for most
commonly used basis systems, then the right–hand side of (1.3) will inherit
this smoothness. However, additional and more targeted smoothing, say for
parameter estimates, can be done later on.
We now discuss R implementation. The fda package in R was originally
designed to accompany the book of Ramsay and Silverman (2005). In it lie
the building blocks to carry out nearly all of the methods discussed in this
book. In addition to the fda package, the refund package has emerged with
a large collection of flexible tools which we will discuss later on. After loading
the package fda using the RGui interface, use the following code
spline.basis=create.bspline.basis(rangeval=c(0,10), nbasis=5)
plot(spline.basis, lty=1, lwd=2)
to produce Figure 1.3 whose left panel shows five B-spline basis functions
defined on the interval [0, 10]. There are additional arguments which specify
the degree of smoothness and the position of the basis functions, we use default
values. The code
fourier.basis=create.fourier.basis(rangeval=c(0,10), nbasis=5)
First steps in the analysis of functional data 5
Example 1.1.1 [B-spline expansion of the Wiener process] The Wiener pro-
cess, also known as the Brownian motion, is defined in Section 11.4. It is an
appropriate limit of the random walk
i
1 X
Si = p Nk , Nk iid N (0, 1), 1 k K.
K k=1
Figure 1.4 shows a trajectory of the random walk which can be viewed as
a function defined on interval [0, K] by X(ti ) = Si , ti = i. Notice some
similarity to the price data in Figure 1.2. In the code below, the function
smooth.basis is used to create a functional data object Wiener.fd which
contains the expansion coefficients cnm as well as information about the basis
functions used to expand the random walk function. The following code was
used to generate Figure 1.4:
Wiener=cumsum(rnorm(10000))/100 # random walk on [0,K], K=10ˆ4
plot.ts(Wiener, xlab="", ylab="")
B25.basis=create.bspline.basis(rangeval=c(0,10000), nbasis=25)
Wiener.fd=smooth.basis(y=Wiener, fdParobj=B25.basis)
lines(Wiener.fd, lwd=3)
1.0
0.5
0.0
−0.5
FIGURE 1.4: Random walk and its expansion (1.3) using 25 B-spline basis
functions.
Customized R functions can be used to ensure that the output functions are
monotone or nonnegative.
N
( N
)1/2
1 X 1 X
2
X̄N (t) = Xn (t), SDX (t) = (Xn (t) X̄N (t)) .
N n=1 N 1 n=1
2
1
0
-1
-2
FIGURE 1.5: Random walks converted to functional objects together with the
pointwise sample SD (thick continuous line) and the pointwise mean (thick
dashed line).
add those to the plot, see Figure 1.5. The following code was used to produce
Figure 1.5. The output of the function smooth.basis is a list. The values
of the functions are extracted using $fd.
N=50
W.mat=matrix(0, ncol=N, nrow=10000)
for(n in 1:N){W.mat[, n]=cumsum(rnorm(10000))/100}
B25.basis=create.bspline.basis(rangeval=c(0,10000), nbasis=25)
W.fd=smooth.basis(y=W.mat, fdParobj=B25.basis)
plot(W.fd, ylab="", xlab="",col="gray",lty=1)
W.mean=mean(W.fd$fd)
W.sd=std.fd(W.fd$fd)
lines(W.sd, lwd=3); lines(W.mean, lty=2, lwd=3)
The pointwise sample standard deviation gives us an idea about the typical
variability of curves at any point t, but it gives no information on how the
values of the curves at point t relate to those at point s. An object which is
extensively used in FDA is the sample covariance function defined as
N
1 X
ĉ(t, s) = Xn (t) − X̄N (t) Xn (s) − X̄N (s) .
N − 1 n=1
The interpretation of the values of ĉ(t, s) is the same as for the usual variance-
covariance matrix. For example, large values indicate that Xn (t) and Xn (s)
8 Introduction to Functional Data Analysis
First steps in the analysis of functional data 9
c(s,t)
s
10000
0.3
0
0.7
0.6
8000
0.5
0.4
6000
0.3
0.3
4000
0.2
2000
0.1
0
0
FIGURE 1.6: A perspective plot (top) and contour plot (bottom) of the co-
variance function of the sample of 50 random walks from Example 1.2.2.
10 Introduction to Functional Data Analysis
−0.015
FIGURE 1.7: The first four estimated functional principal components of the
50 random walks from Example 1.2.2.
In expansion (1.3), the basis functions Bm are fixed. The idea of the func-
tional principal component expansion is to find functions v̂j such that the
centered functions Xn X̄N are represented as
p
X
Xn (t) X̄N (t) ξˆnj v̂j (t)
j=1
with p much smaller than M in (1.3). The EFPC’s v̂j are computed from
the observed functions X1 , X2 , . . . , XN after converting them to functional
objects. Figure 1.7 shows the EFPC’s v̂j , j = 1, 2, 3, 4, computed for the 50
smoothed trajectories of the random walk. The v̂j resemble trigonometric
functions, and we will see in Sections 11.4 and 12.2 that they indeed are
estimates of specific trigonometric functions whose closed form can be found
analytically. The first EFPC, v̂1 , plotted as the continuous black line, shows
First steps in the analysis of functional data 11
the most pronounced pattern of the deviation from the mean function of a
randomly selected trajectory. A cursory examination of Figure 1.5 confirms
that the shape of v̂1 indeed summarizes the main pattern of variability around
the mean function well. For each curve Xn , the coefficient ξˆn1 quantifies the
contribution of v̂1 to its shape. The coefficient ξˆnj is called the score of Xn
with respect to v̂j . The second EFPC, plotted as the dashed red line, shows
the second most important mode of departure from the mean functions of the
50 random walk curves. The EFPC’s v̂j are orthonormal, in the sense that
Z
0 if j 6= i,
v̂j (t)v̂i (t)dt =
1 if j = i.
0.04
0.03
0.02
0.01
0.00
−0.03 −0.02 −0.01
0 1 2 3 4 5 6
FIGURE 1.8: Plot of first ten cumulative log returns for BOA.
value of the stock on day n at time t, then the cumulative log-return is given
by
Pn (t) Pn (0)
Rn (t) := log(Pn (t)) log(Pn (0)) .
Pn (0)
The function Rn (t) depicts how an investment, made at opening, evolves over
the course of the day. The first 10 such days are given in Figure 1.8. There
is a substantial outlier that occurs on August 26th, 2004, which is due to a
stock split and is thus discarded from further analysis. The plot is generated
using the R commands:
BOA<-read.table("BOA.txt",header=TRUE)
Dates<-dimnames(BOA)[[1]]
BOA<-data.matrix(BOA)
Outlier<-which(Dates=="08/26/2004")
BOA<-BOA[-Outlier,]
N<-dim(BOA)[1]
M<-dim(BOA)[2]
Times<-seq(0,6.5,length=M)
log_BOA<-log(BOA) - matrix(log(BOA)[,1],nrow=N,ncol=M)
bspline_basis<-create.bspline.basis(rangeval=c(0,6.5),norder
=4,nbasis=200)
log_BOA_f<-Data2fd(Times,t(log_BOA),basisobj = bspline_basis)
plot(log_BOA_f[1:10],xlab="",ylab="",lwd=1.5)
In Figure 1.9 we plot the mean function and, using the standard deviation
function, we include point-wise 95% confidence intervals. The returns have
a small positive mean function which increases rapidly early in the day and
Another random document with
no related content on Scribd:
even two or three months. I have seen a number of patients who
have attacks of migraine on Sunday with regularity, and escape
during the interval. Some of these cases ascribed the attacks to
sleeping later on this day than on others, but it is more likely that the
attacks were the result of the culminating effect of a week's hard
work. Between the attacks the patient is usually quite well as far as
headache is concerned, but he may have slight neuralgia in
branches of the trigeminal. The attacks are more or less alike. They
are often preceded by prodromal symptoms for a day or two. The
patient may feel languid or tired for a day before the attack.
Sometimes there is unusual hunger the night before a paroxysm, or
there may be violent gastralgia before each attack. The patient often
wakes in the morning after sound sleep with a pain in the head.
Should the attack come on in the day, it may be preceded by
chilliness, yawning, or sneezing and a sense of general malaise.
Ocular symptoms are frequent as a forerunner of an attack. First
muscæ volitantes are seen, then balls of fire or bright zigzags
appear before the eyes, making it impossible for the patient to read.
These symptoms last for a few minutes or a half hour, and then
cease, to be immediately followed by pain. Hemianopsia is a
precursory symptom of rather frequent occurrence. Ross mentions a
case in which the hemianopsia usually lasted about a half hour, and
was followed by severe hemicrania. The ocular symptoms are often
very alarming to patients.
Painful points (Valleix's points) are not present, but there is usually
tenderness over the supraorbital notch during an attack of migraine,
and after the paroxysm there is a general soreness of the scalp and
forehead. Sometimes there remains a tenderness of the parts
surrounding the affected nerve. This is not in the nerve itself, but in
the adjacent tissues. Anstie9 says that in his own case, after
repeated attacks of migraine, the bone had become sensibly
thickened in the neighborhood of the supraorbital notch. There is
sometimes hyperæsthesia of the skin in the affected regions of the
forehead and scalp during an attack. As well as hyperæsthesia,
there may be an abnormal acuteness of the sense of touch. Deep
pressure over the superior and middle ganglia of the sympathetic
causes pain, according to Eulenburg. This observer also states that
the spinal processes of the lower cervical and upper dorsal vertebræ
are painful on pressure.
9 Op. cit., p. 182.
During the attack there are disorders of the circulation. The pulse
may be intermittent or irregular, and the extremities are usually cold.
Disorders of cutaneous sensibility are also often present. A condition
of numbness confined to one lateral half of the body is sometimes
experienced during the early part of the paroxysm. This numbness is
noticed even in one half of the tongue.
The German writers have divided migraine into two types, and the
arrangement may be followed in some instances. The first is called
hemicrania spastica or sympathico-tonica. In this form there is
supposed to be vascular spasm and a diminished supply of blood in
the brain. The symptoms are as follows: When the attack has
reached its height the face is pale and sunken; the eye is hollow and
the pupil dilated; the arteries are tense and feel like a cord. The
external ear and the tip of the nose are cold. Eulenburg10 states that
by actual measurement he has found the temperature in the external
auditory meatus fall 0.4° to 0.6° C. The pain is increased by
stooping, straining, or anything which adds to the blood-supply in the
head. At the end of the attack the face becomes flushed and there is
a sense of heat. The conjunctiva becomes reddened, the eye is
suffused, and the pupil, which had been dilated, contracts. The
sense of warmth becomes general, the pulse is quickened, and the
heart palpitates. The crisis is reached with vomiting and a copious
flow of urine or perhaps a diarrhœic stool. There is sometimes an
abundant flow of saliva. One observer has reported that he has
estimated a flow of two pounds of saliva during an attack.
10 Op. cit.
In all forms, if the patient can be quiet, he usually falls asleep after
the crisis has been reached, and awakes free from pain, but feeling
haggard and prostrated.
The paroxysm lasts for several hours, generally the greater part of
the day. It may last for several days, with variations of severity. The
attacks are at longer or shorter intervals of time, and in women they
often appear at the menstrual period. The attack may be brought on
by over-mental or bodily exertion, imprudence in eating or drinking,
and exposure to cold draughts of air. It will often begin as a
supraorbital neuralgia from exposure to cold, and go on through all
the phenomena of a regular migraine.
We now come to the question of the origin and seat of the pain in
migraine. This question has involved a great deal of thought, and
has been answered in various ways by different writers. E. du Bois-
Raymond thought that the pain was due to tonic spasm of the
muscular coats of the vessels, and that thereby the nerves in the
sheaths of the vessels were pinched, as it were, and so caused pain.
Moellendorff was of the opinion that the pain was due to dilatation of
the vessels, and not to contraction; and this theory might explain the
pain in the angio-paralytic form. There are many cases in which
neither of these views is sufficient, for we have no reason to believe
that a condition of either anæmia or hyperæmia is present.
Romberg believed that the pain was situated in the brain itself, and
Eulenburg holds that the pain must be caused by alterations in the
blood-supply, without regard to their origin, in the vessels of one side
of the head. He thinks that the vessels may contract and dilate with
suddenness, just as is often seen in some neuralgias, and thus
intensely excite the nerves of sensation which accompany the
vessels. The increase of pain upon stooping, straining, or coughing,
and the influence upon it by compression of the carotids, seem to
give force to this view. But are we not here confusing cause with
effect? Are not these variations in the calibre of the vessels due to
the irritation of the sensory and vaso-motor nerves, which are in a
state of pain? No doubt increase in the blood-supply augments the
pain, just as it does in an inflamed part when more blood goes to the
part. Let a finger with felon hang down, or let a gouty foot rest upon
the floor, what an intensity of pain follows!
Anstie brings forward as arguments to support his view the facts that
the attacks of migraine often interchange with neuralgic seizures,
and that a person who has been migraineuse in early life may in later
years lose his hemicranial attacks, and have violent neuralgia in the
ophthalmic division of the fifth nerve.
The true seat of the lesion, if we may so call it, upon which the
exaggeration of pain-sense depends, is probably in the nerve-centre;
that is, in that part of the trigeminal nucleus back to which the fibres
go which are distributed to the painful areas. The pain is no doubt
chiefly intracranial, and in those portions of the cerebral mass and
meninges to which branches of the trigeminal are distributed. All of
the divisions of the trigeminus send branches to the dura mater.
Many nerves are found in the pia mater as plexuses around the
vessels, some of which penetrate into the centre of the brain. Most of
these nerves come from branches of the trigeminus.
Anstie has found the careful use of galvanism to the head and
sympathetic of positive advantage in keeping off attacks, and
Eulenburg has had the same experience.
In the treatment of the attack the patient should be freed from all
sources of external irritation. He should lie down in a darkened room,
and all noises should be excluded. If the attack is of the hyperæmic
variety, the patient's head should not be low, as this must favor
increase of blood to the head. In this form the patient is often more
comfortable sitting up or walking about. Occasionally an impending
attack can be warded off by the administration of caffeine, guarana,
or cannabis indica. Purgatives are of but little value in this form of
headache. The local application of menthol or of the oleate of
aconitia to the brow of the affected side will sometimes prevent an
attack. If a person can lie down quietly when he feels an attack
coming on, one or two doses of fifteen grains each of the bromide of
lithium will enable him to sleep, and wake free from pain. I have
found the lithium bromide far more valuable in migraine than any
other of the bromides. An effervescing preparation known as bromo-
caffeine is often efficacious in aborting a paroxysm or in palliating it
when it has got under way.
Once the attack has begun fully, we can only attempt to mitigate the
pain. Firm pressure on the head generally gives relief, and encircling
the head firmly with a rubber bandage is often of great comfort.
Compression of the carotids gives temporary but decided ease to the
pain. Strong counter-irritation in the shape of a mustard plaster to the
nape of the neck or a stimulating application, like Granville's lotion,
to the vertex, will afford relief. I have found in some cases that
placing a hot-water bag, as hot as could be borne, against the back
of the head alleviates the pain. In other instances cold affords more
relief, and an ice-bag resting upon the forehead is the most
efficacious way of applying cold. Hot bottles to the feet are an
accessory not to be overlooked.
It is for this reason that I prefer to use the bromides, and if a patient
is seen at the beginning of a paroxysm, given a fifteen-grain dose of
bromide of lithium, his feet put in hot mustard-water, and he then
goes to bed, he will almost always cut his attack short, and on
waking from sleep will feel refreshed and able to take food.
VERTIGO.
A few persons insist that something like a distinct aura precedes the
attacks. In other cases the brain symptoms develop gradually, from a
faint sense of dizziness up to a tumultuous feeling of confusion with
sensory illusions. In a few rare cases there is, as in that above
mentioned, an abrupt onset. Something seems to snap in the head,
and the vertigo follows; or, most rare of all, we have a sensory
discharge felt as light or sound, and followed by the ordinary
symptoms.2
2 See the author in lectures on Nerv. Diseases, Disorders of Sleep, p. 63, 2d ed.
In pigeons, injury on one side may get well, but when the canals are
cut on both sides there is permanent loss of balance. In some way,
then, these little organs appear to be needful to the preservation of
equilibrium; and of late some interesting attempts have been made
to explain the mechanism of this function. It probably depends on the
varying pressure relations of the endo-lymph to the nerve-ends
which lie in the membranous canals.
Lastly, excess in venery, or, in rare cases, every sexual act, profound
moral and emotional perturbations, and in some states of the system
mental exertion, may occasion it, while in hysteria we may have
almost any variety of vertigo well represented. Outside of the brain
grave organic diseases of the heart are apt to produce vertigo,
especially where the walls of the heart are fatty or feeble from any
cause. Suppression of habitual discharges, as of hemorrhoids or
menstrual flow, is certainly competent, but I have more doubt as to
the accepted capacity of rapidly cured cutaneous disease.