  Between 2011 and 2014 NHANES collected objectively measured physical activity
data using wrist-worn accelerometers for tens of thousands of individuals for
up to seven days. Here we analyze the minute-level indicators of being active,
which can be viewed as binary (because there is an active indicator at every
minute), multilevel (because there are multiple days of data for each study
participant), functional (because within-day data can be viewed as a function
of time) data. To extract within- and between-participant directions of
variation in the data, we introduce Generalized Multilevel Functional Principal
Component Analysis (GM-FPCA), an approach based on the dimension reduction of
the linear predictor. Scores associated with specific patterns of activity are
shown to be strongly associated with time to death. Extensive simulation
studies indicate that GM-FPCA provides accurate estimation of model parameters,
is computationally stable, and is scalable in the number of study participants,
visits, and observations within visits. R code for implementing the method is
provided.
