Luan et al

*Yuanyuan Luan or Carmen Tekwe, Bloomington IN 47405.

# Generalized functional linear regression models with a mixture of complex
functional and scalar covariates prone to measurement error

Yuanyuan Luan  Roger S. Zoh  Sneha Jadhav  Lan Xue  Carmen D. Tekwe
Department of Epidemiology and Biostatistics, School of Public Health, Indiana
University, Indiana, United States  Department of Mathematics and Statistics,
Wake Forest University, North Carolina,United States  Department of
Statistics, Oregon State University, Corvallis, OR 97331
<EMAIL_ADDRESS>or<EMAIL_ADDRESS>
(<day> <Month>, <year>; <day> <Month>, <year>; <day> <Month>, <year>)

###### Abstract

[Abstract]Current methods for correcting measurement error in covariates in
generalized linear regression models apply to scalar covariates only. No prior
method exists to correct for measurement error in a mixture of functional and
scalar covariates. We present simulation extrapolation (SIMEX) and regression
calibration (RC) approaches to correct measurement errors in a mixture of
functional and scalar covariates prone to classical measurement error in
generalized functional linear regression. We conducted extensive simulations
to assess the finite sample performance of our methods. Across a range of
conditions, the SIMEX estimator generally had low bias, similar to that of the
oracle estimator. The RC estimator performed almost as well, and notably
better than average and naive estimators that did not correct for measurement
error. We applied our methods to data from the 2011-2014 cycles of the
National Health and Examination Survey (NHANES) to assess the relationships
physical activity, total caloric intake, and demographic characteristics have
with type 2 diabetes in community-dwelling adults living in the United States.
We treated the device-based measure of physical activity as a functional
covariate prone to complex arbitrary heteroscedastic errors and total caloric
intake as a scalar covariate prone to error. Estimation with the SIMEX and RC
estimators reduced the associations for some covariates, but increased them
for others, particularly physical activity, in comparison to estimation with
the estimators that did not correct for measurement error. Our approaches to
correcting measurement error may be useful for generalized functional linear
regression in other empirical settings as well.

###### keywords:

Accelerometer, dietary intake, food frequency questionnaire, functional data,
physical activity, NHANES, regression calibration, SIMEX, wearables.

††articletype: Article Type

##  1 Introduction

Generalized linear regression is a parametric approach to modeling
associations between one or more scalar predictors and a scalar outcome under
the exponential family framework1. Researchers have applied generalized linear
regression models in various fields including biostatistics and epidemiology2,
3, 4, where the outcomes of interest may appear as count, continuous, or
binary variables. While generalized linear regression models focus on the
association between scalar covariates and outcomes, statisticians have
extended the models to include functional covariates5, 6, 7. Crainiceanu and
colleagues6 extended generalized multi-level mixed models to generalized
multi-level functional linear models by including a multilevel functional
predictor. Fan and colleagues7 used generalized functional linear regression
to investigate the association between a dichotomous disease trait with
multiple genetic variants in a genetic region. Gertheiss and colleagues8
applied the generalized functional linear regression model to assess the
association between brain magnetic resonance imaging indices and multiple
sclerosis, treating the indices along the same white matter tracts as
correlated functional variables9.

Although functional data analysis is well-developed10, 11, 12, 13, 6, 14, 15,
16, 17, methods for the analysis of functional data contaminated with
measurement error are an active area of research. In practice, researchers
observe functional data discretely and assume they reflect underlying latent
smooth functions18. Functional data analysts have assumed that functional
covariates are directly observed, are measured without error, or have error in
the form of white noise 19, 20, 21, 22, 23. Thus, researchers did not
distinguish between errors as independent random noisy fluctuations around a
smooth trajectory and classical measurement errors with complex structures24,
11, 14. To address the noisy fluctuations, researchers have smoothed the
functional covariates before including them in a model25. In many
circumstances, the true functional covariates may not be directly observable
or the measurements may be prone to measurement error26. Earlier treatments of
measurement error in functional data analysis involved assuming the errors are
discrete and uncorrelated along the smooth trajectory14, 27. For example, Yao
and colleagues14 established a functional principal components analysis (FPCA)
for addressing measurement errors in longitudinal functional data by assuming
uncorrelated measurement error covariance structures. Cardot and colleagues11
corrected for measurement error in functional data but considered the error as
white noise with a constant variance. We also developed FPCA-based methods for
reducing biases in a functional covariate prone to error for the measurement
error exposure model for the functional multiple indicators, multiple causes
measurement error models28. For these methods, we also assumed an independent
error structure. Although these prior methods correct for some types of
measurement error in functional covariates, they do not address complex
measurement error structures, such as serially observed functional data with
errors correlated within subjects and between observation periods.

Other researchers have proposed approaches to overcome these limitations.
Crainiceanu et al. 6 demonstrated that the generalized multilevel functional
linear models may be analyzed in a generalized multilevel mixed models
framework. The authors consider the models the functional analog of
measurement error models and used multilevel FPCA for the measurement error
component of the model. Chakraborty and Panaretos29 described regression
calibration-based methods for correcting measurement error that account for
serial correlations in error structures. They assumed serial correlations
exist within a small grid interval or a banded covariance structure for
measurement errors. Thus, they assumed that the correlations depended on the
distance between the observations. More recently, we presented an approach to
correcting for measurement error in functional linear regression,
demonstrating that "pre-smoothing" approaches do not correct for measurement
errors with complex serial correlation structures adequately26 . For this
method and another method30, we used functional instrumental variables
belonging in the same time space as the true covariate to identify the model
and correct for measurement error. In addition, we developed a Bayesian
approach to correcting measurement error in functional linear regression in
which we assumed a truncated Dirichlet Process mixture prior for the
measurement error and also used an instrumental variable31. However, practical
shortcomings of using an instrumental variable are the required assumption
that it belongs in the same time space as the observed functional covariate,
which may not always be feasible26, and the frequent difficulty of identifying
a good instrument. Cai32 proposed several methods for correcting measurement
error in functional covariates in scalar-on-function regression under
different assumptions about the measurement error covariance matrix. These
assumptions include constant variance, heteroscedastic subject-specific
variance, and an auto-correlated covariance structure that depends on a set of
parameters. For the constant variance and subject-specific variance
assumptions, measurement errors are not correlated across time points, a
condition that functional data prone to measurement error do not meet26.

Existing methods for correcting measurement error in functional regression
focus on measurement error in a single function-valued covariate 6, 33, 29,
31. Sometimes, however, researchers seek to assess how mixtures of error-prone
functional and scalar covariates influence either discrete or continuous
outcomes. For example, in our current work, we evaluate the relationships
physical activity and total caloric intake have with type 2 diabetes (T2D).
Wearable accelerometer-based devices are now the standard tools for monitoring
and quantifying physical activity objectively. However, these devices also
generate data prone to error 34, 35, 36. For instance, step counts recorded by
wearable devices (Nike Fuelband) can differ by up to $22\%$ from actual step
counts 34. Self-reports of dietary intake are the most common and practical
method for assessing caloric intake, especially in large surveys. However,
measurement error in such reports stemming from social desirability,
forgetting, and other factors37, 38, 39 obscures the relationship between diet
and health40, 41, 42, 43. Moreover, when the calculation of total caloric
intake is based on many separate self-reports of particular foods and
beverages consumed, the measurement errors accumulate 38.

We present a new method that involves parametric and semiparametric approaches
to correct for measurement error in functional and scalar covariates in
functional linear regression. In Section 2, we define the generalized
functional linear regression model with mixed measurement error. In Section 3,
we describe our proposed measurement error correction methods. In Section 4,
we report on the performance of our methods in extensive simulations. In
Section 5, we describe results from applying our method in the analysis of
data on physical activity, caloric intake, and T2D from the National Health
and Nutrition Examination Survey. In Section 6, we conclude with a discussion
of our method and results.

##  2 Generalized functional linear regression model with mixed measurement
error

###  2.1 The model

In the following generalized functional linear regression model with mixed
measurement error (GFLM-ME), we describe the relation between $Y\in\mathbb{R}$
and the functional variable $X_{1}(\cdot)\in L^{2}[0,1]$ and the scalar
variables $X_{2}\in\mathbb{R}$ and $\boldsymbol{Z}\in\mathbb{R}$. Suppose
$\left\\{y_{i}\right\\}^{n}_{i=1}$ is a realization of random variables
$\left\\{Y_{i}\right\\}^{n}_{i=1}\in\mathbb{R}$, which are independently
distributed from an exponential family with mean $\mu_{i}$. In the GFLM-ME,
the conditional mean response $\mu_{i}=E\\{y_{i}|X_{1i}(t),X_{2i},{\bf
Z}_{i}\\}$ for the $i$th ($i=1,\ldots,n$) subject is

$\displaystyle g(\mu_{i})$
$\displaystyle=\int_{0}^{1}\beta_{1}(t)X_{1i}(t)dt+\beta_{2}X_{2i}+\boldsymbol{\alpha}\mathbf{Z}_{i},$
(1) $\displaystyle W_{1i}(t)$ $\displaystyle=X_{1i}(t)+U_{1i}(t),\text{ and}$
(2) $\displaystyle W_{2i}$ $\displaystyle=X_{2i}+U_{2i},$ (3)

where $\beta_{1}(t)\in L^{2}[0,1]$ is an unknown functional coefficient and
$\beta_{2}$ is an unknown scalar coefficient. The $\boldsymbol{\alpha}$
represents a $1\times p$ vector of unknown scalar coefficients for the error-
free covariates and $g(\cdot)$ represents the link function that is monotone
and twice continuously differentiable with bounded derivatives 1, 44. The
outcome, $Y_{i}$, is a continuous or discrete scalar random variable, and
$X_{1i}(t),t\in[0,1]$ is a random function and assumed to be integrable on the
unit time interval $[0,1]$. Additionally, $X_{1i}(t)$ and $X_{2i}$ are not
directly measured or observed but are approximated by surrogate measures,
$W_{1i}(t)$ and $W_{2i}$, respectively. $W_{1i}(t)$ and $W_{2i}$ are prone to
measurement errors, $U_{1i}(t)$ and $U_{2i}$, respectively. The
$\boldsymbol{Z}_{i}\in\mathbb{R}^{p}$ is a $p\times 1$ vector that contains
$p$ error-free scalar covariates. The model consists of three components: a
response model for $Y_{i}$ in (1) and measurement error models for $W_{1i}(t)$
and $W_{2i}$ in (2) and (3), respectively.

###  2.2 Estimation

The presence of measurement error in regression models makes them
unidentifiable without additional data or identifying information 45, 46.
Because the true covariates $X_{1i}(t)$ and $X_{2i}$ are not observed, and the
corresponding measurement error terms in (2) and (3) are unknown, estimation
of the covariance matrices associated with the measurement errors requires
additional data. The additional data may appear as instrumental variables or
repeated measures on the surrogate data for the true covariates. The
measurement error covariance matrix can be assumed to be known if it was
previously estimated from another data set or from additional identifying or
validation data on a subset of subjects.

We use repeated measures to estimate the measurement error covariance matrix.
In this approach, the model for the $i$th subject at the $j_{1}$th
$j_{1}=(1,\cdots,J_{1})$ and $j_{2}$th $j_{2}=(1,\cdots,J_{2})$ repeated
session for $W_{1ij_{1}}(t)$ and $W_{2ij_{2}}$ in (2) and (3), respectively,
becomes

