Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2016 Oct 30.
Published in final edited form as: Stat Med. 2015 Jul 7;34(24):3223–3234. doi: 10.1002/sim.6579

Modeling diurnal hormone profiles by hierarchical state space models

Ziyue Liu a,*, Wensheng Guo b
PMCID: PMC4592415  NIHMSID: NIHMS707691  PMID: 26152819

Abstract

Adrenocorticotropic hormone (ACTH) diurnal patterns contain both smooth circadian rhythms and pulsatile activities. How to evaluate and compare them between different groups is a challenging statistical task. In particular, we are interested in testing 1) whether the smooth ACTH circadian rhythms in chronic fatigue syndrome and fibromyalgia patients differ from those in healthy controls, and 2) whether the patterns of pulsatile activities are different. In this paper, a hierarchical state space model is proposed to extract these signals from noisy observations. The smooth circadian rhythms shared by a group of subjects are modeled by periodic smoothing splines. The subject level pulsatile activities are modeled by autoregressive processes. A functional random effect is adopted at the pair level to account for the matched pair design. Parameters are estimated by maximizing the marginal likelihood. Signals are extracted as posterior means. Computationally efficient Kalman filter algorithms are adopted for implementation. Application of the proposed model reveals that the smooth circadian rhythms are similar in the two groups but the pulsatile activities in patients are weaker than those in the healthy controls.

Keywords: Hierarchical Models, Hormone Profiles, Longitudinal Data, Signal Extraction, State Space Models

1. Introduction

Chronic fatigue syndrome (CFS) is a complicated disorder characterized by persistent and unexplained fatigue with a prevalence around 0.5% to 2.5% [1]. Fibromyalgia (FM) is a disorder characterized by chronic pains with a prevalence of 2% [2]. CFS and FM share many demographic and clinical characteristics. Thus, a similar neuroendocrine dysfunction is generally hypothesized as the common etiological pathway. Among various hypotheses, the dysfunction of the hypothalamic-pituitary-adrenal (HPA) axis is the most popular one [3, 4]. The HPA axis is the major endocrine system in managing stress through its end product cortisol. Cortisol is secreted from the adrenal glands and is regulated by the adrenocorticotropic hormone (ACTH). ACTH is produced by the pituitary gland under the control of the hypothalamus. ACTH exhibits a diurnal pattern which has both a smooth circadian rhythm and short term variations. The smooth circadian rhythm is synchronized to the light-dark cycle and varies smoothly over a 24-hour period. The short term variations around the smooth circadian rhythm are caused by pulsatile activities as responses to external and internal stimuli. Both the smooth circadian rhythms and the pulsatile activities are important components in studying the HPA axis and have been a great interest to many researchers. Parker et al [5] and Papadopoulos and Cleare [6] reviewed studies on the HPA axis in CFS and FM. Among the more than 150 studies published during years 1966–2010, a few reported lowered ACTH morning peak in CFS. However, no significant changes have been generally confirmed. Potential reasons for the negative findings are twofold. First, existing statistical methods cannot adequately model both smooth circadian rhythms and pulsatile activities simultaneously for multiple subjects. Second, most studies only had cross-sectional ACTH measurements, which do not have enough information for evaluating two components.

In the statistical literature, many methods have been developed for the smooth circadian rhythms and the pulsatile activities. Smooth hormone circadian rhythms have been modeled by cosine functions [7], periodic smoothing splines [8], shape-invariant mixed effects models [9], and periodic functional mixed effects models [10]. In these approaches, the pulsatile activities are treated as random noises and the biological information contained in the pulsatile activities is not of interest. For pulse identification and estimation, methods originated from compartment models outperform criterion based methods [11]. Compartment models have long been used in studying ACTH [12, 13, 14]. The one-compartment model is generally adopted, which reduces to an autoregressive process of order 1 (AR(1)) for equally spaced samples. These pulse identification methods require a constant basal hormone level and thus are inapplicable to ACTH because of its smooth circadian rhythm. Modeling the pulses but ignoring the smooth circadian rhythms will lead to unreasonable estimates [15]. Several methods for simultaneous modeling of the smooth circadian rhythms and the pulsatile activities have been developed for a single subject [16, 17, 18]. Inference on multiple subjects can be performed in a second stage analysis, whose validness depends on correctly incorporating the first stage variations. Liu et al [19] modeled ACTH and cortisol jointly for multiple subjects and included both smooth circadian rhythms and pulsatile activities. Their method focused rather on the cross-relationships between ACTH and cortisol but not on the univariate behaviors of ACTH. Additionally, they did not considered how to handle matched-pairs design.

