Fast Generalized Longitudinal Functional Principal Components Analysis with Applications to Population-Level Neuronal Dynamics
Functional data are widely collected across many fields. One approach for modeling functional data collected across repeated measures is longitudinal functional PCA (LFPCA), which allows for the decomposition of variability at multiple levels. However, existing estimation approaches for LFPCA can be computationally demanding for large or high-dimensional datasets. Here, we propose fast generalized LFPCA, a novel estimation technique that bins data along the functional domain and fits a marginal mixed model at each bin. Simulation results show that the proposed method is orders of magnitude faster than existing techniques while achieving similar accuracy, making LFPCA scalable to datasets with more densely sampled observations and larger sample sizes. We apply the proposed technique to model neuronal firing rate data both on and off deep brain stimulation (DBS) to investigate how the intervention modulates population-level neuronal activity. Our results suggest that the vast majority of between-neuron variation can be explained by four principal components, which relate to individual differences in neuronal firing as well as the arm manipulation paradigm under study. We also find that DBS significantly increases the variability of firing activity, likely driven by increased firing from a subset of neurons in response to DBS, a novel insight not obtained in previous analyses. Code to implement the proposed method and run simulation studies is included in the supplement.