$\displaystyle W_{1ij_{1}}(t)$ $\displaystyle=X_{1i}(t)+U_{1ij}(t)\quad\quad
j_{1}=1,\ldots,J_{1},\text{ and}$ (4) $\displaystyle W_{2ij_{2}}$
$\displaystyle=X_{2i}+U_{2ij_{2}}\quad\quad j_{2}=1,\ldots,J_{2},$ (5)

where $J_{1}$ and $J_{2}$ are the number of repeated measures for $W_{i1}(t)$
and $W_{i2}$, respectively. In practice, the number of repeated measures
$J_{1}$ and $J_{2}$ can be different. For notational simplicity, we assume
$J_{1}=J_{2}=J$.

In (1), $\beta_{1}(t)$ is infinite-dimensional, which presents a challenge for
estimation. Therefore, we first approximate $\beta_{1}(t)$ by reducing its
dimension through polynomial spline basis expansion. The polynomial spline is
flexible, captures the main features of the curve, and has desirable
theoretical properties, allowing the approximation of a functional variable
with a finite number of known basis functions 47. The spline basis expansion
gives $\beta_{1}(t)\approx\sum_{k=1}^{K_{n}}\gamma_{k}b_{k}(t)$, where
$\left\\{\gamma_{k}\right\\}_{k=1}^{K_{n}}$ are unknown spline coefficients
and $\left\\{b_{k}(t)\right\\}_{k=1}^{K_{n}}$ is a set of spline basis
functions defined on the unit interval. The number of bases, $K_{n}$, is
selected based on the sample size $n$ to provide a reasonable approximation of
$\beta_{1}(t)$.

The proposed models in (1), (4), and (5) become

$\displaystyle g\left(\mu_{i}\right)$
$\displaystyle\approx\sum_{k=1}^{K_{n}}\gamma_{k}{X_{1ik}}+\beta_{2}X_{2i}+\boldsymbol{\alpha}\mathbf{Z}_{i},$
(6) $\displaystyle W_{1ijk}$ $\displaystyle=X_{1ik}+U_{1ijk}\quad\quad
k=1,\dots,K_{n},\text{ and}$ (7) $\displaystyle W_{2ij}$
$\displaystyle=X_{2i}+U_{2ij},$ (8)

where $W_{1ijk}=\int_{0}^{1}W_{1ij}(t)b_{k}(t)dt$,
$X_{1ik}=\int_{0}^{1}X_{1i}(t)b_{k}(t)dt$, and
$U_{1ijk}=\int_{0}^{1}U_{1ij}(t)b_{k}(t)dt$. The reduced model is a
generalized linear regression model in which the number of coefficients
depends on sample size.

###  2.3 Assumptions

We make the following assumptions for our methods.

  1. 1.

The observed covariate is an unbiased surrogate for the true covariate. That
is,
$E\\{W_{1ij}(t)|X_{1i}(t)\\}=X_{1i}(t),E(W_{2ij}|X_{2i})=X_{2i},i=1,\dots,n,\text{and
}j=1,\dots,J$.

  2. 2.

The true covariates and measurement errors are uncorrelated. That is,
$Cov\\{X_{1i}(t),U_{1ij}(t)\\}=0\text{ and }Cov\\{X_{2i},U_{2ij}\\}=0$, for
$t\in[0,1],i=1,\dots,n,$ and $j=1\dots,J$.

  3. 3.

The observed covariates and measurement errors are correlated, that is,
$Cov\\{W_{1ij}(t),U_{1ij}(t)\\}\neq 0,i=1,\dots,n,\text{ and }j=1,\dots,J$ for
any $t\in[0,1]$, and $Cov\\{W_{2ij},U_{2ij}\\}\neq 0,i=1,\dots,n,\text{ and
}j=1,\dots,J$.

  4. 4.

The measurement errors $U_{1ij}(t)$ and $U_{2ij}$ are uncorrelated for any
$t\in[0,1]$, $i=1,\dots,n,\text{ and }j=1,\dots,J$.

  5. 5.

The functional measurement error, $U_{1ij}(t)$, is a Gaussian process with
zero mean function and covariance function denoted as
$Cov\\{U_{1}(t),U_{1}(t^{\prime})\\}=\Sigma_{U_{1}}(t,t^{\prime})$ for $t\neq
t^{\prime}$.

  6. 6.

The measurement error for the scalar covariate follows the Gaussian
distribution, i.e.,
$U_{2ij}\overset{\text{iid}}{\sim}N({0},{\sigma}^{2}_{U_{2}}),i=1,\dots,n,\text{
and }j=1,\dots,J$.

Although assumptions 1-4 are necessary in classical additive measurement error
models 46, 48, verifying them in practice can be challenging because
measurement errors are not directly observable. However, assumptions 5 and 6
about the normality of measurement errors $U_{1ij}(t)$ and $U_{2ij}$ can be
relaxed to allow non-symmetric distributions.

##  3 Method and Estimation

###  3.1 Simulation Extrapolation

Simulation extrapolation (SIMEX), proposed by Cook and Stefanski 49, is a
method for estimating the effect of a covariate contaminated with measurement
error in regression models. While originally developed for scalar variables,
SIMEX can also be applied to functional variables 32, 50. An advantage of
SIMEX is that it does not require an assumed or known distribution of the true
covariate 46. However, it does require the variance of the measurement error
to be known or estimated from additional data 46, 49. Cook and Stefanski 49
assumed homoscedastic and known measurement error variance. We assume that the
measurement error covariance in the functional covariate follows a Gaussian
process as in assumption 5, and estimate the measurement error variance using
repeated measures of the covariates that are prone to measurement error. We
also assume that $U_{1i_{1}j_{1}}(t)$ is independent of $U_{1i_{2}j_{2}}(t)$
where $i_{1}\neq i_{2},\text{and}j_{1}\neq j_{2}$

SIMEX is easy to understand and implement, involving two main stages:
simulation and extrapolation. In the simulation stage, additional measurement
errors – pseudo errors $U^{*}$ – are generated from an assumed distribution
and added to the originally observed measures, $W$, with a positive tuning
parameter $\lambda$, resulting in new observed measures $W^{*}$ with
successively larger measurement errors, where $W^{*}=W+\lambda U^{*}$. The
$\lambda$ controls the size of the measurement error added to $W$. The
estimated regression parameters are then obtained from $W^{*}$. These
simulation steps are repeated a large number of times (e.g., 200 times),
yielding average values of the estimates for each value of $\lambda$. The
extrapolation stage involves extrapolating the average estimates from the
simulation stage to the case of no measurement error ($\lambda=-1$). The
unbiasedness of the SIMEX estimator relies heavily on the accurate estimation
of the variance of the measurement error and accurate assumption about the
distribution of the measurement error. 51.

We use the SIMEX method to estimate $\beta_{1}(t)$ and $\beta_{2}$ and
$\boldsymbol{\alpha}$ in (1) for the generalized linear functional regression
model with two covariates prone to measurement error. When the true
measurements $X_{1i}(t)$ and $X_{2i}$ are both known, the corresponding
estimated regression coefficients, $\widehat{\beta_{1}}(t)$ and
$\widehat{{\beta_{2}}}$, are respectively consistent for the parameters in
(1). Suppose $\boldsymbol{W}_{1i}(t)$ and $\boldsymbol{W}_{2i}$ are the
observed measurements for the true covariates for subject $i$ across all the
repeated sessions. Averaging the repeatedly observed $\boldsymbol{W}_{1i}(t)$
and $\boldsymbol{W}_{2i}$, across the replicates and using the resulting
$\overline{{W}}_{1i}(t)$ and $\overline{{W_{2i}}}$ as substitutes for
$X_{1i}(t)$ and $X_{2i}$, respectively, produces biased estimates of
$\beta_{1}(t)$ and $\beta_{2}$, respectively.

In our simulations and data application, we set $\lambda$ to be between 0 and
2, and express the pseudo-data as

$\displaystyle W_{1i,\lambda}(t)$
$\displaystyle=\overline{W}_{1i}(t)+\sqrt{\lambda}\overline{U}_{1i}(t),\text{
and}$ $\displaystyle W_{2i,\lambda}$
$\displaystyle=\overline{W}_{2i}+\sqrt{\lambda}\overline{U}_{2i},$

where the measurement errors, $\overline{U}_{1i}(t)$ and $\overline{U}_{2i}$,
are averaged across replicates and simulated independently of
$\\{Y_{i},\overline{W}_{1i}(t),\overline{W}_{2i},\boldsymbol{Z}_{i}\\}$ by
Monte Carlo simulation and assumed to follow Gaussian process
$\\{\boldsymbol{0},\widehat{\Sigma}_{U_{1}}(t,t^{\prime})\\}$ for $t\neq
t^{\prime}$ and $N(0,\widehat{\sigma}^{2}_{U_{2}})$, respectively. We use the
replicates to estimate $\widehat{\Sigma}_{U_{1}}(t,t^{\prime})$ and
$\widehat{\sigma}^{2}_{U_{2}}$ with

$\displaystyle\widehat{\Sigma}_{U1}(t,t^{\prime})$ $\displaystyle=$
$\displaystyle\frac{\sum_{i=1}^{n}\sum_{j=1}^{J}\left[W_{ij}(t^{\prime})-\bar{W}_{i}(t^{\prime})\right]\left[W_{ij}(t)-\bar{W}_{i}(t)\right]}{n(J-1)J}\text{
and}$ $\displaystyle\widehat{\sigma}_{u2}^{2}$ $\displaystyle=$
$\displaystyle\frac{\sum_{i=1}^{n}\sum_{j=1}^{J}\left[W_{ij}-\bar{W}_{i}\right]^{2}}{n(J-1)J}$

prior to the simulation stage. With the generated pseudo-data, we proceed with
polynomial basis expansion as described in Subsection 2.2 and model fitting to
obtain $\widehat{\boldsymbol{\beta}}_{1\lambda}(t)$,
$\widehat{{\beta_{2}}}_{\lambda}$, and
$\widehat{\boldsymbol{\alpha}}_{\lambda}$, which are functions of $\lambda$.
The simulation stage involves repeating the simulation of the pseudo-data and
regression steps a total of $S$ times. We then average the estimated
coefficients across all $S$ iterations for each $\lambda$ level46.

The extrapolation stage involves obtaining extrapolation equations for the
averaged estimated coefficients as a function of $\lambda$. Thus, after
averaging the estimated coefficients at each $\lambda$ across all $S$
iterations, we regress the average coefficients on functions of $\lambda$. The
function of $\lambda$ may be linear, quadratic, or otherwise nonlinear. After
fitting the regression models, we obtain the SIMEX-based estimator at
$\lambda=-1$ and the naive estimator at $\lambda=0$. In the Supplementary
Materials, we summarize the steps for quadratic extrapolation when done for
each covariate separately.

###  3.2 Regression Calibration

