I am immortal.
Trezzi, Riccardo
I. INTRODUCTION
Cardiology is a branch of medicine that studies the functioning of the heart. Since the invention of the electrocardiogram (ECG) by Willem Einthoven in 1903, medical science has made tangible progress in the study of heart diseases, including cardiac events prevention, diagnosis, treatment, and risk assessment.
Today, the cardiology literature can be split into two main branches: (1) diagnosis and treatment of heart diseases and (2) cardiovascular risk assessment. Regarding the first one, the literature offers a vast number of papers that study the electrical activity of the heart and correlated dysfunctions. The field includes medical diagnosis and treatment of congenital heart defects, coronary artery diseases, heart failures, valvular heart diseases and electrophysiology (few examples include Hunt et al. 2005; Hemingway and Marmot 1999). Regarding the second one, mathematical models have been developed to estimate the risk of cardiovascular diseases studying patients' observable characteristics (including life styles) and genetic propensities. These studies (see for instance Wilson et al. 1998; Franklin et al. 2001) are designed to estimate the probability of a future cardiac event (typically in the next 5-10 years) and result in widely used clinical cardiovascular risk assessment tools. (1)
However, despite the importance of the subject and the abundance of the aforementioned contributions, the scientific literature still misses a model to predict a patient's life expectancy using heart activity signals. In other words, the literature misses a model able to estimate the approximate date in the future in which a fatal cardiac event might occur. The cardiovascular risk assessment tools have certainly helped in estimating the probability of a cardiac event but these models are still mute about whether the patient will survive to the event or not. Furthermore, the risk assessment models can estimate a probability of a cardiac event considering only a limited number of periods in the future.
In this paper, I go well beyond the frontier. I employ time series econometrics techniques to suggest a decomposition of the heart electrical activity using an unobserved components state-space model. My approach is innovative because the model allows not only to study electrical activity at different frequencies with a very limited number of assumptions about the underlying data generating process but also to forecast future cardiac behavior (therefore estimating the date of death), overcoming the "sudden death forecast" issue which typically arises when using standard time-series models. (2)
My results are duo-fold. First, I show how the heart electrical activity can be modeled using a simple state-space approach and that the suggested model has superior out-of-sample properties compared to a set of alternatives. Second, I show that when the Kalman filter is run to forecast future cardiac activity using data of my own ECG I obtain a striking result: the n-step ahead forecast remains positive and well bounded even after one googol period, implying that my life expectancy tends to infinite. Therefore, I am immortal.
The rest of the paper is organized as follows: Section II briefly explains the technical background of electrocardiography and ECGs. Section III explains the dataset. Section IV introduces the econometric model. In Section V I discuss my results and Section VI concludes.
II. TECHNICAL BACKGROUND: ELECTROCARDIOGRAPHY AND ECGs
Electrocardiography is the process of recording the electrical activity of the heart over a period of time using electrodes (typically in the number of ten) placed on a patient's body. These electrodes detect the tiny electrical changes on the skin that arise from the heart muscle depolarizing during each heartbeat. The overall magnitude of the heart's electrical potential is measured from 12 different angles (or "leads") and is recorded over a period of time. In this way, the overall magnitude and direction of the heart's electrical depolarization is captured at each moment throughout the cardiac cycle. The graph of voltage versus time produced by this noninvasive medical procedure is referred to as an ECG. Conventionally, an ECG records data over a frequency of 720 Hz, meaning that it records 720 observations per second.
A single cycle of cardiac activity can be divided into two basic phases--diastole and systole. Diastole represents the period of time when the ventricles are relaxed (not contracting). Throughout most of this period, blood is passively flowing from the left atrium and right atrium into the left ventricle and right ventricle, respectively. At the end of diastole, both atria contract and it propels an additional amount of blood into the ventricles. Systole represents the time during which the left and right ventricles contract and eject blood into the aorta and pulmonary artery, respectively. During systole, the aortic and pulmonic valves open to permit ejection into the aorta and pulmonary artery. The atrioventricular valves are closed during systole, therefore no blood is entering the ventricles; however, blood continues to enter the atria though the vena cavae and pulmonary veins.
To analyze systole and diastole the cardiac cycle is usually divided into seven phases. The first phase begins with the Pwave of the ECG, which represents atrial depolarization, and is the last phase of diastole. Phases 2-4 represent systole, and phases 5-7 represent early and middiastole. The last phase of the cardiac cycle ends with the appearance of the next Pwave, which begins a new cycle. The ECG waves are recorded on graph paper that is divided into 1 [mm.sup.2] grid-like boxes. The ECG paper speed is ordinarily 25 mm/s. Because the recording speed is standardized, one can calculate the heart rate from the intervals between different waves. Vertically, the ECG graph measures the height (amplitude) of a given wave measured in millivolt (mV).
III. DATA
I use data of my own ECG (shown in Figure 1) that was recorded in a U.S. hospital on February 1.2016 at 5:55 p.m. over the course of 10 s for a total of 7,200 observations (720 observations per second). (3)
At the moment of the data collection the heart rate was around 60 beats per minute, the lower bound of what is typically considered a normal heart rate. Figure 1 shows the V4 wave of the ECG. (4)
The first atrial depolarization (Pwave) occurs roughly after 0.2 s, while the first ventricular depolarization (also known as Rwave) occurs around 0.4 s after beginning recording.
IV. EMPIRICAL MODEL
I model the ECG using a simple univariate unobserved component model (UCM). For a review on this class of models see Harvey (1990). The ECG is decomposed in an unobserved stochastic trend ([[mu].sub.t]), a stochastic wave (or "seasonal factor" using the conventional time series jargon) ([[gamma].sub.t],), and noise ([[epsilon].sub.t]).
The model can be formally expressed by the following four equations:
(1) [ECG.sub.t] = [[mu].sub.t], + [[gamma].sub.t] + [[epsilon].sub.t]
(2) [[mu].sub.t] = [phi][[mu].sub.t-1] + [[beta].sub.t-1] + [[eta].sub.1]
(3) [[beta].sub.1] = [[beta].sub.t-1] + [[zeta].sub.t]
(4) [[gamma].sub.t] = - [S.summation over j=1] [[gamma].sub.t-j] + [[omega].sub.t]
where s and [phi] are parameters. Equations (l)-(4) represents a fully unrestricted model but specific restrictions can be imposed in order to match the time series properties of the ECG signal. The role of pr is to capture the low frequency movements of the ECG. Therefore, the slope of [[mu].sub.t] ([[beta].sub.t]) determines the rate at which the cardiac waves change over a long period of time. On the other hand, the role of [[gamma].sub.t] is to capture the ECG movements at higher frequencies. Ideally, [[gamma].sub.t] captures all five waves of a heartbeat: the Pwave (atrial depolarization), the Qwave (septal depolarization), the Rwave (early ventricular depolarization), the Swave (late ventricular depolarization), and the Twave (repolarization of the ventricles). (5) Finally, [eta]t reflects any (eventual) measurement error.
Due to the peculiar frequency at which the ECG is recorded, in model 4 time (t) is defined in Hertz (Hz), with one period being 1 Hz and 720 periods forming 1 s. It follows that s in Equation (4) is set to 719. (6)
The error terms and [omega].sub.t] are disturbances with zero mean and variance respectively of [[sigma].sup.2.sub.[epsilon]], [[sigma].sup.2.sub.[eta]], [[sigma].sup.2.sub.[xi]] and [[sigma].sup.2.sub.[epsilon]]. The errors driving the different components are assumed to be mutually uncorrected in all time periods. Because preliminary tests have rejected the presence of a unit root in [ECG.sub.t], I set [[sigma].sup.2.sub.[xi] = 0, let [[sigma].sup.2.sub.[eta]] unrestricted, and constrain [phi] < 1, therefore assuming an / (0) trend. The general strategy consists of casting the model in the state-space and applies the Kalman filter. Estimation is done using a Gaussian maximum likelihood estimator.
V. RESULTS
In this section, I first compare the forecasting properties of model 1 against two alternative models widely used in time series analysis as benchmarks. Then, I employ model 1 to estimate my own life expectancy.
The forecasting properties of model 1 are evaluated with a standard out-of-sample exercise comparing the forecast root mean squared error (RMSE) with the RMSE of a set of alternative models. The out-of-sample design is as follows: I run model 1 using the first 5 s of data (3,600 observations) and forecast the remaining 5 s at 1-Hz horizon ([??]+1|r). Then I calculate the RMSE of model 1 and compare it to the RMSE of two alternative models: (1) a random walk (RW) model (which can be achieved by restricting [[sigma].sup.2.sub.[epsilon]] = 0, [[sigma].sup.2.sub.[zeta]] = 0, [[sigma].sup.2.sub.[eta]] = 0, and [phi] = 1 in Equations (l)-(4)) and (2) a stationary AR(1) model (which can be achieved by restricting [[sigma].sup.2.sub.[epsilon]] = 0, [[sigma].sup.2.sub.[zeta]] = 0, [[sigma].sup.2.sub.[eta]] = 0, and [phi] < 1 in Equations (l)-(4)). (7)
The out-of-sample results are shown in Figure 2. Table 1 shows the RMSE of the resulting forecasts, where I have shown each RMSE relative to the RMSE for model 4. The UCM performs significantly better than the alternative models. Moving from an AR(1) model to the UCM improves the RMSE by around 41 %. More significantly, the UCM outperforms a RW model reducing the RMSE by 65%.
The reason why the UCM performs significantly better is visible in Figure 2. The RW forecast (top panel of Figure 2) is a straight line which fails to reproduce the recursive behavior of the ECG. (8)
In other words, the RW model predicts a "sudden death" (a straight line ECG) and this unrealistic prediction applies to any patient, any possible ECG signal, at any given point in time. Also, because the RW model assumes an I(1) trend, the standard errors around the forecast increase over time. On the other hand, the AR(1) model produces a forecast (mid panel of Figure 2) which is only marginally better. Because the AR(1) model is a mean-reverting process, the forecast reverts to its mean quickly (in about 0.2 s) and remains flat since. The uncertainty surrounding the AR(1) forecast is lower than the one of the RW model but the AR(1) forecast suffers from the same unrealistic "sudden death" issue. Rather, the UCM produces a realistic forecast (lower panel of Figure 2) that matches the observed data significantly better than the alternative models, overcoming the "sudden death" problem.
After showing that model 4 has superior forecasting properties compared to the alternatives, I use the UCM to estimate my life expectancy. Because of the nature of this exercise I use a slightly unconventional procedure. Specifically, I estimate the n-step ahead forecast at different horizons relying on the full sample and progressively increasing n. I start with n = 1 x [10.sup.3] which corresponds to 1.39 s time horizon. This implies forecasting my life expectancy 1.39 s after the ECG was recorded. 1 then increase n to 1 x [10.sup.5], 1 x [10.sup.10], 1 x [10.sup.50], and finally to 1 X [10.sup.100] (a googol) which corresponds to 1.057e + 90 years. Each time, I compute the mean and standard deviation of the last 720 forecasted observations corresponding to the last forecasted second. Finally, I compare the mean and the standard deviation of the forecast to those of the observed ECG. Life expectancy is estimated considering whether the standard deviation and mean of the forecast remain positive, finite, and not statistically different from the corresponding ECG moments. Death would occur when the forecasted standard deviation converges to zero implying a flat ECG. Table 2 reports the results, where I have shown the forecasted moments relative to the observed ECG ones. For n = 1 x [10.sup.3] the forecasted mean and standard deviation remain virtually identical--and statistically so--to the corresponding sample ones. Extending the forecast horizon produces similar results. Most importantly, the n-step ahead forecast remains bounded and close to the sample average even after one googol period, implying that my life expectancy tends to infinite.
VI. CONCLUSION
In this paper, I have suggested a model to forecast the heart electrical activity. The model is built on state-of-the-art econometric techniques. I show that the suggested unobserved components state-space model has superior forecasting properties compared to a set of possible alternatives. When the model is employed to forecast my own ECG I obtain a striking result: the n-step ahead forecast remains bounded and well above zero even after one googol period, implying that my life expectancy tends to infinite. I therefore conclude that I am immortal. ABBREVIATIONS ECG: Electrocardiogram RMSE: Root Mean Squared Error RW: Random Walk UCM: Unobserved Component Model
doi: 10.1111/ecin.12419
REFERENCES
Franklin. S. S., M. G. Larson, S. A. Khan. N. D. Wong, E. P.
Leip. W. B. Kannel, and D. Levy. "Does the Relation of Blood Pressure to Coronary Heart Disease Risk Change with Aging? The Framingham Heart Study." Circulation. 103, 2001, 1245-497
Harvey. A. C. Forecasting. Structural Time Series Models and the Kalman Filter. Cambridge: Cambridge University Press, 1990.
Hemingway, H., and M. Marmot. "Evidence Based Cardiology-Psychosocial Factors in the Aetiology and Prognosis of Coronary Heart Disease." BMJ, 318. 1999, 1460-67.
Hunt, S. A., W. T. Abraham. M. H. Chin, A. M. Feldman, G. S. Francis, and T. Ganiats. "ACC/AHA 2005 Guideline Update for the Diagnosis and Management of Chronic Heart Failure in the Adult." Circulation. 62, 2005, el54-235.
Wilson, P. W. F., D. Agostino, B. Ralph. D. Levy, A. M. Belanger, H. Silbershatz, and W. B. Kannel. "Prediction of Coronary Heart Disease Using Risk Factor Categories." Circulation. 97, 1998, 1837-47.
RICCARDO TREZZI *
* I am grateful to Tommaso Trezzi for teaching me Electrocardiography 101 and to Valentina Imelli who will hopefully remain on my side forever. I am also extremely grateful to Andrew Chang, Laura Feiveson, and Sarena Goodman for supporting me throughout the entire process--my eternal existence--especially given their limited lifespans. Also, I am deeply grateful to Sarena Goodman for suggesting me to submit this paper to the miscellaneous section of Economic Inquiry and making both me and this paper eternal. Finally, I am also grateful to Wesley Wilson and two anonymous referees for providing excellent comments. This paper is intended to be a joke. The views expressed in this paper are those of the authors and do not necessarily reflect those of the Board of Governors or the Federal Reserve System. Please note that this paper was written in my own free time. All errors and omissions are mine.
Trezzi: Board of Governors of the Federal Reserve System, Washington, DC 20551. Phone 202-763-8734, E-mail riccardo.trezzi@frb.gov
(1.) Some of these models are publicly available. As an example, see the "Risk Assessment Tool for Estimating Your 10-year Risk of Having a Heart Attack" developed by the National Heart. Lung, and Blood Institute of the U.S Department of Health and Human Services (http://cvdrisk.nhlbi.nih.gov).
(2.) For details about the "sudden death forecast" issue, see Section V.
(3.) The dataset in Excel format and the Oxmetric STAMP file used for the estimations are freely available on the author's website.
(4.) A typical ECG records the heart electrical activity for 10 s from different angles. This implies that the ECG records several signals (typically labeled as "aVR," "aVL," "aVF." "V1," "V2," "V3," "V4," "V5," and "V6") of the same event. The analogy can be made with a basketball play recorded by different cameras at different angles of the field. The choice of using the V4 signal in this paper is totally discretionary but does not influence the results.
(5.) An alternative specification would be to model [[gamma].sub.t] as a stochastic sin-cos wave as follows: [MATHEMATICAL EXPRESSION NOT REPRODUCIBLE IN ASCII] where [rho] is the damping factor. This alternative model can be used when the number of waves in the sample is not equal to the number of seconds and allows the length and deepness of the waves to evolve over time. Robustness checks have shown that the results contained in this paper are insensitive to this choice.
(6.) Because of the high number of seasons, the estimation of the model is quite cumbersome. A possible solution, adopted in this paper, is to average across observations taking the recursive mean every 10 observations. The resulting series displays the same time series properties of the original signal but reduces the computational time dramatically.
(7.) Therefore technically the RW model considered here is a "random walk plus noise" model, as well the AR(1) model is an "AR(1) plus noise" model.
(8.) Technically, given a RW time series [y.sub.t = [y.sub.t] - 1 + [[member of].sub.t] where [[member of].sub.t], is a disturbance with zero mean and variance [[sigma].sup.2.sub.[member of]], the k-step ahead forecast is given by: [E.sub.t]([y.sub.T] + k|yT) = yT for every k since [E.sub.t]([ [[member of].sub.T] + k|yT) = yT.
Caption: FIGURE 1 My Electrocardiogram
Caption: FIGURE 2 Out-of-Sample Forecasts TABLE 1 Out-of-Sample Forecasting Results Forecast method UCM RW AR(1) Relative MSE 1 1.65 1.41 Notes: For each forecast method, this table shows the ratio of the root mean squared error (RMSE) of the forecast made by the method for that raw to the RMSE of the unobserved component model (Equation 4). UCM, unobserved component mode; RW. random walk; AR. auto regressive; MA. moving average. TABLE 2 Life Expectancy Results n n n Horizon 1 x 1 x 1 x [10.sup.3] [10.sup.5] [10.sup.10] Mean 1.00 1.00 1.00 SD 0.98 0.98 0.98 n = n = Horizon 1 x 1 x [10.sup.50] [10.sup.100] Mean 1.00 1.00 SD 0.98 0.98 Notes: For each forecast horizon, this table shows the ratio of the forecasted mean and standard deviation relative to the sample mean and standard deviation. All coefficients are not statistically different (at 1% level) from 1.