Abstract
The fdaconcur R package provides a comprehensive suite of tools for concurrent and history index regression models within the Functional Data Analysis (FDA) framework. Designed to handle both densely and sparsely observed functional data, the package allows for the estimation of time-varying coefficient functions and the construction of pointwise confidence bands. By incorporating lagged effects and smooth history index functions, fdaconcur offers a powerful approach for analyzing complex temporal dependencies, such as those found in epidemiological or physiological datasets.
Introduction
Functional Data Analysis (FDA) treats observations as continuous trajectories rather than discrete, independent points. This perspective is essential in fields like epidemiology, where infection rates evolve over time, or medicine, where continuous monitoring devices generate functional streams of data. A significant challenge in FDA is modeling the relationship between a functional response and one or more functional predictors.
While standard concurrent regression assumes the response at time $t$ depends only on the predictor at the same time $t$, real-world phenomena often exhibit delays or cumulative historical influences. For instance, a policy change today might affect infection rates two weeks from now. The fdaconcur package addresses these complexities by providing a unified framework for concurrent regression with lags and history index models that can handle both dense and sparse data.
Methods and Implementation
The core of fdaconcur lies in its ability to estimate varying coefficient models. For concurrent regression, the model is defined as:
$$E[Y(t)|X(t)] = \beta_0(t) + \sum_{j=1}^p \beta_j(t)X_j(t)$$
The package extends this by allowing for predictor-specific lags, enabling researchers to model delayed effects. For more complex temporal dependencies, the package implements History Index Models. These models assume that the response at time $t$ is influenced by the history of a predictor over a preceding window $[t-\Delta, t]$. This influence is captured by a smooth history index function $\alpha(t, s)$, representing a surface that describes how the predictor's impact varies with both the current time and the time elapsed since the observation.
Handling sparse and irregularly sampled data is a primary feature. Instead of relying on potentially biased pre-smoothing of individual curves, fdaconcur utilizes the Principal Analysis by Conditional Expectation (PACE) method. This approach estimates the underlying covariance structures from pooled data, ensuring robust results even when observations are infrequent. The package utilizes 2D smoothing and local linear regression (via the fdapace package) to ensure the resulting coefficient functions are biologically or physically plausible.
Key Insights
- History as a Surface: The transition from point-lags to history index surfaces allows for a more nuanced understanding of temporal dynamics. Researchers can visualize whether a predictor's influence grows, decays, or fluctuates over time.
- Robustness to Sparsity: By leveraging PACE,
fdaconcurmaintains statistical integrity in the face of missing or irregularly timed data, which is common in longitudinal studies. - Unified Interface: The package provides a consistent syntax for both simple concurrent models and sophisticated historical models, facilitating hypothesis testing across different temporal structures.
Results and Outputs
The package's high-level functions return comprehensive objects containing the estimated time-varying intercept $\beta_0(t)$, the slope functions $\beta_j(t)$, and, where applicable, the history index surfaces. Additionally, it provides a time-varying $R^2(t)$ metric, which identifies periods where the model's predictive power is strongest.
Uncertainty is quantified through bootstrap-based methods, which generate pointwise confidence bands for the estimated coefficient functions. Simulation studies included in the package documentation demonstrate that these methods accurately capture the underlying "true" functions within the calculated intervals.
Conclusion and Limitations
fdaconcur is a valuable addition to the FDA ecosystem, particularly for researchers dealing with longitudinal data where timing and history are critical. However, users should be aware of computational stability issues when combining extremely sparse data with measurement error corrections. While the package excels at functional-to-functional regression, other specialized tools may be more appropriate for functional-to-scalar tasks. Future developments may further expand the package's capabilities into non-linear or multi-level functional modeling.
Summary updated