Carroll and Stefanski 52 and Gleser 53 proposed regression calibration (RC),
which replaces the unobserved true measurement in the regression model with an
unbiased approximation of it46. In practice, the unbiased approximation of the
true measurement error can be obtained by various methods using internal
validation, external validation, and replicate data. For example, a simple way
to obtain the unbiased approximation of the true measurement error is to
regress the true measurement, X, on other covariates including error-free
covariates, Z, and observed measurement of X, W, in the validation data. While
regression calibration can be applied to any regression model, the method is
particularly useful for generalized linear models 46. There are several ways
to obtain estimates of the true measurement under the regression calibration
approach. When internal validation data are not available for all subjects in
a sample, true measurement can be approximated with internal validation data
from a subset of subjects in the sample data 54. Spiegelman and colleagues 55
regressed the true measurement, $X$, on the observed measurement, $W$, using
an internal validation data set to obtain an approximation of the true
measurement on a subsample of individuals. With the measurement error
covariance matrix estimated from external data or internal replicate data, the
best linear approximation to $X$ can be obtained with a method-of-moments
estimator 52, 53, 56, 57, 58. The James-Stein shrinkage estimator is another
approach to approximating $X$ with replicate data on $W$ 46, 59. It is close
to the method-of-moments estimate of $X$ and involves estimating a reliability
parameter, $R$, of the observation $W$, where $R=\frac{Var(X)}{Var(W)}$46, 60,
and shrinking $E(X|W)$, from $W$ towards $E(X)$ using $E(X|W)=RW+(1-R)E(X)$60.
Expanded regression calibration models can also produce approximate measures
of $X$. With identifying information to estimate the variance of the
measurement error, expanded regression calibration involves simulating
approximate measures for $X$ from its distribution, $f_{x}(X)$, or from its
conditional distribution given observed data, namely from $f_{X|W,Z}(X|W,Z)$
46. This is especially useful when validation data are not available on a
subset of subjects. For example, we 61, 62 developed Monte Carlo expectation
maximization methods to simulate the true measurements from their conditional
distribution given the observed data while using an instrumental variable to
estimate the variance of the measurement error.

We use here a variation of the expanded regression calibration method under
the assumption that $E\\{W_{ij}(t)\mid X_{i}(t)\\}=X_{i}(t)$ and
$cov[E\\{W_{ij}(t)\mid X_{i}(t)\\}]=\Sigma_{U_{1}}$ and consequently,
$W_{ij}(t)\mid X_{i}(t)\sim MVN\\{X_{i}(t),\Sigma_{U_{1}}\\}$. Rather than
simulating directly from the conditional distribution of the surrogate given
the true covariate, Strand and colleagues 63 proposed a mixed effects approach
to obtain recalibrated measures for $X_{i}(t)$ under the regression
calibration method. This approach involves regressing the observed surrogates
on their mean functions in a random intercept model. Given the dimension of
longitudinal functional data, fitting a mixed effects model can be
computationally intensive. To address these computational challenges, Cui and
colleagues64 proposed fast univariate inference (FUI), a scalable method for
fitting massive longitudinal functional data. FUI requires fitting mixed-
effect models on the observed covariate at each time point $t$, across all the
repeated measures of $W$ over multiple days or periods of observation.
Performing the mixed effects model in a univariate fashion creates a more
scalable and less computationally intensive method for estimation. We use FUI
to approximate true measures and use the repeated measures of the surrogate or
observed data as identifying information. Under (4), for any fixed $t$,

$W_{1ij}(t)=X_{1i}(t)+U_{1ij}(t)=\mu_{{X}_{1}}(t)+\epsilon_{1i}(t)+U_{1ij}(t),\quad\quad
j=1,\cdots,J,i=1,\cdots,n,$

where $\mu_{{X}_{1}}(t)=E\\{X_{1i}(t)\\}$, and
$\epsilon_{1i}(t)=X_{1i}(t)-\mu_{{X}_{1}}(t)$ is a mean zero random variable
shared across $J$ repeated measures. It becomes a mixed-effects model with one
subject-specific random intercept at each time point. Therefore, FUI for
regression calibration fits univariate mixed-effects models with $W_{1ij}(t)$
as outcomes at each time point to obtain a point-wise estimate of $X_{1i}(t)$,
which may be subsequently smoothed along the functional domain. For the scalar
covariate, a mixed-effects model can be used similarly to obtain estimates of
$X_{2i}$. We implement this approach in several steps. First, we use FUI to
estimate $X_{i1}(t)$ and $X_{i2}$, denoted by $\widehat{X}_{1i}(t)$ and
$\widehat{X}_{2i}$, respectively. Next, we replace $X_{i1}(t)$ and $X_{i2}$
with $\widehat{X}_{1i}(t)$ and $\widehat{X}_{2i}$, respectively, in (1) to
estimate coefficients corrected for measurement error. We obtain the RC-based
estimators as follows.

  1. 1.

Obtain $\widehat{X}_{i1}(t)$ and $\widehat{X}_{i2}$ using FUI with separate
linear mixed-effect regressions at each time point.

  2. 2.

Reduce the dimension of $\widehat{X}_{i1}(t)$ with basis expansion, converting
$\widehat{X}_{i1}(t)$ into a $1\times K_{n}$ matrix.

  3. 3.

Perform generalized linear regression of ${Y}_{i}$ on $\widehat{X}_{i1}(t)$,
$\widehat{X}_{i2}$, and $\boldsymbol{Z}_{i}$ to obtain RC-based estimators for
the coefficients, $\boldsymbol{\gamma}_{RC}$, $\beta_{2RC}$, and
$\boldsymbol{\alpha}_{RC}$ as in (6). In particular, estimate the functional
regression coefficient by

$\displaystyle\widehat{\beta}_{RC}(t)$ $\displaystyle\approx$
$\displaystyle\boldsymbol{b}(t)\widehat{\boldsymbol{\gamma}}_{RC},$

where $\boldsymbol{b}(t)$ is a set of B-spline basis functions.

###  3.3 Inference

We used non-parametric bootstrap confidence intervals (CI) for inference. We
first randomly selected subjects from the sample with replacement and then
treated their data as the bootstrap sample. We estimated the parameters of
interest under the different estimation methods using each bootstrap sample
(see Section 4). We repeated these steps 500 times, resulting in 500
estimators for each method. The $95\%$ CIs for the functional coefficient are
the $2.5$th and $97.5$th percentiles of $\widehat{\beta}_{b}(t)$ at each
observed time point. We obtained the $95\%$ CIs for the scalar and error-free
covariates as the $95\%$ percentile bootstrap CIs similarly.

##  4 Simulations

###  4.1 Simulation procedure

We conducted simulations to investigate the finite sample performance of our
method. We used the generalized functional linear regression model in (1) to
generate binary responses. Specifically, we simulated the outcomes with
$Y_{i}\sim Binomial(p_{i})$ where $p_{i}=expit(\eta_{i})$ and
$\eta_{i}=\int_{0}^{1}\beta_{1}(t)X_{1i}(t)dt+\beta_{2}X_{2i}+\alpha_{1}Z_{1i}+\alpha_{2}Z_{2i}$,
in which $\beta_{1}(t)=sin(2\pi t)$, $\beta_{2}=1$, and
$\alpha_{1}=\alpha_{2}=1$. We simulated the true functional and scalar
covariates with $X_{1i}(t)=1/[1+\exp\\{8(t-0.5)\\}]+\epsilon_{X_{1}}(t)$ for
$t\in[0,1]$ and $X_{2i}\sim N(2,\sigma^{2}_{X_{2}})$, respectively. We
simulated the error term, $\epsilon_{X_{1}}(t)$, independently from a mean
zero Gaussian process with constant variances $\sigma^{2}_{X_{1}}$ and
covariance function
$\Sigma_{X_{1}}(s,t)=\sigma^{2}_{X_{1}}\exp\left\\{-(s-t)^{2}/2l_{X}^{2}\right\\}$,
where the correlation depends on the distance between two points and $l_{X}$
controls the strength of correlation, with a smaller value of $l_{X}$
indicating a weaker correlation. In addition, we simulated the continuous and
binary error-free covariates independently with $Z_{1i}\sim
N(2,\sigma^{2}_{Z})$ and $Z_{2i}\sim Binomial(1,0.6)$, respectively. We
simulated the observed functional covariate $W_{1ij}(t)$ from the additive
measurement error model $W_{1ij}(t)=X_{1i}(t)+U_{1ij}(t)$, generating
$U_{1ij}(t)$ from a mean zero Gaussian process with an exponential covariance
function
$\Sigma_{U_{1}}(s,t)=\sigma^{2}_{U_{1}}\exp\\{-(s-t)^{2}/2l_{U}^{2}\\}$, where
$l_{U}$ controls the strength of correlation for the functional measurement
error and $\sigma_{U_{1}}$ is the constant standard deviation of $U_{1}(t)$
along the functional span. Similarly, we simulated the observed scalar
covariate $W_{2ij}$ as $W_{2ij}=X_{2i}+U_{2ij}$ and independently of
$W_{1ij}(t)$, where $U_{2ij}{\sim}N(0,\sigma^{2}_{U_{2}})$. Although the
number of replicates for functional and scalar covariates prone to error can
be different in practice, we used 5 replicates for both types of covariates in
our simulation.

We conducted simulations to evaluate the performance of the estimators under
the following four sets of conditions: 1) increasing sample sizes of
$n\in(500,1000,2000,5000)$ under different magnitudes of measurement error,
$\sigma_{U}\in(1.5,3)$; 2) different magnitudes of measurement error,
$\sigma_{U}\in(1.5,2,3,4)$ and under different correlations of functional
measurement error, $l_{U}\in(0.05,0.15)$; 3) varying correlations and
magnitudes of functional measurement error, $l_{U}\in(0.05,0.15,0.25)$, and
$\sigma_{U_{1}}\in(1.5,2,3)$ with fixed measurement error in the scalar
covariate; and 4) different structures for the variance-covariance matrix of
the true functional covariate and measurement error including compound
symmetric, autoregressive one, squared exponential, and unstructured. For the
last set of simulations, we set $n=2,000$, $\sigma_{X}=4$, $\sigma_{U}=2$,
$l_{X}=0.25$, $l_{U}=0.25$, $\rho_{X_{1}(t)}=0.25$, $\rho_{U_{1}(t)}=0.25$,
and $\sigma_{U}=2$. The $l_{X}$ and $l_{U}$ are the tuning parameters in the
exponential covariance function of the functional true covariate, $X_{1}(t)$,
and measurement error $U_{1}(t)$, respectively. The $\rho_{X_{1}(t)}$ and
$\rho_{U_{1}(t)}$ are the correlations between adjacent locations in the
compound symmetric and autoregressive one correlation matrix of the functional
true covariate, $X_{1}(t)$ and measurement error $U_{1}(t)$, respectively. We
generated the unstructured covariance matrix with a correlation between
adjacent locations in the covariance matrix, $\rho$, to control the overall
correlation strength. We generated the correlation between two adjacent
locations randomly from a uniform distribution with minimum value as
$\max\\{0,\rho_{X_{1}(t)}-0.25\\}$ and maximum value as
$\min\\{\rho_{X_{1}(t)}+0.25,1\\}$ for $X_{1}(t)$. By tuning the value of
$\rho_{X_{1}(t)}$, we control the overall correlation strength of the
unstructured covariance matrix associated with $X_{1}(t)$. Similarly, the
correlation between two adjacent locations in the unstructured correlation
matrix of $U_{1}(t)$ is between $\max\\{0,\rho_{U_{1}(t)}-0.25\\}$ and
$\min\\{\rho_{U_{1}(t)}+0.25,1\\}$, allowing control of the overall
correlation strength of the unstructured covariance matrix associated with
$U_{1}(t)$ in the simulated data.

Each of the four sets of simulations included $500$ replications. We obtained
the number of basis functions, $K_{n}$, as a function of the sample size n as
we previously described in 50.

We considered five estimation methods: oracle, average, naive, SIMEX, and RC.
We obtained the oracle estimator from the true measures of both the functional
covariate $X_{1i}(t)$ and the scalar covariate ($X_{2i}$). The average
estimator was the average of observed measurements across all the repeated
sessions $\overline{W_{1i}}(t)$ and $\overline{W_{2i}}$. We obtained the naive
estimator with the observed measures from a single session $W_{1ij}(t)$ and
$W_{2ij}$, selecting the observations from the first repeated session,
$W_{1i1}(t)$ and $W_{2i1}$. We obtained the SIMEX and RC estimators with the
SIMEX and RC methods, respectively.