Our specific motivation comes from a study reported by Crofford et al [20]. Figure 1 displays the 24-hour ACTH profiles of 36 patients and 36 healthy controls obtained from the study. The study was conducted at the University of Michigan Medical Center. Among the patients, 14 were diagnosed with CFS only, another 10 with FM only, and the remaining 12 with both CFS and FM. Patients were recruited from outpatient clinics. They were 18–65 years old, mostly female (32 of 36 subjects), non-smoking, and non-obese. Healthy controls from local communities were one-to-one matched on age, gender, and menstrual cycle, if applicable. All subjects were admitted on the evening before the blood sample collection, were provided standard meals at regular times, and were at rest. Blood samples were collected at 10-minute intervals over a 24-hour period beginning at 9am, which generated 145 equally spaced data points for each subject. Crofford et al used two-stage approaches in analysing ACTH dynamics [20]. Smooth circadian rhythms and pulsatile activities were first extracted from each subjects and then compared in second-stage analyses. They did not find any difference in ACTH pulsatile activities nor mean levels between patients and controls. This motivates us to develop a method that can model both components and multiple subjects in a unified framework. In particular, we are interested in decomposing ACTH profiles into smooth circadian rhythms and short term variations caused by pulsatile activities, where the latter will be referred to as pulsatile activities hereafter for the simplicity of presentations. This decomposition is biologically meaningful. For example, the short term effect of ACTH on the adrenal glands is in minutes and depends on rapid ACTH concentration changes, while the long term effect is in hours and depends on the average ACTH levels [21, 22].

Figure 1.

Figure 1

Raw ACTH data. Each cell displays a matched pair. For each pair, the solid gray line is for a patient and the dotted black line is for a control. For each subject, there are 145 equally spaced observations at 10-minute intervals.

In this paper, we propose a hierarchical state space approach with three hierarchical levels. For the smooth circadian rhythms, we aim to evaluate and compare the group level mean processes. The rationale for the common trends is that all subjects were synchronized to a similar environment because of the study design. We adopt a state space representation of cubic smoothing splines at the group level. Consequently, the smooth circadian rhythm estimate is a cubic smoothing spline. It is extracted as the posterior mean conditional on all the subjects from the same group. Numeric constraints are used to enforce periodicity [23]. For the pulsatile activities, different subjects’ short term variations do not align to the same time frame; therefore, the mean processes are not meaningful. Instead, the parameters characterizing the pulses are biologically important [24]. We adopt a state space representation of AR(1) process at the subject level. The extracted pulsatile activities as the posterior means are subject specific and are mainly determined by that subject. The AR(1) parameters are used to compare the pulsatile activities between the two groups. The third hierarchical level comes from the matched design, which makes the two groups balanced with respect to the matching covariates. To account for the matching effect, we adopt a random smoothing spline as the functional random effect at the pair level [25]. This approach allows the matching effect to vary over time. Overall, two types of signals at three hierarchical levels are unified into a single state space model. Consequently, standard estimation and inference methods for state space models can be adopted. Parameters are estimated by maximizing the marginal likelihood. Kalman filter is adopted for efficient computations.

The model for ACTH is defined in Section 2. Estimation and inference are presented in Section 3. Analysis results and interpretations are presented in Section 4. Potential extensions are in Section 5. Concluding remarks and discussions are in Section 6.

2. The model

Let yki(tj) denote the observed ACTH value, where k = p stands for the patient group, k = c for the control group, and i = 1, ⋯, 36 for the 36 matched pairs. Jointly, k and i denote a particular subject. Time tj = (0, ⋯, 144)/144 is scaled to [0, 1] for the computation of smoothing splines. The model is

yki(tj)=βk(tj)+ai(tj)+bki(tj)+ekij. (1)

This model decomposes yki(tj) into a measurement error and a signal. The signal is the summation of a group level smooth circadian rhythm βk(tj), a pair level functional random effect ai(tj), and a subject level pulsatile component bki(tj). Errors are identically and independently distributed as ekij~N(0,σe2).

The smooth circadian rhythm βk(t) captures the smooth trend shared by a group of subjects, where t is the collection of all tj’s. Consequently, βp(t) is a common component among all the patients and will be estimated using all ypi(t)’s for i = 1, ⋯, 36. Similarly, βc(t) is for the controls. We model βk(t) by the state space representation of periodic cubic smoothing splines. For a cubic smoothing spline [26], the state vector is ϕk(tj) = {βk(tj) β̇k(tj)}, where β̇k(tj) is the first derivative with respect to time. The state transition equation is

ϕk(tj)=Hϕk(tj1)+ηk(tj),

where H is the state transition matrix and ηk(tj)~N(0,λϕk1Σ) is the stochastic innovation with

H=(1Δt01),Σ=(13(Δt)312(Δt)212(Δt)2Δt),Δt=tjtj1,

and λϕk1 is the smoothing parameter. Unequally spaced data can be handled by replacing Δt with Δtj = tjtj−1. Diffuse initialization is adopted as ϕk(0) ~ N(0, κI2) with κ → ∞ and I2 is the 2 × 2 identity matrix. Numerical tricks are used to enforce βk(1) = βk(0) and β̇k(1) = β̇k(0) [23]. The basic idea is to augment the state vector with {βk(0) β̇k(0)} and enforce βk(1) = βk(0) and β̇k(1) = β̇k(0).

The pair level functional random effect ai(tj) captures the matching effect. This effect is specific to the ith pair and thus will mainly be determined by ypi(t) and yci(t). By modeling it as a function, the similarity between a pair of matched subjects is allowed to change over time. This component is to account for the correct amount of variations and thus is a nuisance component. We model it by the state space representation of cubic smoothing splines similar to βk(tj).

