{'fraction_non_alphanumeric': 0.02495911256488658, 'fraction_numerical': 0.012657327739458152, 'mean_word_length': 4.738066095471236, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Multiresolution Diffusion Entropy Analysis of time series: an application to births to teenagers in Texas

The multiresolution diffusion entropy analysis is used to evaluate the stochastic information left in a time series after systematic removal of certain non-stationarities. This method allows us to establish whether the identified patterns are sufficient to capture all relevant information contained in a time series. If they do not, the method suggests the need for further interpretation to explain the residual memory in the signal. We apply the multiresolution diffusion entropy analysis to the daily count of births to teens in Texas from 1964 through 2000 because it is a typical example of a non-stationary time series, having an anomalous trend, an annual variation, as well as short time fluctuations. The analysis is repeated for the three main racial/ethnic groups in Texas (White, Hispanic and African American), as well as, to married and unmarried teens during the years from 1994 to 2000 and we study the differences that emerge among the groups.


I. INTRODUCTION
Time series analysis is traditionally done using linear models, such as analysis of variance and linear regression models. Underlying these techniques is the assumption that the phenomena of interest can be described by a few basic standard patterns. However, the variability of the statistical properties of a time series, such as the number of births to married and unmarried teens shown in Figure 1, can present more complex patterns than a periodic cycle or a linear trend, so certain precautions must be adopted for not neglecting less evident but still important properties of a time series. In fact, in the case of teen birth data herein under study it was proved that after removing the background trend from the annual periodicity, the memory remaining depends upon the marital status of the teens [1,2]. This fact suggests that the annual periodicity to which human fertility is related may have social origins more than being simply due to a natural seasonal variation and the corresponding changes in light and temperature [3,4]. The variability of the data might depend on political and social changes, as well as depending on holidays and school schedules that may induce unusual patterns in the data.
Herein we suggest a multiresolution diffusion entropy analysis in order to evaluate the stochastic information left in a time series after a systematic removal, through a detrending procedure, of the memory contribution given by identified patterns. The goal is to study a phenomenon by identifying possible patterns, quantify the amount of information with which each of the patterns contributes to the data and whether the identified patterns are sufficient to capture all relevant information contained in the time series or whether new patterns need to be found. For didactical purposes we limit the analysis presented herein to verifying whether simple additive patterns such as linear trends and periodic cycles are sufficient to describe the complexity of the teen birth data. We adopt a basic regression model because of its simple phenomenological interpretations, but we expect that the multiresolution diffusion entropy analysis will also work with more complex detrending models.  Figure 1 shows the daily number of births to married and unmarried teen mothers in Texas from 1994 through 2000, 2,557 days. During these 7 years, both counts of births are characterized by annual cycles that fluctuate around an apparent linear bias. In the case of unmarried teens this bias increases, whereas the bias decreases in the case of married teens. The characteristics of these data suggest that the simplest patterns can be captured by a least-squares fitting function that involves a linear trend plus two sinusoidal functions modulated by 1-year and 1/2-year periodicities, respectively: The coefficient a gives the approximate mean value of daily births at the beginning of 1994, b is the slope of the linear trend that gives the annual mean increase (positive value) or decrease (negative value) of daily births per year, C 1 and C 1/2 are the amplitudes of the 1 year and 1/2 year periodicities and, finally, τ 1 and τ 1/2 measure the temporal shift of the two sinusoidal functions. The time t is measured in years. The analysis shows that during the period 1994-2000 the 99 daily mean births to unmarried teens is almost double the daily mean births to married teens, that being only 50 daily mean births. The number of births to unmarried teens increases at the velocity of b = 1.92 daily births/year, whereas, the number of births to married teens decreases at the velocity of b = −0.62 daily births/year. Finally, the two smooth solid curves of Figure 1 clearly shows that the 1/2-year harmonic has a much more prominent influence on the unmarried than it does on the married teens.  groups the annual amplitude C 1 is always much stronger than the 1/2-annual amplitude C 1/2 . We observe that the annual cycle is likely related to the one year seasonal temperature/light cycle. The 1/2-year periodicity is likely to be related to the autumn and spring school semesters that, together with the Christmas and Summer holidays, divide the year into two almost symmetric temporal periods. The data present also a weekly periodicity due to the separation of the week in working days (from Mondays to Friday) and weekends (Saturdays and Sundays) when the hospital activity is reduced.

RIES PATTERNS
Time series fluctuations, commonly called noise, look random and uncorrelated, but usually they are not. Different methods have been suggested to extract information from the randomness of a time series; for example, autocorrelation analysis, Hurst analysis and detrended fluctuation analysis [5,6,7], all have been used to determine the interdependence of random fluctuations. The success of these techniques over the last few years is due to the discovery that many natural phenomena described by correlated fluctuations satisfy certain scaling laws [6,8,9]. A common feature of the above techniques is they study the temporal evolution and the scaling of the variance. However, the entropy is a more complete indicator of the stochastic information contained in a distribution and herein it shall be prefered.
Diffusion entropy analysis (DEA) measures the time evolution of the Shannon entropy of the probability density function (pdf) in terms of the diffusion process generated by the time series [1,10,11,12]. A time series of data {ξ i } may be interpreted as the fluctuations in a diffusion process. As in a random walk, we define trajectories by the superposition of these fluctuations where z = 0, 1, ... . These trajectories generate a diffusion-like process that is described by , where x denotes the variable collecting the fluctuations and t is the diffusion time. The Shannon entropy is defined by DEA measures the stochastic information contained in the variability of the smooth functions at different time scales. In fact, the diffusion trajectories x (z) (t) of Eq. (2) generate a pdf p(x, t) whose dispersion at each time t is related mainly to the smooth component of the signal characterized by the lower frequencies f < 1/t because the frequencies f > 1/t are smoothed over by the sum (2).
A constant signal, equivalent to a horizontal straight line, does not have any variability, therefore, its entropy is zero. In the presence of a correlated noise, like the fractional Brownian motion (fGm) [9], the pdf of the diffusion process satisfies the scaling equation Inserting Eq. (4) into Eq. (3), we obtain where A is a constant. The coefficient δ of Eq. (4) is the scaling exponent. The exponent δ can be evaluated by using fitting curves with function of the form f S (t) = δ ln(t) + K that, when plotted on linear-log graph paper, yields straight lines. For fBm the scaling exponent δ coincides with the Hurst exponent H [11]. For random noise with finite variance, the diffusion distribution p(x, t) will converge, according to the central limit theorem [13], to a However, Figure 2 reveals much more of the time series using a multiresolution diffusion entropy analysis [10]. The idea is to extract from the data the information that may be related to some noticeable patterns in the data. In the teen birth case, a good choice is given by the simple regression model of Eq. (1), that provides information about the linear growth and the two main periodicities in the time series. We detrend this information from the data and apply the DEA to the resulting data set. In this way we determine the stochastic information remaining in the detrended time series.
The ideal goal would be to find the solution of the underlying process, that is, an analytic function that makes the entropy of the system vanish after the detrending procedure. A more modest goal is to extract all relevant information leaving only random noise. So, we first apply the DEA to the birth data after detrending the linear ramp y = a+bt. The second uppermost curves in Figure 2 show the results. We see a decrease in the entropy because we have removed part of the information from the time series, but the complex bending shape with the 1-year periodicity remains. The decrease in the entropy is stronger in the unmarried than in the married teens because their velocity of growth, b = 1.94 births/year, is larger. The second step is to detrend the annual periodicity (the third uppermost curves) in addition to the linear ramp. The entropy again decreases, as expected, but in the case of unmarried teens a clear 1/2-year cycle appears. The figure gives a visual impression of how much more important the 1/2-year periodicity is for the unmarried teens, than it is for the married teens. In the third step we detrend the linear ramp plus both 1-year and 1/2-year periodicities (the lowest curves shown in Figure 2). We continue to see the decrease in the entropy at any point in time. This decrease in entropy is very small for the married teens, because for them the 1/2-year cycle does not contain very much information and, finally, we see that the weekly cycle emerges more and more clearly.  Figure 3A shows that the residual noise is not an uncorrelated random process. In fact, the two slopes are δ = 0.65 (married) and δ = 0.60 (unmarried), are significantly larger than δ = 0.5 of the uncorrelated random noise implying that the underlying process, after the detrending procedure, retains some anomalous persistence. So there is still some residual memory or information that the simple regression model described by the Eq. (5) is not able to extract. Moreover, we notice the similarity of the curves of Hispanic and unmarried White teens the slope is significantly higher than that expected for the uncorrelated random noise, δ > 0.60, indicating that the relative data show some anomalous non-periodic persistent patterns that the simple regression model represented by Eq. (1) is not able to capture. Figure 3B shows that the main difference between married and unmarried teens is in the White group and indicates that births to unmarried White teens during the period 1994-2000 were subject to some anomalous change. Finally, Figure 3 shows differences among the racial/ethnic groups about the weekly cycle. The likelihood of a weekday birth is greatest for Hispanics and for Whites and slightly greater for unmarried than for married teens. African Americans, instead, do not show the weekday preference, a fact that may increase their odds of a neonatal death because it means that African American young teens, for a variety of reasons, deliver their babies on emergencies.

IV. CONCLUSIONS
The non-stationarity of a time series is due to the presence of patterns that need to be identified for a full understanding of a phenomenon. The simplicity of regression models that make use of linear trends and evident periodic cycles may capture only basic patterns of a complex system. This fact requires the adoption of methods of analysis having the capacity of establishing whether all relevant information is captured by a given simple model or whether the model should be implemented with more complex patterns that need to be identified for a better understanding of a phenomenon. The multiresolution diffusion entropy analysis, that herein we have proposed, has the purpose to address the above problem by evaluating the amount of memory or stochastic information left in a time series after the systematic removal of the memory contribution associated to the already identified patterns.
For a didactical purpose we have applied our method to the analysis of the number of births to teenagers in Texas from 1994-2000 for different groups. Table I  Perhaps, the implementation of Welfare Reform in Texas in the mid 1990's was responsible for the long-range changes causing the superdiffusive behavior with δ = 60 that is seen in the detrended time series of the unmarried White teen group, but not in the married White one. This type of reform was specifically developed to decrease non-marital child bearing and our analysis suggests that it was particular effective for the unmarried White teenagers. Figure 3 shows that both Hispanic and African American teenagers do not present such a disparity between married and unmarried teens. Therefore, perhaps the Welfare Reform in Texas was less effective for these racial/ethnic groups. However, while the data regarding the African American group looks random after the removal of the memory associated with the regression model, the Hispanic group shows some anomalous residual memory (δ = 0.62 for unmarried and δ = 0.65 for married). Perhaps, because this behavior regards both married and unmarried Hispanic groups, this residual memory is a manifestation of an anomalous change of culture and/or, as it may appear more plausible, of the Hispanic teenager population due to immigration from 1994 to 2000 and of how this group interacts with the social state welfare policies. --