Let $\bar{\beta}_{1}(t)=\frac{1}{500}\sum_{r}^{500}\widehat{\beta}_{1r}(t)$
and $\bar{\beta_{2}}=\frac{1}{500}\sum_{r}^{500}\widehat{\beta}_{2r}$, where
$\widehat{\beta_{1r}}(t)$ and $\widehat{\beta}_{2r}$ are the estimators from
the $r$-th replication. We use the following measures for comparisons of the
estimators for ${\beta}_{1}(t)$ and ${\beta_{2}}$. In particular, we assessed
the performance of $\widehat{\beta}_{1}(t)$ with the average squared bias
(ABias2), the average variance (Avar), and the average integrated mean squared
error (AIMSE):

$\displaystyle ABias^{2}\\{\widehat{\beta_{1}}(t)\\}$ $\displaystyle=$
$\displaystyle\frac{1}{t_{grid}}\sum_{h=1}^{t_{grid}}\left\\{\bar{\beta_{1}}(t_{h})-\beta_{1}(t_{h})\right\\}^{2},$
$\displaystyle AVar\\{\widehat{\beta}_{1}(t)\\}$ $\displaystyle=$
$\displaystyle\frac{1}{t_{grid}}\sum_{h=1}^{t_{grid}}\frac{1}{500}\sum_{r=1}^{500}\left\\{\widehat{\beta}_{1r}(t_{h})-\bar{\beta}_{1}(t_{h})\right\\}^{2},\text{and}$
$\displaystyle AIMSE\\{\widehat{\beta}_{1}(t)\\}$ $\displaystyle=$
$\displaystyle
ABias^{2}\\{\widehat{\beta}_{1}(t)\\}+Avar\\{\widehat{\beta}_{1}(t)\\},$

in which $\\{t_{h}\\}^{t_{grid}}_{h=1}$ is a sequence of equally spaced grid
points in $[0,1]$. We also assessed the performance of $\widehat{\beta}_{2}$
with the squared bias (Bias2), the variance (Var), and the mean squared error
(MSE):

$\displaystyle Bias^{2}(\widehat{\beta_{2}})$ $\displaystyle=$
$\displaystyle(\bar{\beta_{2}}-\beta_{2})^{2},$ $\displaystyle
Var(\widehat{\beta_{2}})$ $\displaystyle=$
$\displaystyle\frac{1}{500}\sum_{r=1}^{500}(\widehat{\beta_{2r}}-\bar{\beta_{2}})^{2},\text{and}$
$\displaystyle MSE(\widehat{\beta_{2}})$ $\displaystyle=$ $\displaystyle
Bias^{2}(\widehat{\beta_{2}})+Var(\widehat{\beta_{2}}).$

When $\sigma_{U_{1}}$ and $\sigma_{U_{2}}$ are the same, we use $\sigma_{U}$
to denote their common value. Similarly, we use $\sigma_{X}$ to denote the
same standard deviation for covariates when $\sigma_{X_{1}}$ and
$\sigma_{X_{2}}$ are equal. Otherwise, we denote the values as
$\sigma_{U_{1}}$, $\sigma_{U_{2}}$, $\sigma_{X_{1}}$, and $\sigma_{X_{2}}$.

###  4.2 Simulation results

####  4.2.1 Effects of varying sample sizes

Tables 1 and 2 show the results of the impacts of varying sample sizes on the
estimators for functional and scalar covariates, respectively. For the
functional covariate, as the sample size increased, the ABias2 of the oracle,
SIMEX, and RC estimators consistently decreased, but the average and naive-
based estimators changed little, with notable biases even when the sample size
was large ($n=5,000$). For the scalar covariate, Bias2 increased as sample
size increased for the oracle, RC, and average estimators, and also for the
SIMEX estimator when measurement error was high. When measurement error was
low, the Bias2 in the SIMEX estimator decreased with increasing sample size.
Despite the contrasting patterns for the SIMEX estimator under different
levels of measurement error, Bias2 was notably smaller for the SIMEX estimator
than for the RC estimator in all conditions except with a sample size of $500$
and moderate error ($\sigma_{U}$= $1.5$). Bias2 was consistently high for the
naive estimator in all conditions. For both functional and scalar covariates,
in terms of bias, the oracle estimator performed best, followed in order by
the SIMEX, RC, average, and naive estimators.

The AVar/Var of all the estimators decreased with increasing sample size for
both the scalar and functional covariates. Across conditions, the naive
estimator had the lowest AVar/Var, followed in ascending order by the average,
RC, and SIMEX estimators. The AVar/Var of the oracle estimator were similar to
those of the RC estimator. The AIMSE/MSE decreased with increasing sample size
for the oracle and SIMEX estimators in all measurement error conditions as
well as for the RC and average estimators for the functional covariate and
under relatively low measurement error for the scalar covariate. The AIMSE/MSE
did not vary meaningfully across sample sizes for the naive estimator and
increased somewhat with sample size for the average estimator under relatively
high measurement error in the scalar covariate. For the functional covariate,
the oracle, SIMEX, RC, and average estimators had generally similar AIMSE
values that were substantially lower than that of the naive estimator for a
given sample size-measurement error combination. The simulations showed the
same pattern for MSE in the scalar covariate except that the average estimator
performed worse than the oracle, SIMEX, and RC estimators under relatively
high measurement error. The SIMEX, RC, average, and naive estimators are all
approximately consistent 46. Thus, there is a trade-off between variance and
bias in estimation, consistent with the naive estimator’s lowest average
variance/variance and highest average bias/bias in Tables 1 and 2.

Table 1: The effect of varying sample sizes on the performance of
$\widehat{\beta_{1}}(t)$ with the oracle, SIMEX, RC, average, and naive
estimators, as indicated by the average squared bias (ABias2), average sample
variance (AVar), and average integrated mean squared error (AIMSE) for
$n\in(500,1000,2000,5000)$; $\sigma_{X_{1}}=\sigma_{X_{2}}=\sigma_{X}=3$; and
$\sigma_{U_{1}}=\sigma_{U_{2}}=\sigma_{U}=1.5$ or $3$.

$\sigma_{U}=1.5$
---
| ABias2 | AVar | AIMSE
n | Oracle | SIMEX | RC | Average | Naive | Oracle | SIMEX | RC | Average | Naive | Oracle | SIMEX | RC | Average | Naive
500 | 0.0058 | 0.0059 | 0.0110 | 0.0157 | 0.1097 | 0.1779 | 0.1963 | 0.1707 | 0.1546 | 0.1063 | 0.1836 | 0.2023 | 0.1818 | 0.1702 | 0.2160
1000 | 0.0058 | 0.0061 | 0.0122 | 0.0172 | 0.1138 | 0.0842 | 0.0924 | 0.0805 | 0.0730 | 0.0502 | 0.0900 | 0.0985 | 0.0927 | 0.0902 | 0.1640
2000 | 0.0002 | 0.0004 | 0.0069 | 0.0124 | 0.1122 | 0.0541 | 0.0598 | 0.0541 | 0.0491 | 0.0369 | 0.0543 | 0.0602 | 0.0610 | 0.0615 | 0.1491
5000 | 0.0002 | 0.0003 | 0.0062 | 0.0114 | 0.1099 | 0.0261 | 0.0289 | 0.0268 | 0.0243 | 0.0185 | 0.0262 | 0.0292 | 0.0330 | 0.0358 | 0.1284
$\sigma_{U}=3$
| ABias2 | AVar | AIMSE
n | Oracle | SIMEX | RC | Average | Naive | Oracle | SIMEX | RC | Average | Naive | Oracle | SIMEX | RC | Average | Naive
500 | 0.0058 | 0.0076 | 0.0151 | 0.0432 | 0.2198 | 0.1779 | 0.2036 | 0.1868 | 0.1291 | 0.0712 | 0.1836 | 0.2111 | 0.2019 | 0.1723 | 0.2910
1000 | 0.0058 | 0.0074 | 0.0148 | 0.0424 | 0.2191 | 0.0842 | 0.1010 | 0.0922 | 0.0638 | 0.0339 | 0.0900 | 0.1084 | 0.1071 | 0.1062 | 0.2529
2000 | 0.0002 | 0.0039 | 0.0130 | 0.0438 | 0.2248 | 0.0541 | 0.0629 | 0.0610 | 0.0423 | 0.0251 | 0.0543 | 0.0668 | 0.0740 | 0.0861 | 0.2499
5000 | 0.0002 | 0.0033 | 0.0120 | 0.0421 | 0.2229 | 0.0261 | 0.0308 | 0.0307 | 0.0213 | 0.0122 | 0.0262 | 0.0341 | 0.0428 | 0.0634 | 0.2350

Table 2: The effect of varying sample sizes on the performance of
$\widehat{\beta_{2}}$ with the oracle, SIMEX, RC, average, and naive
estimators, as indicated by the average squared bias (Bias2), average sample
variance (Var), and mean squared error (MSE) for $n\in(500,1000,2000,5000)$;
$\sigma_{X_{1}}=\sigma_{X_{2}}=\sigma_{X}=3$; and
$\sigma_{U_{1}}=\sigma_{U_{2}}=\sigma_{U}=1.5$ or $3$.

$\sigma_{U}=1.5$
---
| Bias2 | Var | MSE
n | Oracle | SIMEX | RC | Average | Naive | Oracle | SIMEX | RC | Average | Naive | Oracle | SIMEX | RC | Average | Naive
500 | 0.0055 | 0.0046 | 0.0000 | 0.0021 | 0.1136 | 0.0261 | 0.0320 | 0.0219 | 0.0199 | 0.0085 | 0.0315 | 0.0366 | 0.0219 | 0.0220 | 0.1220
1000 | 0.0011 | 0.0008 | 0.0011 | 0.0062 | 0.1216 | 0.0108 | 0.0138 | 0.0095 | 0.0086 | 0.0042 | 0.0119 | 0.0146 | 0.0105 | 0.0148 | 0.1258
2000 | 0.0004 | 0.0001 | 0.0024 | 0.0089 | 0.1309 | 0.0043 | 0.0055 | 0.0039 | 0.0035 | 0.0018 | 0.0047 | 0.0056 | 0.0063 | 0.0125 | 0.1327
5000 | 0.0001 | 0.0000 | 0.0032 | 0.0104 | 0.1321 | 0.0019 | 0.0022 | 0.0015 | 0.0014 | 0.0007 | 0.0019 | 0.0022 | 0.0047 | 0.0118 | 0.1327
$\sigma_{U}=3$
| Bias2 | Var | MSE
n | Oracle | SIMEX | RC | Average | Naive | Oracle | SIMEX | RC | Average | Naive | Oracle | SIMEX | RC | Average | Naive
500 | 0.0055 | 0.0020 | 0.0162 | 0.0753 | 0.4503 | 0.0261 | 0.0267 | 0.0152 | 0.0105 | 0.0025 | 0.0315 | 0.0287 | 0.0315 | 0.0858 | 0.4529
1000 | 0.0011 | 0.0055 | 0.0237 | 0.0873 | 0.4544 | 0.0108 | 0.0121 | 0.0070 | 0.0049 | 0.0013 | 0.0119 | 0.0176 | 0.0307 | 0.0922 | 0.4557
2000 | 0.0004 | 0.0088 | 0.0286 | 0.0949 | 0.4640 | 0.0043 | 0.0049 | 0.0029 | 0.0020 | 0.0006 | 0.0047 | 0.0137 | 0.0315 | 0.0969 | 0.4646
5000 | 0.0001 | 0.0098 | 0.0301 | 0.0973 | 0.4631 | 0.0019 | 0.0019 | 0.0011 | 0.0008 | 0.0002 | 0.0019 | 0.0117 | 0.0312 | 0.0981 | 0.4633