The state vector is defined as ψi(tj) = {ai(tj) ȧi(tj)}. The state transition equation is ψi(tj) = Hψi(tj−1) + ηi(tj). The stochastic innovation is ηi(tj)~N(0,λψ1Σ), where λψ1 is the smoothing parameter. The initialization is proper as ψi(0) ~ N(0, block diagonal{σ12,σ22}).

The pulsatile activities bki(tj) are specific to the kith subject. They represent the short term reactions to challenges. Their actual values will be mainly determined by the kith subject. On the other hand, their parameters characterize the strength of the pulsatile activities and can be used for comparisons between the two groups. We model bki(tj) by an AR(1) process with the following state transition equation

bki(tj)=ρkbki(tj1)+ξki(tj),ξki(tj)~N(0,σξk2).

The AR(1) coefficient ρk indicates how fast the pulsatile activities return to the smooth circadian rhythms. The strength of the pulsatile activities is indicated by the innovation variance σξk2. A bigger innovation variance suggests potentially larger pulses. The initialization is bki(0)~N(0,σξk2/(1ρk2)) under the stationary assumption. Overall, the model has ten parameters θ=(λϕp,λϕc,λψ,σ12,σ22,ρp,ρc,σξp2,σξc2,σe2).

3. Estimation and inference

The proposed model can be formulated into a single multivariate series with a large state vector. Consequently, existing techniques for state space models can be adopted. From the signal extraction point of view, these state space models are the prior distributions. Parameters are estimated by maximizing the marginal likelihood. Because of the diffuse component ϕk(0), maximizing the marginal likelihood is equivalent to the restricted maximum likelihood (REML) [27]. This approach can also be viewed as empirical Bayesian because the parameters are estimated from the data. The three signal components and the overall fittings are estimated by their posterior means. These posterior means are equivalent to the best linear unbiased predictions (BLUPs) [28, 29]. From the posterior means and their variances, confidence intervals can be constructed. These confidence intervals can be used to compare the group level smooth circadian rhythms. A formal test can be performed using bootstrap as described in the appendix. Comparisons of the pulsatile activities between the patient group and the control group are performed by testing whether ρp = ρc and σξc2=σξp2. These tests can be carried out simultaneously or separately using either Wald tests or likelihood ratio tests.

Kalman filtering algorithms are adopted for efficient computations [30]. These algorithms have two steps: the forward filtering step and the backward smoothing step. In the forward filtering step, the means and the variances of the state vectors are updated sequentially by incorporating the observed data along the time points. At each time point, the updating is carried out one subject at a time. Consequently, the filtered means and variances are conditional on the information up to the current time point and the current subject. The marginal likelihood is also calculated in the filtering step. In the backward smoothing step, the information beyond the current time point and the current subject is combined with the filtered items to produce posterior means and variances that are conditional on all the data points. Under this framework, predictions into the future domain can also be straightforwardly implemented. Brief element-wise algorithms are given in the appendix.

Existing software, such as Proc SSM in the SAS/ETS software (SAS Institute Inc., Cary, NC, USA), can be used for a general hierarchical state space model without shape constraints. To numerically enforce the periodicity of the group level smooth circadian rhythms, we chose to program our own code using Matlab (The Mathworks Inc., Natick, MA, USA). Function fminunc was adopted to maximize the marginal likelihood. Fminunc is an unconstrained multivariate optimization routine, which can approximate the Hessian matrix by finite difference without the need to provide derivative values. Fminunc searches the real line for optimal parameter values, therefore some parameters need to be transformed so that their ranges are (−∞, ∞). We adopt logarithmic transformation for smoothing parameters and variances and logit transformation for the AR(1) coefficients.

4. Results

4.1. AR(1) Parameter estimates

The REML estimate of the error variance with its asymptotic standard errors (ASE) was σ^e2=0.2190(0.0796). ASEs were calculated using the Hessian matrix and delta method. The REML estimates of the AR(1) coefficients (ASEs) were 0.7968 (0.0393) for the patient group and 0.9264 (0.0601) for the control group. Wald test was adopted to test whether ρp = ρc and the p-value was < 0.0001. This suggests that ACTH in the patients was eliminated faster than in the healthy controls. The REML estimates of the innovation variances and their ASEs were 1.1825 (0.0309) for the patient group and 1.8069 (0.0429) for the control group. Wald p-value for whether σξp2=σξc2 was also < 0.0001. This suggests that the pulsatile ACTH activities in the patients had smaller magnitudes compared to the healthy controls. In testing whether ρp = ρc and σξp2=σξc2 simultaneously, both Wald test and likelihood ratio test led to p-value < 0.0001. Therefore, the pulsatile ACTH activities were significantly weaker in the patients than in the controls.

4.2. Posterior means

