9 - Functional Data Analysis With Application To Periodically
9 - Functional Data Analysis With Application To Periodically
SUMMARY
We present a basis solution for the modelling of a binary response with a functional covariate plus any
number of scalar covariates. This can be thought of as singular longitudinal data analysis as there are
more measurements on the functional covariate than subjects in the study. The maximum likelihood
parameter estimates are found using a basis expansion and a modied Fisher scoring algorithm. This
technique has been extended to model a functional covariate with a repeated stimulus. We used period-
ically stimulated foetal heart rate tracings to predict the probability of a high risk birth outcome. It was
found that these tracings could predict 94:1 per cent of the high risk pregnancies and without the stim-
ulus, the heart rates were no more predictive than chance. Copyright ? 2002 John Wiley & Sons, Ltd.
KEY WORDS: foetal habituation; functional data analysis; generalized linear models; maximum
likelihood
1. INTRODUCTION
Techniques for analysing functional data, where data on each subject can be thought to repre-
sent a continuous curve, have received much attention in recent years. Like longitudinal data,
the measurements are correlated over time. However, functional data contain many more mea-
surements per subject than subjects, resulting in singular equations if traditional longitudinal
methods are used. New methods, which have come to be known as functional data analy-
sis [1; 2] (FDA), have been developed for this type of data.
Many researchers have presented methods for FDA; they include functional principal com-
ponent analysis [3–5], functional ANOVA [6] and functional regression [1]. Existing regres-
sion techniques deal with only continuous [2; 7] and functional responses [8].
In this paper we present a method for FDA with a binary response, which we call functional
logistic regression. We then extend this method to the case of a functional covariate with a
∗ Correspondence to: Sarah J. Ratclie, Department of Biostatistics and Epidemiology, University of Pennsylvania,
School of Medicine, 831 Blockley Hall, 423 Guardian Drive, Philadelphia, PA 19104-6021, U.S.A.
† E-mail: [email protected]
repeated stimulus. These techniques are used to determine if human foetal heart rate responses
to repeated vibroacoustic stimulation, as presented in Part I [9], are predictive of an infant’s
risk status at birth. We also investigate whether the same results can be found without the
stimuli.
As stated in Part I [9], this type of data has usually been analysed using the concept of
habituation, which is a decrease, leading to a cessation of the response that follows a repeated
stimulus. For example, links between impaired habituation and high risk [10] and traumatized
newborn infants [11] have been found. However, by using functional techniques, we can
model the data without incorporating the subjective notion of habituation.
2. METHODOLOGY
and
xi (t) = ci (t)
(3)
⇒ X (t) = C(t)
where b is a vector of basis coecients which need to be estimated. Estimates for C can be
found using standard least squares (as described in Part I).
Copyright ? 2002 John Wiley & Sons, Ltd. Statist. Med. 2002; 21:1115–1127
FUNCTIONAL LOGISTIC REGRESSION WITH PERIODICALLY STIMULATED DATA 1117
Substituting for (t) and xi (t), the regression model (1) becomes
i
log = zi + ci (t)T (t)b dt
T
1 − i
= ziT + ci Wb
(4)
⇒ log = Z + CWb
1−
= [Z CW ]
b
where W = (s)T (s) ds.
This model is now in a similar form to standard logistic regression models, and maximum
likelihood parameter estimates can be found via Fisher scoring [13]:
−1
ˆ Z T w∗ Z Z T w∗ CW ZT
= w∗ (5)
b̂ (CW )T w∗ Z (CW )T w∗ CW (CW )T
where w∗ is the diagonal weights matrix with i (1 − i ) as its diagonal elements and
i = ˆ i + (yi − ˆ i )=wii∗
ˆ i = ziT ˆ + ci Wb
Since depends on the parameter estimates and these estimates in turn depend on , an
iterative algorithm (as given in McCullagh and Nelder [12]) is used to estimate the parameters
in practice.
We have used cross-validated log-likelihoods to determine the number of basis functions,
M , to be used in the model. Thus, the optimal M value is the one which maximizes the
following equation:
where ˆ i; −i is the predicted probability of a success for subject i when the parameter estimates
are found without subject i.
To compare functional logistic regression models, the residual deviance can be used. For
functional logistic regression, this will reduce to (see McCullagh and Nelder, reference [12],
p. 121 for details)
ˆ = −2ˆ T ˆ − 2
D(y; ) log(1 − ˆ i ) (7)
i
For standard logistic regression, the deviance function is not uniquely dened; it depends on
whether the data are grouped or ungrouped. However, with functional logistic regression we
will always have ungrouped data since each subject has a unique functional covariate.
Copyright ? 2002 John Wiley & Sons, Ltd. Statist. Med. 2002; 21:1115–1127
1118 S. J. RATCLIFFE, G. Z. HELLER AND L. R. LEADER
where s is the parameter for the sth stimulus. s = 1; : : : ; q (for the foetal data q = 19), and
xi; s (t) is now the functional covariate for the ith subject, measured at time t within the sth
stimulus.
As for functional logistic regression, we have modelled both the functional covariate within
each stimulus minute and the functional parameter via M basis functions. (Note that M is again
chosen using the cross-validated log-likelihood.) Thus, the regression equation (8) becomes
q
i
log = ziT + s Ci (t)T (t)b dt
1 − i s=1
= ziT + T Ci Wb (9)
As before, the maximum likelihood parameter estimates can be found via Fisher scoring
(see Appendix A). We have
−1
ˆ Z T w∗ Z Z T w∗ D ZT
= T ∗ w∗ (10)
b̂ D w Z DT w ∗ D DT
ˆ T w∗ E(E T w∗ E)−1
ˆT = ( − Z ) (11)
where
ˆT C1 W
..
D = .
T
ˆ Cn W (12)
T
E = [(C1 W b̂) : : : (Cn W b̂)]
i = ziT + T Ci Wb
In practice, ;
ˆ b̂ and ˆ are found using a combination of the GLM algorithm [12] and the
weighted iterative least squares algorithm from Part I [9]. Details of this new algorithm are
given in Appendix B.
Copyright ? 2002 John Wiley & Sons, Ltd. Statist. Med. 2002; 21:1115–1127
FUNCTIONAL LOGISTIC REGRESSION WITH PERIODICALLY STIMULATED DATA 1119
We now return to the foetal heart rate data. The infant’s risk category at birth is a binary
response, with subjects divided into groups depending on their antenatal course and other birth
outcomes: normal and high risk.
We examine two groups of data: heart rate tracings from foetuses that had and had
not been stimulated. Since the foetal heart rates are assumed to return to their base rate
sometime after each stimulus, but before the next stimulus is applied, Fourier basis func-
tions have been used for the stimulated group. Consequently, Fourier basis functions were
also used for the unstimulated group. So, 1 (t) = 1; 2k (t) = cos 2kt; 2k+1 (t) = sin 2kt;
k = 1; : : : ; M=2.
Copyright ? 2002 John Wiley & Sons, Ltd. Statist. Med. 2002; 21:1115–1127
1120 S. J. RATCLIFFE, G. Z. HELLER AND L. R. LEADER
Figure 1. Functional logistic regression results for unstimulated foetal heart rates.
stimulus being applied, Fourier basis functions were used to model the data and the parameter
estimate.
The functional model was found to be
19
ˆ i ˆ dt
log = −0:910 + ˆs xi; s (t)(t)
1 − ˆ i s=1
Copyright ? 2002 John Wiley & Sons, Ltd. Statist. Med. 2002; 21:1115–1127
FUNCTIONAL LOGISTIC REGRESSION WITH PERIODICALLY STIMULATED DATA 1121
Figure 2. Parameter estimates from functional logistic regression for risk category.
with a residual deviance of 84.497 on 38 degrees of freedom. The functional time parameter,
(t), was modelled using M = 5 basis functions. The classication table for this model is given
in Table III. Overall, 96.8 per cent of all the subjects were correctly classsied. Using the
best classication cut-o of ˆ = 0:6, only one normal and one high risk birth were incorrectly
classied.
The estimated functional time parameter, (t),ˆ and minute parameters, ˆs , are shown
in Figure 2. The histogram of the predicted probabilities is given in Figure 3. This shows
clearly a dierentiation in the predicted probabilities between the normal and high risk
groups.
Comparing the logistic and functional logistic models, we see that the functional model is
signicantly better than the simple logistic model. The functional model correctly detected
94.1 per cent of the high risk pregnancies, while the logistic model only correctly detected
17.6 per cent. The ROC curves [14] (Figure 4) also show that the functional logistic model
is superior to the logistic model.
Copyright ? 2002 John Wiley & Sons, Ltd. Statist. Med. 2002; 21:1115–1127
1122 S. J. RATCLIFFE, G. Z. HELLER AND L. R. LEADER
Figure 4. ROC curves for the functional and simple logistic regression models for risk category.
3.3. Controls
The results of the stimulated heart rates were validated using the 10 unstimulated subjects as
controls. Since the models were based on 19 minutes worth of heart rate measurements, the
subjects with less than 19 minutes had the start of their measurements replicated at the end
to produce a full 19 minutes worth of data. The predictors and heart rate measurements were
then placed into the above model, found using the stimulated heart rates, in order to predict
the risk category for the controls.
Copyright ? 2002 John Wiley & Sons, Ltd. Statist. Med. 2002; 21:1115–1127
FUNCTIONAL LOGISTIC REGRESSION WITH PERIODICALLY STIMULATED DATA 1123
The classication summary, using the functional logistic model found above, for the controls
is given in Table IV. It appears that there is no relationship between the true and predicted
outcomes. Thus, without the stimuli being applied, the heart rate does not give a useful
prediction of the infant’s risk category.
4. CONCLUSION
We have presented a method for logistic regression with a functional predictor. Both the
functional predictor and its corresponding functional parameter were modelled using basis ex-
pansions. The maximum likelihood parameter estimates were then calculated using the standard
logistic regression algorithm [12]. This basis solution has the advantage that it is relatively
simple and can be implemented with only minor changes to existing standard logistic regres-
sion computer algorithms.
Also presented is a modied form of functional logistic regression for use with a functional
predictor with a repeated stimulus. This method was used to model the foetal heart rate data.
Unlike current techniques, no denition of habituation was needed for the model.
This study found that the stimulated foetal heart rates were a good predictor of an infant’s
risk category at birth. The functional model correctly predicted 94.1 per cent of the high
risk pregnancies, compared to 17.6 per cent for the best standard logistic regression model.
However, it should be borne in mind that these percentages are optimistic, as the parameter
estimates were based on the same data on which predictions were made. Also, the functional
model used substantially more degrees of freedom than the standard logistic model.
It was found that the repeated stimulus was necessary for the heart rates to be predictive.
Without the stimulus, the heart rates were no more predictive of the infant’s birth outcome
than chance.
The other covariates in the study were found to have no eect on the infant’s birth out-
come. This included maternal age, smoking, drinking and caeine intake levels. However, the
smoking, drinking and caeine intake rates were low in the sample group.
The ndings from both parts of this study may have important clinical implications. Using
the functional model after stimulation as a clinical test may help alert the obstetrician to a high
risk birth, and to determine the optimal time to deliver a foetus in a complicated pregnancy.
It may also have a useful role in alerting parents about possible developmental delay, so that
early intervention could be undertaken.
Copyright ? 2002 John Wiley & Sons, Ltd. Statist. Med. 2002; 21:1115–1127
1124 S. J. RATCLIFFE, G. Z. HELLER AND L. R. LEADER
As with standard GLMs, the actual responses, yi , are assumed to come from a Bernoulli(i )
distribution. Thus, the log-likelihood function can be expressed as
n
i
l(; y) = yi log + log(1 − i ) (A1)
i=1 1 − i
Parameter estimates can be found by maximizing equation (A1) with respect to ; b and .
This is done using the Fisher scoring method [13].
First, the derivative of the log-likelihood function with respect to i is
9l yi − i
=
9i i (1 − i )
Using
i
log = i = ziT + T Ci Wb
1 − i
and the chain rule, the derivative of the log-likelihood with respect to k is
9l n 9l d 9
i i
=
9 k i=1 9i di 9 k
n yi − i
= i (1 − i )zi;Tk
i=1 i (1 − i )
n
= (yi − i )zi;Tk (A2)
i=1
= {Z T w∗ Z }jk
Copyright ? 2002 John Wiley & Sons, Ltd. Statist. Med. 2002; 21:1115–1127
FUNCTIONAL LOGISTIC REGRESSION WITH PERIODICALLY STIMULATED DATA 1125
where w∗ is the diagonal weights matrix, as given in the algorithm. By Fisher’s scoring
method, the new estimate of ; ˆ new , is given by
2 2
9 l 9 l 9l
−E 2 ˆ new = −E 2 ˆ +
9 9 9
Now
92l
−E 2 ˆ = Z T w∗ Z ˆ
9
= Z T w∗ (ˆ − Db̂)
= Z T w∗ ( − Db̂)
⇒ ˆ = (Z T w∗ Z)−1 Z T w∗ ( − Db̂)
Similarly
b̂ = (DT w∗ D)−1 DT w∗ ( − Z )
ˆ
ˆ T w∗ E(E T w∗ E)−1
ˆT = ( − Z )
Note that the equations for ˆ and b̂ can be combined and written as
T ∗ −1
ˆ Z w Z Z T w∗ D ZT ∗
= T ∗ w
b̂ D w Z DT w ∗ D DT
Copyright ? 2002 John Wiley & Sons, Ltd. Statist. Med. 2002; 21:1115–1127
1126 S. J. RATCLIFFE, G. Z. HELLER AND L. R. LEADER
ˆ T E(E T E)−1
ˆT = (˜ − Z )
where ˜ = [˜1 : : : ˆ n ]T .
Step 1. Find the linear predictors ˆ i for the regression using the parameter estimates:
ˆ i = ziT ˆ + ˆT Ci W b̂
wi = ˆ i (1 − ˆ i )
yi − ˆ i
i = ˆ i +
wi
Step 4. Re-estimate the parameter values via a weighted version of the functional re-
gression algorithm [9], with i as the response variable. This weighted version
nds the parameter estimates via a weighted least squares with weights wi :
i = ziT + T Ci Wb
where the parameter estimates in the algorithm are found using the following
equations with w∗ as the diagonal weights matrix and the vector of adjusted
dependent variables:
T ∗ −1
ˆ Z w Z Z T w∗ D ZT ∗
= w (B1)
b̂ DT w ∗ Z DT w ∗ D DT
ˆ T w∗E(E T w∗ E)−1
ˆT = (v − Z ) (B2)
Step 5. Check for convergence. If the algorithm has converged, then stop; else repeat
from step 1.
Convergence is determined by looking at the change in the parameter estimates from one
iteration to the next. If the changes are suciently small, the algorithm is assumed to have
converged.
Copyright ? 2002 John Wiley & Sons, Ltd. Statist. Med. 2002; 21:1115–1127
FUNCTIONAL LOGISTIC REGRESSION WITH PERIODICALLY STIMULATED DATA 1127
REFERENCES
1. Ramsay J, Dalzell C. Some tools for functional data analysis. Journal of the Royal Statistical Society, Series
B 1991; 53:539–572.
2. Ramsay J, Silverman B. Functional Data Analysis. Springer: New York, 1997.
3. Besse P, Ramsay J. Principal components analysis of sampled functions. Psychometrika 1986; 51:285 – 311.
4. Bouhaddou O, Obled C, Dinh T. Principal component analysis and interpolation of stochastic processes: methods
and simulation. Journal of Applied Statistics 1987; 14:251– 266.
5. Pezzulli S, Silverman B. Some properties of smoothed principal components analysis for functional data.
Computational Statistics 1993; 8:1–16.
6. Fan J, Zhang J. Functional linear models for longitudinal data. Technical report, Department of Statistics, UNC-
Chapel Hill, 1998.
7. Goutis C. Second-derivative functional regression with applications to near infra-red spectroscopy. Journal of
the Royal Statistical Society, Series B 1998; 60:103–114.
8. Faraway J. Regression analysis for a functional response. Technometrics 1997; 39:254–261.
9. Ratclie SJ, Leader LR, Heller GZ. Functional data analysis with application to periodically stimulated foetal
heart rate data. I: Functional regression. Statistics in Medicine 2002; 21:1103–1114.
10. Eisenberg R, Coursin D, Rupp N. Habituation to an acoustic pattern as an index of dierences among human
neonates. Journal of Auditory Research 1966; 6:239–248.
11. Bronstein A, Itina N, Kamenetsaia A. The orienting reaction in newborn children. In Orienting Reex and
Exploratory Behavior, Varonin L, Leontiev A, Luris A, Sokolov E, Vinogradova O (eds). Moscow Academy
of Pedagogical Sciences of RSFSR: Moscow, 1968.
12. McCullagh P, Nelder J. Generalized Linear Models. 2nd edn. Chapman & Hall: London, 1989.
13. Fisher R. Theory of statistical estimation. Proceedings of the Cambridge Philosophical Society 1925; 22:
700 –725.
14. Hanley J. Receiver operating characteristics (ROC) methodology: The state of the art! Critical Reviews in
Diagnostic Imaging 1989; 29:307–335.
Copyright ? 2002 John Wiley & Sons, Ltd. Statist. Med. 2002; 21:1115–1127