####  4.2.2 Impacts of varying magnitudes of measurement error

Tables 3 and 4 and Figures 1 \- 3 show the results on the impacts of varying
degrees of measurement error on the estimators for functional and scalar
covariates, respectively. The oracle estimator consistently had the smallest
bias that was constant across levels of measurement error. For all of the
other estimators, bias usually increased with increasing levels of measurement
error. Apart from the oracle estimator, the SIMEX estimator had the lowest
bias, followed in ascending order by the RC, average, and naive estimators. As
measurement error increased, the comparative advantage of the SIMEX estimator
over the RC estimator tended to decline somewhat.

The oracle estimator had the smallest AVar/Var that were constant across
levels of measurement error. As measurement error increased, the AVar of the
SIMEX and RC estimators increased somewhat for the functional covariate, but
the Var for these estimators decreased somewhat for the scalar covariate. For
both the functional and scalar covariates, the AVar/Var declined for the
average and naive estimators as measurement error increased. Aside from the
oracle estimator, the AIMSE/MSE rose with increasing measurement error for all
estimators, with the SIMEX estimator generally performing the best, followed
in order by the RC, average, and naive estimators.

Figure 3 shows the bias of $\widehat{\beta_{2}}$ for the different estimators
under different magnitudes of measurement error. As indicated by the results
for the oracle estimator, the bias of the $\widehat{\beta_{2}}$ was positive
when there was no measurement error. The biases for the naive and average
estimators were negative and became increasingly negative as $\sigma_{W_{2}}$
increased. Therefore, the bias of $\widehat{\beta_{2}}$ is negative when there
are uncorrected measurement errors, leading to attenuated estimates of the
association between the scalar covariate and the outcome. As $\sigma_{W_{2}}$
increased, the bias of the measurement error-corrected estimators (SIMEX and
RC) changed from slightly positive to slightly to moderately negative. This
indicates that the ability of SIMEX and RC to correct measurement errors
declines as measurement error increases, with the RC estimator more sensitive
in this way than the SIMEX estimator.

Table 3: The effect of varying magnitudes of measurement error on the
performance of $\widehat{\beta_{1}}(t)$ with the oracle, SIMEX, RC, average,
and naive estimators, as indicated by the average squared bias (ABias2),
average sample variance (Avar), and average integrated mean squared error
(AIMSE) for $n=2,000$; $\sigma_{X_{1}}=\sigma_{X_{2}}=\sigma_{X}=3$;
$\sigma_{U_{1}}=\sigma_{U_{2}}=\sigma_{U}\in(1.5,2,3,4)$; $l_{X}=0.05$; and
$l_{U}=0.15$, where $l_{X}$ and $l_{U}$ are the tuning parameters in the
exponential covariance function of the functional true covariate and
measurement error, respectively.

| ABias2 | Avar | AIMSE
---|---|---|---
$\sigma_{U}$ | Oracle | SIMEX | RC | Average | Naive | Oracle | SIMEX | RC | Average | Naive | Oracle | SIMEX | RC | Average | Naive
1.5 | 0.0002 | 0.0004 | 0.0069 | 0.0124 | 0.1122 | 0.0541 | 0.0598 | 0.0541 | 0.0491 | 0.0369 | 0.0543 | 0.0602 | 0.0610 | 0.0615 | 0.1491
2.0 | 0.0002 | 0.0009 | 0.0097 | 0.0215 | 0.1555 | 0.0541 | 0.0608 | 0.0553 | 0.0466 | 0.0326 | 0.0543 | 0.0617 | 0.0651 | 0.0680 | 0.1881
3.0 | 0.0002 | 0.0039 | 0.0130 | 0.0438 | 0.2248 | 0.0541 | 0.0629 | 0.0610 | 0.0423 | 0.0251 | 0.0543 | 0.0668 | 0.0740 | 0.0861 | 0.2499
4.0 | 0.0002 | 0.0103 | 0.0129 | 0.0697 | 0.2751 | 0.0541 | 0.0643 | 0.0705 | 0.0382 | 0.0194 | 0.0543 | 0.0746 | 0.0834 | 0.1078 | 0.2945

Table 4: The effect of varying magnitudes of measurement error on the
performance of $\widehat{\beta_{2}}$ with the oracle, SIMEX, RC, average, and
naive estimators, as indicated by the squared bias (Bias2), sample variance
(Var), and mean squared error (MSE) for $n=2,000$;
$\sigma_{X_{1}}=\sigma_{X_{2}}=\sigma_{X}=3$; and
$\sigma_{U_{1}}=\sigma_{U_{2}}=\sigma_{U}\in(1.5,2,3,$ or $4)$.

| Bias2 | Var | MSE
---|---|---|---
$\sigma_{U}$ | Oracle | SIMEX | RC | Average | Naive | Oracle | SIMEX | RC | Average | Naive | Oracle | SIMEX | RC | Average | Naive
1.5 | 0.0011 | 0.0008 | 0.0011 | 0.0062 | 0.1216 | 0.0108 | 0.0138 | 0.0095 | 0.0086 | 0.0042 | 0.0119 | 0.0146 | 0.0105 | 0.0148 | 0.1258
2.0 | 0.0011 | 0.0001 | 0.0051 | 0.0219 | 0.2359 | 0.0108 | 0.0139 | 0.0085 | 0.0072 | 0.0028 | 0.0119 | 0.0140 | 0.0137 | 0.0291 | 0.2387
3.0 | 0.0011 | 0.0055 | 0.0237 | 0.0873 | 0.4544 | 0.0108 | 0.0121 | 0.0070 | 0.0049 | 0.0013 | 0.0119 | 0.0177 | 0.0307 | 0.0922 | 0.4557
4.0 | 0.0011 | 0.0369 | 0.0504 | 0.1838 | 0.6129 | 0.0108 | 0.0091 | 0.0061 | 0.0032 | 0.0007 | 0.0119 | 0.0460 | 0.0564 | 0.1870 | 0.6136

####  4.2.3 Impacts of the functional measurement error on the scalar
covariate

Varying correlations and magnitudes of the functional measurement error had
essentially no impact on the Bias2, Var, and MSE of $\widehat{\beta_{2}}$ for
each of the five estimators (Table 5). Although Table 5 shows the simulation
results for $n=1,000$ only, we observed similar results for
$n\in(500,2000,5000)$.

Table 5: The effect of varying correlations and magnitudes of functional
measurement error on the performance of $\widehat{\beta_{2}}$ with the oracle,
SIMEX, RC, average, and naive estimators, as indicated by the squared bias
(Bias2), sample variance (Var), and mean squared error (MSE) for $n=1,000$;
$\sigma_{X_{1}}=\sigma_{X_{2}}=3$; $\sigma_{U_{2}}=2$; $\sigma_{U_{1}}=1.5,2,$
or $3$; $l_{X}=0.05$; and $l_{U}=0.05,0.15,$ or $0.25$, where $l_{X}$ and
$l_{U}$ are the tuning parameters in the exponential covariance function of
the functional true covariate and measurement error, respectively.

$l_{U}=0.05$
---
| Bias2 | Var | MSE
$\sigma_{U_{1}}$ | Oracle | SIMEX | RC | Average | Naive | Oracle | SIMEX | RC | Average | Naive | Oracle | SIMEX | RC | Average | Naive
1.5 | 0.0009 | 0.0001 | 0.0050 | 0.0216 | 0.2323 | 0.0104 | 0.0130 | 0.0081 | 0.0069 | 0.0027 | 0.0113 | 0.0131 | 0.0131 | 0.0284 | 0.2350
2.0 | 0.0009 | 0.0001 | 0.0051 | 0.0218 | 0.2333 | 0.0104 | 0.0130 | 0.0080 | 0.0068 | 0.0027 | 0.0113 | 0.0130 | 0.0131 | 0.0286 | 0.2360
3.0 | 0.0009 | 0.0000 | 0.0054 | 0.0223 | 0.2345 | 0.0104 | 0.0129 | 0.0079 | 0.0067 | 0.0027 | 0.0113 | 0.0129 | 0.0133 | 0.0291 | 0.2372
$l_{U}=0.15$
| Bias2 | Var | MSE
$\sigma_{U_{1}}$ | Oracle | SIMEX | RC | Average | Naive | Oracle | SIMEX | RC | Average | Naive | Oracle | SIMEX | RC | Average | Naive
1.5 | 0.0009 | 0.0000 | 0.0053 | 0.0222 | 0.2344 | 0.0104 | 0.0134 | 0.0082 | 0.0069 | 0.0026 | 0.0113 | 0.0134 | 0.0135 | 0.0291 | 0.2371
2.0 | 0.0009 | 0.0000 | 0.0055 | 0.0226 | 0.2354 | 0.0104 | 0.0128 | 0.0079 | 0.0067 | 0.0026 | 0.0113 | 0.0128 | 0.0134 | 0.0293 | 0.2380
3.0 | 0.0009 | 0.0000 | 0.0059 | 0.0233 | 0.2366 | 0.0104 | 0.0125 | 0.0078 | 0.0066 | 0.0026 | 0.0113 | 0.0126 | 0.0137 | 0.0299 | 0.2392
$l_{U}=0.25$
| Bias2 | Var | MSE
$\sigma_{U_{1}}$ | Oracle | SIMEX | RC | Average | Naive | Oracle | SIMEX | RC | Average | Naive | Oracle | SIMEX | RC | Average | Naive
1.5 | 0.0009 | 0.0000 | 0.0054 | 0.0224 | 0.2342 | 0.0104 | 0.0130 | 0.0080 | 0.0068 | 0.0027 | 0.0113 | 0.0130 | 0.0134 | 0.0292 | 0.2369
2.0 | 0.0009 | 0.0000 | 0.0056 | 0.0227 | 0.2350 | 0.0104 | 0.0128 | 0.0080 | 0.0068 | 0.0027 | 0.0113 | 0.0128 | 0.0136 | 0.0295 | 0.2377
3.0 | 0.0009 | 0.0000 | 0.0060 | 0.0234 | 0.2359 | 0.0104 | 0.0127 | 0.0079 | 0.0067 | 0.0027 | 0.0113 | 0.0127 | 0.0138 | 0.0300 | 0.2386

####  4.2.4 Impacts of varying functional measurement error variance-
covariance matrix structures

The naive, average, and RC estimators are based on the assumption that the
measurement error and true measurements have the same variance-covariance
structure. The naive and average estimators treat the observed measurements as
true measurements. The RC estimator involves FUI to approximate the true
measurement with the observed measurement at each grid location (time point)
discretely and does not address the correlation between observed measurements
at adjacent locations along the functional continuum. Thus, the RC
approximation of the true functional measurements naturally has a very similar
correlation structure as the observed measurement. The SIMEX estimator does
not involve any assumptions on the variance-covariance structure of the
measurement error or true measurement. Instead, we estimate measurement error
variance-covariance matrix with repeated measures, which distinguish the
variance-covariance matrix of measurement error from that of the true
measurement. Also, by extrapolating back to the "measurement error-free"
situation in the extrapolation step of SIMEX, the expected measurement error
variance-covariance is 0 and thus has a very limited effect on the estimated
coefficients.