Figure 2 displays the extracted smooth circadian rhythms with 95% point-wise confidence intervals, which were calculated using the posterior means and variances and were Wahba’s Bayesian confidence intervals [31]. The effective degrees of freedom for the two curves in combination are 116.86 [32]. For both groups, the ACTH smooth circadian rhythms reached their peaks in the early morning (6am–9am). This corresponds to waking and getting ready for daily activities. Then, they decreased and reached their lowest levels around 9pm. This corresponds to finishing daily activities and getting ready for a night of rest. Although that the patient group appeared to have a lower early morning peak, majority parts of the confidence intervals overlapped with each other. The bootstrapped p-value based on the likelihood ratio statistic described in the appendix was 0.26, which was also nonsignificant. Therefore, we conclude that the two group level smooth circadian rhythms were not significantly different.

Figure 2.

Figure 2

Estimated smooth circadian rhythms with 95% point-wise confidence intervals. Solid lines are for the patient group and dashed lines for the control group. To demonstrate the cyclic patterns, the same estimated values are repeated for another 24-hour.

Figure 3 displays the observed data and the fitting results for one matched pair. The 95% confidence intervals were calculated using the posterior means and variances. Overall, the fittings were reasonably well. The group level trends were captured by the smooth circadian rhythms. The short term variations were captured by the AR(1) components. The pair level functional random effect had a slight deviation from a straight line. Fittings for other subjects are similar hence not displayed.

Figure 3.

Figure 3

Fitting results for the 19th pair. The left panel is for the patient and the right for the control. From the top to the bottom, the four rows are for the raw data and the overall fittings, the estimated group level smooth circadian rhythms, the estimated subject level pulsatile activities, and the pair level random effect, respectively. The 95% confidence intervals are also displayed. The raw data are displayed as black circles.

4.3. Subgroup analysis

In general, hormone data from CFS and FM patients are analyzed together because of their similarities. Nonetheless, it would be interesting to examine the subgroup ACTH diurnal patterns. Since the AR(1) parameters were significantly different between patients and controls but the smooth circadian rhythms were not, we performed subgroup analysis on the AR(1) parameters. The three subgroups did have significantly different AR(1) parameters with a p-value < 0.0001. The REML estimates of the AR(1) coefficients (ASEs) were 0.7781 (0.0549) for the CFS group, 0.7677 (0.0627) for the FM group and 0.8148 (0.0668) for the both group, which were all significantly smaller than the control with p-values < 0.0001. The REML estimates of the innovation variances (ASEs) were 0.9721 (0.0332) for the CFS group and 1.0388 (0.0382) for the both group, which were significantly smaller than the control group with p-values < 0.0001. On the other hand, the REML estimate of the innovation variance (ASE) for the FM group was 1.9295 (0.0651), which was not significantly different from the control group with a p-value 0.6476. This suggests that for the FM patients the abnormality of the pulsatile activities might not be in the magnitudes but in the elimination. However, these results should not be over-interpreted because of the small sample sizes for the subgroups.

5. Potential extensions

The model defined in Equations (1) can be generalized as follows

yi=Xiβ(ti)+Ziαi(ti)+ei. (2)

In this general setting, the population average effect β(ti) is the characteristics shared by a group of subjects. It can have both deterministic and stochastic components. Besides smoothing splines and AR(1), many other models can be represented in state space forms and be utilized for either the population averages or the subject specific deviations. Some examples are: classical time-invariant fixed and random effects [28], autoregressive moving average models (ARMA) [33], structural time series models [34], multiple processes dynamic linear models [35], and differential equation based smoothing [23]. By restricting the state space forms to a particular class, this extension can include many popular models as special cases. For example, if time-invariant effects are solely used, then the model simplifies to linear mixed effects models. If smoothing splines are solely used, then the model simplifies to functional mixed effects models. If both smoothing splines and time-invariant effects are used, then the model simplifies to semiparametric mixed effects models. A detailed description of the general model, its vector form, and filtering and smoothing algorithms are given in the appendix.

Complex designs can be incorporated. For example, multiple 24-hour hormone series nested within each subject can be handled by adding another layer of hierarchy. The resultant model would have group averages, subject averages, and subject-day specific deviations. Crossed factor such as treatment can be incorporated and covariates can be included. They can take one of the above-mentioned state space forms. We have used time-invariant system matrices, which can be relaxed to incorporate model structure changes along time. For example, we can allow ACTH pulsatile activities to behave differently at day and at night. Estimation and inference would follow the same procedures.

6. Discussion

By applying the proposed method, we were able to show that ACTH pulsatile activities were significantly different between the patients and the controls. The weakened ACTH pulsatile activities in the patient group can be either the results of reduced primary central activities or the results of negative feedback from elevated cortisol activities. Thus, we applied the proposed model to cortisol profiles from the same subjects. The results show that the patient group had similar AR(1) coefficient (ρ̂p = 0.8215 versus ρ̂c = 0.8380) but larger innovation variance (σ^ξp2=4.2170versusσ^ξc2=3.4353) compared to the control group. This suggests that the patient group may have slightly stronger cortisol pulsatile activities, which in turn suppressed ACTH pulsatile activities a little more. Interestingly, cortisol deficiency has been the most common hypothesis for CFS and FM. A possible explanation for this seeming disagreement is glucocorticoid receptor resistance caused by chronic stress [36]. CFS and FM may have only relative cortisol deficiency. The central regulation system fails to adapt appropriately. ACTH pulsatile activities even decline further. The combination of cortisol resistance and the lack of corresponding adjustments from the central regulations may provide a new hypothesis for the HPA dysfunctions in CFS and FM.

Our proposed model is novel compared to the conventional utilizations of state space methods in multiple-subject situations. Duncan and Horn [37] formulated the subject specific effects in state space forms. Jones [38] used state space forms to handle serially correlated errors. Gamerman and Migon [39] and Bakker and Heskes [40] adopted state space forms for Bayesian hierarchical models. Same design matrices were used for all levels. Liu et al [41] extended state space methods by modeling the system matrices using linear mixed effects. Our proposed model is different in two aspects. We use state space models to specify the effects on all the hierarchy levels. Our proposed model also allows the design matrices, if needed, to be flexibly formulated based on experimental designs and covariates. The proposed model can also be viewed as an extension of varying coefficient models and functional mixed effects models [42, 25]. Varying coefficient models allow fixed effects to be smooth functions of other covariates, and functional mixed effects models allow both fixed and random effects to be smooth functions. The proposed model allows both fixed and random effects to be state space representations of many other forms in addition to smooth functions, such as ARMA models and structural time series models [33]. In spite of the complex model structure, the computation is manageable. For the ACTH data, it takes about 60 minutes to maximize the marginal likelihood on a personal computer with 3.00 GHz Intel i7 central processing unit (CPU) and 8.00 GB random access memory (RAM).

The proposed model was motivated by the ACTH diurnal patterns. However, it can be adopted to model various types of complex longitudinal profiles besides hormone profiles. We have focused on linear normal state space models. If the normal assumptions do not hold but the first two moments are correctly specified, then the extracted signals are still minimum mean square linear estimators [43]. On the other hand, the proposed models can be straightforwardly extended to nonlinear and non-normal situations by adopting simulation-based algorithms such as particle filter [44]. We have assumed the random errors as independent. How to incorporate correlated errors without introducing competition of signals between the correlated errors and the pulsatile activities remains unknown. We have decomposed ACTH profiles into smooth circadian rhythms and short term variations. If the overall ACTH levels are the main interest, wavelet-based functional mixed effects models can be adopted because of their abilities of handling spiky signals [45]. For numerical optimization, we rely on Matlab function fminunc to approximate the first and second derivatives by finite difference. Conceptually, this can be improved by providing the derivatives in state space form. Score vector and information matrix can be calculated for a single time series [46, 47]. How to extend them to the hierarchical modeling framework would be interesting research topics.

Appendix A

The general model

A general hierarchical state space model takes the following form

yij=Xijβ(tij)+Zijαi(tij)+eij, (3)
(β(tij)αi(tij))=(Fβ(tij)00Fα(tij))(ϕ(tij)ψi(tij)), (4)
(ϕ(tij)ψi(tij))=(Tϕ(tij)00Tψ(tij))(ϕ(ti,j1)ψi(ti,j1))+(Rϕ(tij)00Rψ(tij))(ηϕ(tij)ηψi(tij)). (5)