Table 6 shows that, across combinations of correlation structures of
$X_{1}(t)$ and $U_{1}(t)$, the ABias2 of the SIMEX estimator was small and
similar to that of the oracle estimator. The RC estimator tended to have the
next smallest ABias2, followed in ascending order by the average and naive
estimators. However, the AVar was smallest for the naive estimator, followed
in order by the average, RC, oracle, and SIMEX estimators. The ranges of AIMSE
values across estimators were narrow, with the average estimator having the
lowest values and the SIMEX generally having the highest.

Table 6: The effect of varying functional measurement error variance-
covariance matrix structures on the performance of $\widehat{\beta_{1}}(t)$
with the oracle, SIMEX, RC, average, and naive estimators. Results are for
combinations of unstructured (UN), compound symmetric (CS), autoregressive one
(AR1), and squared exponential (EXP) structures. Performance indicated by the
average squared bias (ABias2), average sample variance (Avar), and average
integrated mean squared error (AIMSE) for $n=2,000$, $\sigma_{X}=4$,
$\sigma_{U}=2$, $l_{X}=0.25$, $l_{U}=0.25$, $\rho_{X_{1}(t)}=0.25$,
$\rho_{U_{1}(t)}=0.25$, and $\sigma_{U}=2$. The $l_{X}$ and $l_{U}$ are the
tuning parameters in the exponential covariance function of the functional
true covariate and measurement error, respectively. The $\rho_{X_{1}(t)}$ and
$\rho_{U_{1}(t)}$ are the correlations between adjacent locations in the
compound symmetric and autoregressive one correlation matrix of the functional
true covariate and measurement error, respectively. The scale of
$\rho_{X_{1}(t)}$ and $\rho_{U_{1}(t)}$ roughly represent the strengths of
correlations between different locations in the unstructured correlation
matrix of the functional true covariate and measurement error, respectively.

$\boldsymbol{\rho_{X_{1}(t)}}=0.25,\quad\boldsymbol{\rho_{U_{1}(t)}}=0.25$
---
| ABias2 | AVar | AIMSE
Cov${}_{X_{1}(t)}$ | Cov${}_{U_{1}(t)}$ | Oracle | SIMEX | RC | Average | Naive | Oracle | SIMEX | RC | Average | Naive | Oracle | SIMEX | RC | Average | Naive
AR1 | AR1 | 0.0005 | 0.0005 | 0.0049 | 0.0099 | 0.0964 | 0.1303 | 0.1518 | 0.1237 | 0.1122 | 0.076 | 0.1308 | 0.1523 | 0.1286 | 0.122 | 0.1724
AR1 | CS | 0.0005 | 0.0004 | 0.0026 | 0.0066 | 0.0666 | 0.1303 | 0.1511 | 0.1217 | 0.1104 | 0.0739 | 0.1308 | 0.1515 | 0.1244 | 0.1169 | 0.1405
AR1 | UN | 0.0002 | 0.0005 | 0.0035 | 0.0087 | 0.0734 | 0.1293 | 0.1513 | 0.1226 | 0.1097 | 0.0733 | 0.1295 | 0.1518 | 0.1261 | 0.1184 | 0.1467
CS | AR1 | 0.0003 | 0.0007 | 0.0102 | 0.0168 | 0.1445 | 0.2253 | 0.2573 | 0.1952 | 0.1768 | 0.1038 | 0.2256 | 0.258 | 0.2055 | 0.1936 | 0.2483
CS | CS | 0.0003 | 0.0006 | 0.0049 | 0.0098 | 0.0947 | 0.2253 | 0.2582 | 0.2129 | 0.1929 | 0.1291 | 0.2256 | 0.2588 | 0.2178 | 0.2028 | 0.2239
CS | UN | 0.0002 | 0.0004 | 0.0054 | 0.0115 | 0.0982 | 0.2207 | 0.2556 | 0.2107 | 0.1884 | 0.1312 | 0.2209 | 0.256 | 0.2161 | 0.1999 | 0.2294
UN | AR1 | 0.0005 | 0.0016 | 0.0143 | 0.0207 | 0.1469 | 0.2205 | 0.2609 | 0.1934 | 0.1772 | 0.1057 | 0.221 | 0.2625 | 0.2077 | 0.198 | 0.2526
UN | CS | 0.0005 | 0.001 | 0.0075 | 0.0126 | 0.095 | 0.2205 | 0.2531 | 0.2047 | 0.1876 | 0.1298 | 0.221 | 0.2542 | 0.2122 | 0.2002 | 0.2248
UN | UN | 0.0008 | 0.0005 | 0.0044 | 0.0093 | 0.0978 | 0.2477 | 0.2817 | 0.2272 | 0.2059 | 0.1268 | 0.2485 | 0.2822 | 0.2316 | 0.2151 | 0.2246
$\boldsymbol{\rho_{X_{1}(t)}}=0.25,\quad\boldsymbol{l_{U}}=0.25$
| ABias2 | AVar | AIMSE
Cov${}_{X_{1}(t)}$ | Cov${}_{U_{1}(t)}$ | Oracle | SIMEX | RC | Average | Naive | Oracle | SIMEX | RC | Average | Naive | Oracle | SIMEX | RC | Average | Naive
AR1 | EXP | 0.0005 | 0.0009 | 0.0144 | 0.0218 | 0.1652 | 0.113 | 0.1355 | 0.1014 | 0.0919 | 0.0514 | 0.1135 | 0.1365 | 0.1159 | 0.1137 | 0.2166
CS | EXP | 0.0005 | 0.0006 | 0.0023 | 0.0059 | 0.0504 | 0.113 | 0.1255 | 0.1035 | 0.0938 | 0.0682 | 0.1135 | 0.1261 | 0.1058 | 0.0998 | 0.1186
UN | EXP | 0.0004 | 0.0006 | 0.002 | 0.007 | 0.0588 | 0.1074 | 0.1203 | 0.0997 | 0.0878 | 0.0613 | 0.1078 | 0.121 | 0.1017 | 0.0948 | 0.1201
$\boldsymbol{l_{X}}=0.25,\quad\boldsymbol{\rho_{U_{1}(t)}}=0.25$
| ABias2 | AVar | AIMSE
Cov${}_{X_{1}(t)}$ | Cov${}_{U_{1}(t)}$ | Oracle | SIMEX | RC | Average | Naive | Oracle | SIMEX | RC | Average | Naive | Oracle | SIMEX | RC | Average | Naive
EXP | AR1 | 0.0005 | 0.0004 | 0.0027 | 0.0066 | 0.0688 | 0.1406 | 0.1698 | 0.135 | 0.1224 | 0.0768 | 0.1411 | 0.1703 | 0.1377 | 0.129 | 0.1456
EXP | CS | 0.0005 | 0.0002 | 0.0016 | 0.005 | 0.0529 | 0.1406 | 0.1634 | 0.1366 | 0.1238 | 0.0861 | 0.1411 | 0.1636 | 0.1382 | 0.1288 | 0.139
EXP | UN | 0.0005 | 0.0005 | 0.0019 | 0.0058 | 0.0559 | 0.1401 | 0.1666 | 0.1381 | 0.1236 | 0.0836 | 0.1406 | 0.1671 | 0.14 | 0.1294 | 0.1395

Figure 1: Boxplots of average squared biases (ABias2) of
$\widehat{\beta_{1}}(t)$ obtained under the Average, Naive, SIMEX, RC, and
Oracle methods. Each plot compares the boxplot of ABias2 from the Average,
Naive, SIMEX, RC, and Oracle methods estimators of $\widehat{\beta_{1}}(t)$ in
the generalized functional linear function when
$\sigma_{X_{1}}=\sigma_{X_{2}}=3$ and $l_{X}=0.05$. The top three figures
correspond to $n=500$, with (a) $\sigma_{U_{1}}=1.5$, (b) $\sigma_{U_{1}}=2$,
and (c) $\sigma_{U_{1}}=3$ for $l_{U}=0.05,0.15$. The bottom three figures
correspond to $n=2000$ with, (d) $\sigma_{U_{1}}=1.5$, (e) $\sigma_{U_{1}}=2$,
and (f) $\sigma_{U_{1}}=3$ for $l_{U}=0.05,0.15$. $l_{X}$ and $l_{U}$ are the
tuning parameters in the exponential covariance function of the functional
true covariate and measurement error, respectively.  Figure 2: Plots of the
estimated regression coefficient function in the generalized functional linear
function from simulations study when $n=2000$,
$\sigma_{X_{1}}=\sigma_{X_{2}}=3$, and $l_{X}=0.05$, with (a)
$\sigma_{U_{1}}=1.5,l_{U}=0.05$; (b) $\sigma_{U_{1}}=2,l_{U}=0.05$; (c),
$\sigma_{U_{1}}=3,l_{U}=0.05$; (d), $\sigma_{U_{1}}=1.5,l_{U}=0.15$; (e),
$\sigma_{U_{1}}=2,l_{U}=0.15$; and (f), $\sigma_{U_{1}}=3,l_{U}=0.15$.
$\delta=\frac{\sigma_{U_{1}}}{\sigma_{X_{1}}}$. In each plot, the solid black
line represents the true coefficient function, while the cyan-long-dashed,
coral-dotted, red two-dashed, purple-dashed, and blue-dot-dashed lines
represent the averaged coefficient estimators over 500 replicates from the
Oracle, Average, Naive, RC, and SIMEX methods, respectively. The terms,
$l_{X}$ and $l_{U}$, are the tuning parameters in the exponential covariance
function of the functional true covariate and measurement error, respectively.
Figure 3: Bar plots of the bias of the scalar regression coefficient
($\widehat{\beta_{2}}$) in the generalized functional linear function from
simulations of the oracle, SIMEX, RC, average, and naive estimators. The
length of an error bar represents twice the standard deviation of the
corresponding $\widehat{\beta_{2}}$. In these simulations, $n=2,000$,
$\sigma_{X_{1}}=3$, $l_{X}=0.15$, $l_{U}=0.15$, $\sigma_{X_{2}}=4$, and
$\sigma_{U_{2}}=1,2,$ or $3$.

##  5 Application

The Centers for Disease Control and Prevention established the National Health
and Nutrition Examination Study (NHANES)65 in the early 1960s with the goal of
evaluating the health and nutritional status of Americans. NHANES collects
data through interviews, questionnaires, and medical examinations, including
information on demographics, socioeconomic status, dietary habits, health
behaviors, medical conditions, physiological examination results, and
laboratory assessments of blood samples. In the 2011-2014 cycles, NHANES
collected, physical activity data, including physical activity intensity, with
ActiGraph triaxial accelerometers (model GT3X+, manufactured by ActiGraph of
Pensacola, FL). NHANES participants wore this device for 24 hours a day for
seven consecutive days, including during water-related activities for up to 30
minutes, as this device is water-resistant for that duration65. The wearable
devices detect and measure the magnitude of acceleration, or "intensity," of
movement and record activity every $\frac{1}{80}$th of a second (80 Hz).
NHANES aggregated the 80 Hz accelerometer measurements over every minute,
hour, and day for each participant 65.

NHANES participants reported their health statuses, including whether they had
previously been diagnosed with type 2 diabetes (T2D), in a questionnaire. We
classified participants who answered "yes" as having T2D. Such participants
also reported how old they were when diagnosed. We included in our analysis
only those participants who responded to the question about T2D diagnosis. In
a dietary interview, participants were asked for detailed dietary intake
information, which was used to estimate their total energy intake (in Kcal)
over the course of two days. Finally, in a further questionnaire, participants
reported their demographic characteristics, including age, sex, and
race/ethnicity65.

Our final analytic sample consisted of 5,021 participants aged $20$ to $80$
years who had wearable device-based physical activity data for at least four
days per week during the 2011-2014 survey cycles. The sample included $52\%$
women, and participants’ average age was $49$ years (standard deviation = $18$
years). Twelve percent were black, $14\%$ were Hispanic, $66\%$ were white,
and $7\%$ were of another race.

We estimated the following functional logistic regression model with
measurement error:

$\displaystyle\log\left(\frac{P_{i}}{1-P_{i}}\right)$
$\displaystyle=\int_{0}^{1}\beta_{1}(t)X_{1i}(t)dt+\beta_{2}X_{2i}+\mathbf{Z}_{i}\boldsymbol{\alpha},$
$\displaystyle W_{1ij}(t)$ $\displaystyle=X_{1i}(t)+U_{1ij}(t),\text{and}$
$\displaystyle W_{2ij}$ $\displaystyle=X_{2i}+U_{2ij}.$

$P_{i}$ represents the probability of having T2D for the $i$th participant,
and $X_{1i}(t)$ and $X_{2i}$ are the true measures of physical activity
intensity and total caloric intake for participant $i$, respectively. The
observed covariates, $W_{1ij}(t)$ and $W_{2ij}$, represent the observed
wearable device-based measure of physical activity intensity and self-reported
total caloric intake, respectively, for the $i$th subject on the $j$th day.
Similarly, $U_{1ij}(t)$ and $U_{2ij}$ are the measurement errors associated
with the device-based measure of physical activity intensity and total caloric
intake, respectively, for the $i$th subject on the $j$th day. Finally,
$\boldsymbol{Z}_{i}$ represents a vector of error-free covariates including
age, race, and gender for the $i$th subject.

###  5.1 Application results

Table 7 shows the estimated exponentiated regression coefficients and their
corresponding $95\%$ confidence intervals from the SIMEX, RC, average, and
naive estimators. We computed the $95\%$ confidence intervals with a
nonparametric bootstrap with $500$ bootstrap samples for each of the four
estimated models. The table excludes the time-varying coefficients for
physical activity intensity, which we summarize graphically below (See Figure
5 and 6). Table 7 reveals that measurement error in self-reported total
caloric intake attenuated its association with T2D because the intake
coefficients in the models with the naive and average estimators are closer to
1 than those in the models with the SIMEX and RC estimators. This aligns with
the results of our simulations (Figure 3). In addition, we observed an inverse
association between the total caloric intake and T2D after adjusting for
physical activity, age, sex, and race/ethnicity. Moreover, Table 7 shows that
measurement error can influence the estimated associations between error-free
covariates and T2D diagnosis, with the direction of such influence depending
on the error-free covariate. For example, error correction with the SIMEX and
RC estimators reduced the coefficient for age relative to the models with the
naive and average estimators that do not correct for measurement error. In
contrast, error-corrected estimators increased the magnitude of the
coefficient for sex compared to the models with the error-uncorrected
estimators. The difference in odds of T2D for whites and Hispanics was not
statistically significant in the models with the SIMEX and RC estimators, but
was significantly different in the model with the average estimator.

Figure 4 shows that the intra-day pattern of device-based physical activity
intensity was similar across individual weekdays and weekends. This similarity
allowed us to estimate the measurement error covariance matrix and
consequently approximate conditional distributions for true physical activity
intensity given the observed data with information from both weekdays and
weekends. Figure 5 shows plots of $\widehat{\beta}(t)$ over the 24-hour day
for each pair of estimators. The coefficient for the association between
physical activity and T2D varies by time of day. Estimates based on the naive
estimator, and to a lesser extent, the average estimator, strain toward the
null relative to estimates based on the error-corrected estimators, SIMEX and
RC.

Figure 6 shows plots of the nonparametric $95\%$ point-wise bootstrap
confidence intervals for each of the estimators. There is a statistically
significant moderate negative association between device-based physical
activity intensity and T2D between the $15$th and $17$th hours (late
afternoon, prior to typical dinner time) in models based on the SIMEX, RC, and
average estimators. Similarly, we observed a negative nonsignificant
association between physical activity intensity and T2D between the $7$th and
$10$th hours (mid-morning, before typical lunchtime). In addition, there are
notable positive associations between physical activity intensity and T2D
during the night hours.

From the application to the NHANES year 2011-2014 data, we found that
measurement error in error-prone covariates, including dietary intake and
physical activity, tended to attenuate their associations with T2D. The
impacts of measurement error on error-free covariates depends on the
covariates. The SIMEX estimators of both error-prone and error-free covariates
tended to be the most different from the naive estimators, indicating that the
SIMEX estimators were the "better" estimators among all estimators proposed in
this study. This finding also aligns with the results of our simulation study.

Table 7: Estimated exponentiated coefficicents of the associations between the
scalar and error-free covariates and T2D in the 2011-2014 NHANES data, based
on the SIMEX, RC, average, and naive estimators.

Covariates |  | SIMEX |  $95\%$ C.I. | RC |  $95\%$ C.I. | Average |  $95\%$ C.I. | Naive |  $95\%$ C.I.
---|---|---|---|---|---|---|---|---|---
Intercept |  | 0.0254 | (0.0084, 0.0711 ) | 0.0252 | (0.0091, 0.0624) | 0.0140 | (0.0073, 0.0349) | 0.0158 | (0.0063, 0.0292)
Dietary Intake |  | 0.9995 | (0.9991, 0.9998 ) | 0.9995 | (0.9991, 0.9998) | 0.9997 | (0.9995 ,0.9999) | 0.9998 | (0.9996 ,0.9999)
Age |  | 1.0461 | (1.0379, 1.0552) | 1.0474 | (1.0404 ,1.0569) | 1.0488 | (1.0404 1.0569) | 1.0481 | (1.0411, 1.0579)
Sex |  |  |  |  |  |  |  |  |
| Female | 0.7488 | (0.5437, 1.0302 ) | 0.7985 | (0.6041 ,1.0856 ) | 0.8023 | (0.6063, 1.0848) | 0.8081 | (0.5925, 1.0952)
Race |  |  |  |  |  |  |  |  |
| Black | 1.7061 | (1.1231, 2.5838) | 1.7467 | (1.1849 ,2.6601) | 1.8152 | (1.1710, 2.6608) | 1.7676 | (1.2191, 2.6464)
| Hispanic | 1.5907 | (0.9847 ,2.3929) | 1.5040 | (0.9930 ,2.2991) | 1.5115 | (1.0090, 2.3713) | 1.5895 | (0.9631 ,2.2333)
| Other | 0.9094 | (0.4927, 1.5227 ) | 0.9437 | (0.5242, 1.5656) | 0.9454 | (0.5173, 1.5783) | 0.9413 | (0.5233 ,1.5932)

Figure 4: Wearable device-based physical activity intensity from the 2011-2014
cycles of the NHANES plotted against time (hour) for the weekend and
individual weekdays. The grey lines in the background are the trend of
physical intensity over time for each participant and the blue line is the
average physical intensity across all participants over time for each day.
Figure 5: Plots comparing the SIMEX, RC, average, and naive estimates of the
exponentiated coefficients for the relationship between physical activity
intensity and T2D [$\exp\\{\widehat{\beta_{1}}(t)\\}$] in the 2011-2014 NHANES
data after adjusting for total caloric intake, age, sex, and race. Figure 6:
Plots of the $95\%$ point-wise bootstrap confidence intervals (CI) of
exponentiated coefficients of the association between physical activity
intensity and T2D [$\exp{\widehat{\beta_{1}}(t)}$] in the 2011-2014 NHANES
data after adjusting for total caloric intake, age, sex, and race.

##  6 Discussion

Prior approaches to correcting measurement error in functional covariates in
generalized functional linear regression are based on the assumption of
discrete measurement error or do not distinguish measurement errors with
complex error structures from random noise in the data. We developed SIMEX and
RC approaches to correcting measurement error and used a repeated measures
approach as an additional identifying method. We assumed the observed
functional and scalar covariates $W_{1}(t)$ and $W_{2}$ are unbiased
surrogates, prone to classical additive measurement error, for the true latent
functional and scalar covariates $X_{1}(t)$ and $X_{2}$, respectively. Both
approaches allow correlation between measurement errors at different locations
along the functional continuum. The SIMEX approach does not rely on any
assumptions about the distribution of the functional covariate and structure
of the measurement error covariance matrix. In our simulations, the SIMEX
estimator had the least bias, apart from the oracle estimator, across the
range of conditions. The RC estimator had the next least bias, with the
average and naive estimators performing more poorly. The bias in the SIMEX
estimator increased with increasing measurement error but decreased with
increasing sample size (except for scalar covariates with relatively high
measurement error). With increasing sample size, the bias in the RC estimator
decreased for the functional covariate but increased for the scalar covariate.
Bias in the RC estimator also increased with increasing measurement error for
both functional and scalar covariates. The SIMEX estimator performed
especially well under varying structures of functional covariate’s variance-
covariance matrix, effectively mirroring the very small bias of the oracle
estimator. The comparatively low bias of the SIMEX and RC estimators, however,
came at the price of variance higher than that for the average and naive
estimators in the conditions we examined. In addition, varying correlations
and magnitudes of the functional measurement error had essentially no impact
on the bias or variance of the scalar covariate for any estimator. This is
consistent with the property of generalized linear regression that bias in the
estimator of the regression coefficient of one predictor is not affected by
the measurement error in another predictor unless they are correlated or their
measurement errors are correlated 48.

We applied our methods to data on physical activity intensity, dietary intake,
and demographics in relation to T2D from the 2011-2014 NHANES. Estimation with
the SIMEX and RC error correction estimators reduced the associations for some
covariates, but increased them for others, particularly physical activity
intensity, in comparison to estimation with the average and naive estimators.
The association between physical activity intensity and T2D varied by time of
day. Physical activity before meal times was inversely related to T2D, while
physical activity at night was positively related to T2D. However, this was
not statistically significant in our analyses. The inverse patterns in the
association before mealtimes may be due to the fact that physical activity
assists the body to use all available insulin for glucose uptake from the
blood 66, 67, which reduces blood glucose uptake after eating. Blood glucose
is significantly lower during exercise before eating than during exercise
after eating 66, 67. This successful application suggests our approaches to
correcting measurement error may be useful for generalized functional linear
regression in other empirical settings as well.

##  7 SOFTWARE

The R codes for our simulations and brief instructions on how to use them are
available in the GitHub repository at https://github.com/YLuan-git/GLF-SIMEX-
RC. The data that support the findings of this study are also provided as part
of the GitHub repository.

##  8 Acknowledgments

This research was supported by an award from the National Institutes of
Diabetes, Digestive, and Kidney Disease Award number R01DK132385. This
research was also supported in part by Lilly Endowment, Inc., through its
support for the Indiana University Pervasive Technology Institute.

The authors would like to thank Dr. Devon Brewer for his constructive feedback
and for assistance with editing the manuscript.