For the ith subject at jth time point, Equation (3) defines how the effects β(tij) and αi(tij) are observed with error eij. Design matrices Xi(tij) and Zi(tij) are formulated based on experimental designs and covariates. Complex designs can be incorporated, such as nested and crossed designs. Covariates can be included with their effects on different levels of hierarchy. Equation (4) is the state space observational equation. It transforms latent state vectors ϕ(tij) and ψi(tij) into effect β(tij) and αi(tij). Equation (5) is the state transition equations. It defines the system evolution by the transition matrices Tϕ(tij) and Tψ(tij), and the stochastic innovations Rϕ(tijϕ(tij) and Rψ(tijψi(tij). The stochastic innovations are serially independent Gaussian random vectors distributed as

(ηϕ(tij)ηψi(tij))~N((μϕ(tij)μψ(tij)),(Qϕ(tij)00Qψ(tij))),

and ηψi(tij) are independent across subjects. The system is initialized as

(ϕ(0)ψi(0))~N((μϕ0μψ0),(Pϕ000Pψ0)).

The distribution of ψi(0) is proper, ψi(0) are independent across subjects, and ϕ(0) can have diffuse components.

The vector form

By collecting the items across all m subjects at the same time points, the vector form is

yj=Fjγj+ej, (6)
γj=Hjγj1+Rjηj, (7)

where j = 1, ⋯, n for n distinct time points, and

yj=(y1jymj),γj=(ϕ(tj)ψ1(tj)ψm(tj)),ej=(e1jemj),ηj=(ηϕ(tj)ηψ1(tj)ηψm(tj)),
Fj=(X1jFβ(tj)Z1jFα(tj)00X2jFβ(tj)0Z2jFα(tj)0XmjFβ(tj)00ZmjFα(tj)),
Hj=Block diagonal{Tϕ(tj),Tψ(tj),,Tψ(tj)},
Rj=Block diagonal{Rϕ(tj),Rψ(tj),,Rψ(tj)},

ej and ηj are serially and mutually independently distributed as

ej~N(0,σe2I),ηj~N(μηj,Qj),
μηj=[{μϕ(tj)}{μψ(tj)}{μψ(tj)}],
Qj=block diagonal{Qϕ(tj),Qψ(tj),,Qψ(tj)}.

The initial state vector is distributed as

γ(0)=[{ϕ(0)}{ψ1(0)}{ψm(0)}]~N(μγ0,P0),
μγ0=[{μϕ0}{μψ0}{μψ0}],
P0=block diagonal{Pϕ0,Pψ0,,Pψ0}.

Let Yij = (y11, ⋯, ym1, y12, ⋯, yi−1, j, yij) and Y be the collection of all observations, γij be the state vector γj indexed by the ith subject, the univariate version state space model of (6) and (7) is

yij=Fj(i,:)γij+eij,j=1,,n,
γ1j=Hjγm+1,j1+Rjηj,
γij=γi1,j,i=2,,m+1,

where Fj(i, :) denotes the ith row of Fj.

Forward filtering algorithm

Denote aij = E(γij|Yi−1, j) and Pi j = Var(γij|Yi−1, j), the forward filtering algorithm is

  1. At time 0, let am+1,0 = µγ 0 and Pm+1,0 = P0.

  2. Let l(θ|Y) = 0.

  3. For j = 1, ⋯, n:
    1. a1j = Hjam+1, j−1 + µηj
    2. P1j=HjPm+1,j1Hj+RjQjRj
    3. For i = 1, ⋯, m:
      • (i)
        εij = yijFj(i, :)aij
      • (ii)
        υij=Fj(i,:)PijFj(i,:)+σe2
      • (iii)
        l(θ|Y)=l(θ|Y)12log(2π)12log(υij)12εij2υij1
      • (iii)
        Lij=IPijFj(i,:)Fj(i,:)υij1
      • (iv)
        ai+1,j=aij+PijFj(i,:)υij1εij
      • (v)
        Pi+1,j=PijLij
  4. l(θ|Y) is the log-likelihood.

Backward algorithm

Denote γ̂j = E(γj|Y) and Vj = Var(γj|Y), the backward recursion is

  1. Let r0,n+1 = 0, N0,n+1 = 0, and Hn+1 = Hn.

  2. For j = n, ⋯, 1:
    1. rm,j=Hj+1r0,j+1
    2. Nm,j=Hj+1N0,j+1Hj+1
    3. For i = m, ⋯, 1:
      1. ri1,j=Fj(i,:)υij1εij+Lijrij
      2. Ni1,j=Fj(i,:)υij1Fj(i,:)+LijNijLij
    4. γ̂j = a1j + P1jr0j
    5. Vj = P1jP1jN0jP1j

The exact diffuse algorithms are different for only the first several observations but the formula are too long to display here.

Appendix B

To compare the two group-level smooth circadian rhythms, we rewrite them as

βc(t)=f1(t),βp(t)=f1(t)+f2(t),

where f1(t) and f2(t) are modeled as periodic cubic smoothing splines as well. Testing if βc(t) = βp(t) is equivalent to testing if f2(t) = 0. This formulation has the covariance structure of the reduced model being nested in that of the full model, which ensures a non-negative log-likelihood ratio statistic. The null distribution of this statistic is difficult to derive. Instead, bootstrap is adopted to approximate the null distributions. Both the full model and the reduced model will be fitted. The difference of minus two maximized marginal log-likelihood (−2MML) will be recorded. The estimates from the reduced model will be used to generate random samples. For group k = p, c, subject i = 1, ⋯, 36, and tj = (0, ⋯, 144)/144, a random sample will be generated as follows.

  1. Shared smooth circadian rhythm is generated from f1(t) ~ N(1(t), cõv{1(t)}), where cõv{1(t)} is adopted to account for the uncertainty in 1(t).

  2. Pair-specific random functions are generated from ai(t) ~ N(0, cõv{ãi(t)}).

  3. Subject-specific pulsatile activities are generated from AR(1) processes with parameters (ρ˜p,σ˜ψp2)and(ρ˜c,σ˜ψc2).

  4. Independent and identically distributed error terms are generated from ekij~N(0,σ˜e2)

  5. The simulated data are a summation of the above components.

For each random sample, both the full model and the reduced model will be fitted. We repeat this for 1000 times and the 1000 differences of −2MML will be used as the null distribution.

References

  • 1.Reeves WC, Jones JF, Maloney E, Heim C, Hoaglin DC, Boneva RS, Morrissey M, Devlin R. Prevalence of chronic fatigue syndrome in metropolitan, urban and rural Georgia. Population Health Metrics. 2007;5:5. doi: 10.1186/1478-7954-5-5. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 2.Arnold LM. The pathophysiology, diagnosis and treatment of fibromyalgia. Psychiatric Clinics of North America. 2010;33:375–408. doi: 10.1016/j.psc.2010.01.001. [DOI] [PubMed] [Google Scholar]
  • 3.Buskila D. Neuroendocrine mechanisms in fibromyalgia-chronic fatigue. Best Practice & Research Clinical Rheumatology. 2001;15:747–758. doi: 10.1053/berh.2001.0191. [DOI] [PubMed] [Google Scholar]
  • 4.Cleare AJ. The HPA axis and the genesis of chronic fatigue syndrome. Trends in Endocrinology & Metabolism. 2004;15:55–59. doi: 10.1016/j.tem.2003.12.002. [DOI] [PubMed] [Google Scholar]
  • 5.Parker AJR, Wessely S, Cleare AJ. The neuroendocrinology of chronic fatigue syndrome and fibromyalgia. Psychological Medicine. 2001;31:1331–1345. doi: 10.1017/s0033291701004664. [DOI] [PubMed] [Google Scholar]
  • 6.Papadopoulos AS, Cleare AJ. Hypothalamic-pituitary-adrenal axis dysfunction in chronic fatigue syndrome. Nature Reviews Endocrinology. 2012;8:22–32. doi: 10.1038/nrendo.2011.153. [DOI] [PubMed] [Google Scholar]
  • 7.Veldhuis JD, Ironmanesh A, Lizarralde G, Johnson ML. Amplitude modulation of a burstlike mode of cortisol secretion subserves the circadian glucocorticoid rhythm. American Journal of Physiology Endocrinology and Metabolism. 1989;257:E6–E14. doi: 10.1152/ajpendo.1989.257.1.E6. [DOI] [PubMed] [Google Scholar]
  • 8.Wang Y, Brown M. A flexiblemodel for human circadian rhythms. Biometrics. 1996;52:588–596. [PubMed] [Google Scholar]
  • 9.Wang Y, Ke C, Brown M. Shape-invariant modeling of circadian rhythms with random effects and smoothing spline ANOVA decompositions. Biometrics. 2003;59:804–812. doi: 10.1111/j.0006-341x.2003.00094.x. [DOI] [PubMed] [Google Scholar]
  • 10.Qin L, Guo W. Functional mixed-effects model for periodic data. Biostatistics. 2006;7:225–234. doi: 10.1093/biostatistics/kxj003. [DOI] [PubMed] [Google Scholar]
  • 11.Mauger DT, Brown M, Kushler RH. A comparison of methods that characterize pusles in a time series. Statistics in Medicine. 1995;14:311–325. doi: 10.1002/sim.4780140309. [DOI] [PubMed] [Google Scholar]
  • 12.Normand M, Lalonde J. Distribution and metabolism of ACTH in the rat. Canadian Journal of Physiology and Pharmacology. 1979;57:1024–1027. doi: 10.1139/y79-153. [DOI] [PubMed] [Google Scholar]
  • 13.Cowan JS, Layberry RA. Feedback suppression of ACTH secretion by cortisol in dogs lags after large signals equal those following very small signals. Canadian Journal of Physiology and Pharmacology. 1983;61:1281–1288. doi: 10.1139/y83-185. [DOI] [PubMed] [Google Scholar]
  • 14.Carnes M, Goodman BM, Lent SJ, Vo H, Jackels R. Conincident plasma ACTH and corticosterone time series: comparisons between young and old rats. Experimental Gerontology. 1994;29:625–643. doi: 10.1016/0531-5565(94)90075-2. [DOI] [PubMed] [Google Scholar]
  • 15.Young EA, Carlson NE, Brown M. Twenty-four-hour ACTH and cortisol pulsatility in depressed women. Neuropsychopharmacology. 2001;25:267–276. doi: 10.1016/S0893-133X(00)00236-0. [DOI] [PubMed] [Google Scholar]
  • 16.Guo W, Wang Y, Brown M. A signal extraction approach to modeling hormone time series with pulses and a changing baseline. Journal of the American Statistical Association. 1999;94:746–756. [Google Scholar]
  • 17.Yang YC, Liu A, Wang Y. Detecting pulsatile hormone secretion using nonlinear mixed effects partial spline models. Biometrics. 2006;62:230–238. doi: 10.1111/j.1541-0420.2005.00403.x. [DOI] [PubMed] [Google Scholar]
  • 18.Johnson TD. Analysis of pulsatile hormone concentration profiles with nonconstant basal concentrations: a Bayesian approach. Biometrics. 2007;63:1207–1217. doi: 10.1111/j.1541-0420.2007.00809.x. [DOI] [PubMed] [Google Scholar]
  • 19.Liu Z, Cappola AR, Crofford LL, Guo W. Modeling bivariate longitudinal hormone profiels by hierarchical state space models. Journal of the American Statistical Association. 2014;109:108–118. doi: 10.1080/01621459.2013.830071. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 20.Crofford LJ, Young EA, Engleberg NC, Korszun A, Brucksch CB, McClure LA, Brown M, Demitrack MA. Basal circadian and pulsatile ACTH and cortisol secretion in patients with fibromyalgia and/or chronic fatigue syndrome. Brain, Behavior, and Immunity. 2004;18:314–325. doi: 10.1016/j.bbi.2003.12.011. [DOI] [PubMed] [Google Scholar]
  • 21.Hanukoglu I, Feuchtwanger R, Hanukoglu A. Mechanism of corticotropin and cAMP induction of mitochondrial cytochrome P450 system enzymes in adrenal cortex cells. The Journal of Biological Chemistry. 1990;265:20602–20608. doi: 10.1016/S0021-9258(17)30545-8. [DOI] [PubMed] [Google Scholar]
  • 22.Gallo-Payet N, Payet MD. Mechanism of action of ACTH: beyond cAMP. Microscopy Research and Technique. 2003;61:275–287. doi: 10.1002/jemt.10337. [DOI] [PubMed] [Google Scholar]
  • 23.Ansley CF, Kohn R, Wong CM. Nonparametric spline regression with prior information. Biometrika. 1993;80:75–88. [Google Scholar]
  • 24.Walker JJ, Terry JR, Tsaneva-Atanasova K, Armstrong SP, McArdle CA, Lightman SL. Encoding and decoding mechanisms of pulsatile hormone secretion. Journal of Neuroendocrinology. 2010;22:1226–1238. doi: 10.1111/j.1365-2826.2010.02087.x. [DOI] [PubMed] [Google Scholar]
  • 25.Guo W. Functional mixed effects models. Biometrics. 2002;58:121–128. doi: 10.1111/j.0006-341x.2002.00121.x. [DOI] [PubMed] [Google Scholar]
  • 26.Wecker WE, Ansley CF. The signal extraction approach to nonlinear regression and spline smoothing. Journal of the American Statistical Association. 1983;78:81–89. [Google Scholar]
  • 27.Harville DA. Bayesian inference for variance components using only error contrasts. Biometrika. 1974;61:383–385. [Google Scholar]
  • 28.Sallas WM, Harville DA. Best linear recursive estimation for mixed linear models. Journal of the American Statistical Association. 1981;76:860–869. [Google Scholar]
  • 29.Ansley CF, Kohn R. Estimation, filtering and smoothing in state spacemodels with incomplete specified initial conditions. The Annals of Statistics. 1985;13:1286–1316. [Google Scholar]
  • 30.Koopman SJ, Durbin J. Filtering and smoothing of state vector for diffuse state-space models. Journal of Time Series Analysis. 2003;24:85–98. [Google Scholar]
  • 31.Wahba G. Bayesian “confidence intervals” for the cross-validated smoothing splines. Journal of the Royal Statistical Society. Series B (Methodological) 1983;45:133–150. [Google Scholar]
  • 32.Wang Y. Smoothing spline models with correlated random errors. Journal of the American Statistical Association. 1998;93:341–348. [Google Scholar]
  • 33.Durbin J, Koopman SJ. Time series analysis by state space methods. second edition. Oxford University Press; 2012. [Google Scholar]
  • 34.Harvey AC, Shephard N. Structural time series models. In: Maddala GS, Rao CR, Vinod HD, editors. Handbook of Statistics. Vol. 11. Elsevier Science Publisher; 1993. [Google Scholar]
  • 35.Prado R, West M. Time series: modeling, computation, and inference. Boca Raton: Chapman & Hall/CRC; 2010. [Google Scholar]
  • 36.Cohen S, Janicki-Deverts D, Doyle WJ, Miller GE, Frank E, Rabin BS, Turner RB. Chronic stress, glucocorticoid receptor resistance, inflammation, and disease risk. Proceedings of the National Academy of Sciences of the United States of America. 2012;109:5995–5999. doi: 10.1073/pnas.1118355109. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 37.Duncan DB, Horn SD. Linear dynamic recursive estimation from the viewpoint of regression analysis. Journal of the American Statistical Association. 1972;67:815–821. [Google Scholar]
  • 38.Jones RH. Longitudinal data with serial correlation: a state space approach. CRC Press; 1993. [Google Scholar]
  • 39.Gamerman D, Migon HS. Dynamic hierarchical models. Journal of the Royal Statistical Society. Series B (Methodological) 1993;55:629–642. [Google Scholar]
  • 40.Bakker B, Heskes T. Learning and approximate inference in dynamic hierarchical models. Computational Statistics & Data Analysis. 2007;52:821–839. [Google Scholar]
  • 41.Liu D, Lu T, Niu XF, Wu H. Mixed-effects state-space models for analysis of longitudinal dynamic systems. Biometrics. 2011;67:476–485. doi: 10.1111/j.1541-0420.2010.01485.x. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 42.Hastie T, Tibshirani R. Varying-coefficient models. Journal of the Royal Statistical Society. Serie B (Methodological) 1993;55:757–796. [Google Scholar]
  • 43.Anderson BDO, Moore JB. Optimal filtering. Englewood Cliffs: Prentice-Hall; 1979. [Google Scholar]
  • 44.Gordon N, Salmond DJ, Smith AFM. A novel approach to nonlinear and non-Gaussian Bayesian state estimation. IEE Proceedings. Part F: Radar and Sonar Navigation. 1993;140:107–113. [Google Scholar]
  • 45.Morris JS, Carroll RJ. Wavelet-based functional mixed models. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 2006;68:179–199. doi: 10.1111/j.1467-9868.2006.00539.x. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 46.Koopman SJ, Shephard N. Exact score for time-series models in state-space form. Biometrika. 1992;79:823–826. [Google Scholar]
  • 47.Poyiadjis G, Doucet A, Singh S. Particle approximations of the score and observed information matrix in state space models with application to parameter estimation. Biometrika. 2011;98:65–85. [Google Scholar]

RESOURCES