## References

  * 1 Nelder JA, Wedderburn RW. Generalized linear models. Journal of the Royal Statistical Society: Series A (General) 1972; 135(3): 370–384.
  * 2 Liu S, Gao Y, Shen Y, Zhang M, Li J, Sun P. Application of three statistical models for predicting the risk of diabetes. BMC Endocrine Disorders 2019; 19(1): 1–10.
  * 3 Vergotine Z, Yako YY, Kengne AP, Erasmus RT, Matsha TE. Proliferator-activated receptor gamma Pro12Ala interacts with the insulin receptor substrate 1 Gly972Arg and increase the risk of insulin resistance and diabetes in the mixed ancestry population from South Africa. BMC Genetics 2014; 15(1): 1–8.
  * 4 Joshi RD, Dhakal CK. Predicting Type 2 Diabetes Using Logistic Regression and Machine Learning Approaches. International Journal of Environmental Research and Public Health 2021; 18(14): 7346.
  * 5 James GM. Generalized linear models with functional predictors. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 2002; 64(3): 411–432.
  * 6 Crainiceanu CM, Staicu AM, Di CZ. Generalized multilevel functional regression. Journal of the American Statistical Association 2009; 104(488): 1550–1561.
  * 7 Fan R, Wang Y, Mills JL, et al. Generalized Functional Linear Models for Gene-Based Case-Control Association Studies. Genetic Epidemiology 2014; 38(7): 622–637.
  * 8 Gertheiss J, Maity A, Staicu AM. Variable selection in generalized functional linear models. The ISI’s Journal for the Rapid Dissemination of Statistics Research. 2013; 2(1): 86–101.
  * 9 Staicu AM, Crainiceanu CM, Reich DS, Ruppert D. Modeling functional data with spatially heterogeneous shape characteristics. Biometrics 2012; 68(2): 331–343.
  * 10 Ramsay JO, Dalzell C. Some tools for functional data analysis. Journal of the Royal Statistical Society: Series B (Methodological) 1991; 53(3): 539–561.
  * 11 Cardot H, Crambes C, Kneip A, Sarda P. Smoothing splines estimators in functional linear regression with errors-in-variables. Computational Statistics & Data Analysis 2007; 51(10): 4832–4848.
  * 12 Cardot H, Ferraty F, Sarda P. Spline estimators for the functional linear model. Statistica Sinica 2003: 571–591.
  * 13 Goldsmith J, Bobb J, Crainiceanu CM, Caffo B, Reich D. Penalized functional regression. Journal of Computational and Graphical Statistics 2011; 20(4): 830–851.
  * 14 Yao F, Müller HG, Wang JL. Functional data analysis for sparse longitudinal data. Journal of the American Statistical Association 2005; 100(470): 577–590.
  * 15 Reiss PT, Ogden RT. Functional principal component regression and functional partial least squares. Journal of the American Statistical Association 2007; 102(479): 984–996.
  * 16 James GM, Jing W, Ji Z. Functional linear regression that’s interpretable. The Annals of Statistics 2009; 37(5A): 2083–2108.
  * 17 Law GR, Ellison GT, Secher AL, et al. Analysis of continuous glucose monitoring in pregnant women with diabetes: distinct temporal patterns of glucose associated with large-for-gestational-age infants. Diabetes Care 2015; 38(7): 1319–1325.
  * 18 Ramsay JO, Silverman BW. Applied Functional Data Analysis: Methods and Case Studies.  Springer Series in StatisticsNew York, NY: Springer.  1 ed. 2002.  eBook ISBN: 978-0-387-22465-7
  * 19 Amini AA, Wainwright MJ. Sampled forms of functional PCA in reproducing kernel Hilbert spaces. The Annals of Statistics 2012; 40(5): 2483–2510.
  * 20 Araki Y, Konishi S, Kawano S, Matsui H. Functional logistic discrimination via regularized basis expansions. Communications in Statistics—Theory and Methods 2009; 38(16-17): 2944–2957.
  * 21 Boente G, Fraiman R. Kernel-based functional principal components. Statistics & Probability Letters 2000; 48(4): 335–345.
  * 22 Cai TT, Hall P. Prediction in functional linear regression. The Annals of Statistics 2006; 34(5): 2159–2179.
  * 23 Cardot H, Sarda P. Estimation in generalized linear models for functional data via penalized likelihood. Journal of Multivariate Analysis 2005; 92(1): 24–41.
  * 24 Wang JL, Chiou JM, Müller HG. Functional data analysis. Annual Review of Statistics and Its Application 2016; 3: 257–295.
  * 25 Ramsay J, Silverman B. Functional Data Analysis.  Springer Series in StatisticsSpringer New York .  2013\.
  * 26 Tekwe CD, Zoh RS, Yang M, et al. Instrumental variable approach to estimating the scalar-on-function regression model with measurement error with application to energy expenditure assessment in childhood obesity. Statistics in Medicine 2019\.
  * 27 Rice JA, Wu CO. Nonparametric mixed effects models for unequally sampled noisy curves. Biometrics 2001; 57(1): 253–259.
  * 28 Tekwe CD, Zoh RS, Bazer FW, Wu G, Carroll RJ. Functional multiple indicators, multiple causes measurement error models. Biometrics 2018; 74(1): 127–134.
  * 29 Chakraborty A, Panaretos VM. Regression with genuinely functional errors-in-covariates. arXiv preprint arXiv:1712.04290 2017\.
  * 30 Jadhav S, Tekwe CD, Luan Y. A function-based approach to model the measurement error in wearable devices. Statistics in Medicine 2022; 41(24): 4886–4902.
  * 31 Zoh RS, Luan Y, Tekwe C. A fully Bayesian semi-parametric scalar-on-function regression (SoFR) with measurement error using instrumental variables. arXiv preprint arXiv:2202.00711 2022\.
  * 32 Cai X. Methods for handling measurement error and sources of variation in functional data models. 352 Columbia Commons. 2015. PhD thesis. Doctoral Thesis. https://doi. org/10.7916/D8M907CJ 353, New York; .
  * 33 Jadhav S, Ma S. Functional measurement error in functional regression. Canadian Journal of Statistics 2020; 48(2): 238–258.
  * 34 Case MA, Holland AB, Kevin GV, Mitesh SP. Accuracy of smartphone applications and wearable devices for tracking physical activity data. Journal of the American Medical Association 2015; 313(6): 625–626.
  * 35 Freedson P, Pober D, Janz KF, others . Calibration of accelerometer output for children. Medicine and Science in Sports and Exercise 2005; 37(11): S523.
  * 36 Corder K, Brage S, Ekelund U. Accelerometers and pedometers: methodology and clinical application. Current Opinion in Clinical Nutrition & Metabolic Care 2007; 10(5): 597–603.
  * 37 Bailey RL. Overview of dietary assessment methods for measuring intakes of foods, beverages, and dietary supplements in research studies. Current Opinion in Biotechnology 2021; 70: 91–96.
  * 38 Subar AF, Freedman LS, Tooze JA, et al. Addressing current criticism regarding the value of self-report dietary data. The Journal of Nutrition 2015; 145(12): 2639–2645.
  * 39 Dwyer JT, Gardner J, Halvorsen K, Krall EA, Cohen A, Valadian I. Memory of food intake in the distant past. American journal of epidemiology 1989; 130(5): 1033–1046.
  * 40 Archer E, Hand GA, Blair SN. Validity of US nutritional surveillance: National Health and Nutrition Examination Survey caloric energy intake data, 1971–2010. PloS One 2013; 8(10): e76632.
  * 41 Mitka M. Do flawed data on caloric intake from NHANES present problems for researchers and policy makers. Journal of the American Medical Association 2013; 310(20): 2137–2138.
  * 42 Archer E, Pavela G, Lavie CJ. The inadmissibility of what we eat in America and NHANES dietary data in nutrition and obesity research and the scientific formulation of national dietary guidelines. In: . 90. Elsevier. ; 2015: 911–926.
  * 43 Adusumilli K, Kurisu D, Otsu T, Whang YJ. Inference on distribution functions under measurement error. Journal of Econometrics 2020; 215(1): 131–164.
  * 44 Müller HG, Stadtmüller U. Generalized functional linear models. the Annals of Statistics 2005; 33(2): 774–805.
  * 45 Fuller WA. Measurement error models. 305.  John Wiley & Sons .  2009\.
  * 46 Carroll R, Ruppert D, Stefanski L, Crainiceanu C. Measurement Error in Nonlinear Models: A Modern Perspective, Second Edition.  Chapman & Hall/CRC Monographs on Statistics & Applied ProbabilityCRC Press .  2006\.
  * 47 Ramsay JO. Functional data analysis. Encyclopedia of Statistical Sciences 2004; 4: 40-50.
  * 48 Buonaccorsi JP. Measurement error: models, methods, and applications.  CRC press .  2010\.
  * 49 Cook JR, Stefanski LA. Simulation-extrapolation estimation in parametric measurement error models. Journal of the American Statistical Association 1994; 89(428): 1314–1328.
  * 50 Tekwe CD, Zhang M, Carroll RJ, et al. Estimation of sparse functional quantile regression with measurement error: a SIMEX approach. Biostatistics 2022\.
  * 51 Stefanski LA, Cook JR. Simulation-extrapolation: the measurement error jackknife. Journal of the American Statistical Association 1995; 90(432): 1247–1256.
  * 52 Carroll RJ, Stefanski LA. Approximate quasi-likelihood estimation in models with surrogate predictors. Journal of the American Statistical Association 1990; 85(411): 652–663.
  * 53 Gleser LJ. Improvements of the naive approach to estimation in nonlinear errors-in-variables regression models. Contemp. Math 1990; 112: 99–114.
  * 54 Lee Lf, Sepanski JH. Estimation of linear and nonlinear errors-in-variables models using validation data. Journal of the American Statistical Association 1995; 90(429): 130–140.
  * 55 Spiegelman D, McDermott A, Rosner B. Regression calibration method for correcting measurement-error bias in nutritional epidemiology. The American Journal of Clinical Nutrition 1997; 65(4): 1179S–1186S.
  * 56 Hardin JW, Schmiediche H, Carroll RJ. The regression-calibration method for fitting generalized linear models with additive measurement error. The Stata Journal 2003; 3(4): 361–372.
  * 57 Liu X, Liang KY. Efficacy of repeated measures in regression models with measurement error. Biometrics 1992: 645–654.
  * 58 Carroll RJ, Gail MH, Lubin JH. Case-control studies with errors in covariates. Journal of the American Statistical Association 1993; 88(421): 185–199.
  * 59 Whittemore AS. Errors-in-variables regression using Stein estimates. The American Statistician 1989; 43(4): 226–228.
  * 60 Elissa B, N DJ, Yves R. Estimating Structural Equation Models Using James–Stein Type Shrinkage Estimators. Psychometrika 2021; 86(1): 96-130.  Copyright - © The Psychometric Society 2021; Last updated - 2022-10-04.
  * 61 Tekwe CD, Carter RL, Cullings HM, Carroll RJ. Multiple indicators, multiple causes measurement error models. Statistics in Medicine 2014; 33(25): 4469–4481.
  * 62 Tekwe CD, Carter RL, Cullings HM. Generalized multiple indicators, multiple causes measurement error models. Statistical Modelling 2016; 16(2): 140–159.
  * 63 Strand M, Sillau S, Grunwald GK, Rabinovitch N. Regression calibration for models with two predictor variables measured with error and their interaction, using instrumental variables and longitudinal data. Statistics in Medicine 2014; 33(3): 470–487.
  * 64 Cui E, Leroux A, Smirnova E, Crainiceanu CM. Fast univariate inference for longitudinal functional models. Journal of Computational and Graphical Statistics 2021: 1–12.
  * 65 NHANES . National Health and Nutrition Examination Survey. https://wwwn.cdc.gov/Nchs/Nhanes/2005-2006/PAXRAW_D.htm; 2005.
  * 66 Aird TP, Davies RW, Carson BP. Effects of fasted vs fed-state exercise on performance and post-exercise metabolism: A systematic review and meta-analysis. Scandinavian Journal of Medicine & Science in Sports 2018; 28(5): 1476–1493.
  * 67 Vieira AF, Costa RR, Macedo RCO, Coconcelli L, Kruel LFM. Effects of aerobic exercise performed in fasted v. fed state on fat and carbohydrate metabolism in adults: a systematic review and meta-analysis. British Journal of Nutrition 2016; 116(7): 1153–1164.