# Conditional Analysis for Mixed Covariates, with Application to Feed Intake of Lactating Sows

Authors: S. Y. Park; C. Li; S. M. Mendoza Benavides; E. van Heugten; A. M. Staicu
Journal: Journal of Probability and Statistics
 (2019)

---

## Abstract

We propose a novel modeling framework to study the effect of covariates of various types on the conditional distribution of the response. The methodology accommodates flexible model structure, allows for joint estimation of the quantiles at all levels, and provides a computationally efficient estimation algorithm. Extensive numerical investigation confirms good performance of the proposed method. The methodology is motivated by and applied to a lactating sow study, where the primary interest is to understand how the dynamic change of minute-by-minute temperature in the farrowing rooms within a day (functional covariate) is associated with low quantiles of feed intake of lactating sows, while accounting for other sow-specific information (vector covariate).


---

## Body

## 1. Introduction

Many modern applications routinely collect data on study participants comprising scalar responses and covariates of various types, vector, function, and image, and the main question of interest is to examine how the covariates affect the response. For example, in our motivating experimental study, the goal is to analyze how the minute-by-minute daily temperature and humidity of the farrowing rooms, where sows are placed after giving birth for nursing, affect their feed intake during a lactation period. The covariates consist of temperature profile, humidity, and sow age, where the response is a total amount of daily feed intake of sows. A popular approach in these cases is to use a nonparametric framework and assume that the mixed covariates solely affect the mean response; see Cardot et al. [1], James [2], Ramsay and Silverman [3, 4], Ferraty and Vieu [5, 6], Goldsmith et al. [7], McLean et al. [8], and others. However, for our application, while it is important to study the mean feed intake, animal scientists are often more concerned with the left tail of the feed intake distribution. This is because low feed intake of lactating sows could lead to many serious issues, including decrease in milk production and negative impact on the sows reproductive system; see, for reference, Quiniou and Noblet [9], Renaudeau and Noblet [10], St-Pierre et al. [11], among others. In this paper we focus on regression models that study the effects of covariates on the entire distribution of response. Our contribution is the development of a modeling framework that accommodates a comprehensive study of various types (vector and functional) of covariates on a scalar response.Quantile regression models the effect of scalar/vector covariates beyond the mean response; it provides a more comprehensive study of the covariates on the response and has attracted great interest [12, 13]. For prespecified quantile levels, quantile regression models the conditional quantiles of the response as a function of the observed covariates; this approach has been extended more recently to ensure noncrossing of quantile functions [14]. Quantile regression has been also extended to handle functional covariates. Cardot et al. [15] discussed quantile regression models by employing a smoothing spline modeling based approach. Kato [16] considered the same problem and used a functional principal component (fPC) based approach. Both papers mainly discussed the case of having a single functional covariate and it is not clear how to extend them to the case where there are multiple functional covariates or mixed covariates (vector and functional).More recently, Tang and Cheng [17], Lu et al. [18], and Yu et al. [19] studied quantile regression when the covariates are of mixed types and introduced the partial functional linear quantile regression modeling framework. The first two publications used fPC basis while the last one considered partial quantile regression (PQR) basis. These approaches all are suitable when the interest is studying the effect of covariate at a particular quantile level and do not handle the study of covariate effects at simultaneous quantile levels due to the well-known crossing-issue.Ferraty et al. [20] and Chen and Müller [21] considered a different perspective and studied the effect of a functional predictor on the quantiles of the response by modeling the conditional distribution of the response directly. However their approach is limited to one functional predictor. In this paper we fill this gap and propose a unifying modeling framework and estimation technique that allows studying the effect of mixed type covariates (i.e., scalar, vector, and functional) on the conditional distribution of a scalar response in a computationally efficient manner.LetQ
Y
∣
X
(
·
)
(
τ
) denote the τth conditional quantile of Y given a functional covariate X
(
·
), and let F
Y
∣
X
(
·
)
(
y
) denote the conditional distribution of Y given X
(
·
). We model the conditional distribution using a generalized function-on-function regression framework, i.e., F
Y
∣
X
(
·
)
(
y
)
=
E
1
(
Y
≤
y
)
∣
X
(
·
)
=
g
-
1
∫
X
t
β
t
,
y
d
t, where 1
(
·
) is an indicator function and g is the logit link function, and we study the conditional quantiles by exploiting the relationship between Q
Y
∣
X
(
·
)
(
τ
) and F
Y
∣
X
(
·
)
(
y
) through Q
Y
∣
X
)
(
·
)
(
τ
)
=
inf
⁡
y
:
F
Y
∣
X
(
·
)
(
y
)
≥
τ for 0
<
τ
<
1. The advantage and contribution of our proposed method mainly come from the following reasons: (1) our modeling approach is spline-based, and as a result it can easily accommodate smooth effects of scalar variables as well as of functional covariates and (2) our estimation approach is based on a single step function-on-function (or function-on-scalar) penalized regression, which enables efficient implementation by exploiting off-the-shelf software and leads to competitive computations.The remainder of the paper is structured as follows. Section2 discusses the details of the proposed method and Section 3 describes the estimation procedure and extensions. Section 4 performs a thorough simulation study evaluating the performance of the proposed method and its competitors. We apply the proposed method to analyze the sow data in Section 5. We conclude the paper with a discussion in Section 6.


## 2. Methodology

### 2.1. Statistical Framework

Leti be index subjects, j index repeated measurements, n the number of subjects, and m
i the number of observations for subject i. Suppose we observe Y
i
,
X
i
1
,
X
i
2
,
t
i
j
,
X
i
3
(
t
i
j
)
1
≤
j
≤
m
i
1
≤
i
≤
n, where Y
i is the response, which is a scalar random variable, X
i
1 is a p-dimensional vector of nuisance covariates, X
i
2 is a scalar covariate, and X
i
3
(
·
) is a functional covariate, which is assumed to be square-integrable on a closed domain T.We propose the following model for the conditional distribution ofY
i given X
i
1, X
i
2, and X
i
3
(
·
):(1)
F
Y
i
∣
X
i
1
,
X
i
2
,
X
i
3
·
y
=
E
1
Y
i
≤
y
∣
X
i
1
,
X
i
2
,
X
i
3
·
=
g
-
1
β
0
y
+
X
i
1
T
β
1
+
X
i
2
β
2
y
+
∫
X
i
3
t
β
3
t
,
y
d
t
,where F
(
·
) denotes the conditional distribution function as before, g
(
·
) is a known, monotone link function, namely, the logit link function defined as g
(
x
)
=
log
⁡
x
/
(
1
-
x
) for arbitrary scalar x
∈
[
0,1
], β
0
(
·
) is an unknown and smooth functional intercept, β
1 is a p-dimensional parameter capturing the linear additive effect of the covariate vector X
i
1, β
2
(
·
) is an unknown and smooth function, and β
3
(
·
,
·
) is an unknown and smooth bivariate function. Here, the effect of the nuisance covariates X
i
1 is β
1; it is assumed to be constant over y while the smooth intercept β
0
(
y
) is y-variant. The effect of X
i
2 is β
2
(
y
), which varies smoothly over y; β
3
(
·
,
y
) quantifies y-variant linear effects of the covariate X
i
3
(
·
). If the parameter function β
2
(
·
) is zero then the covariate X
i
2 has no effect on the distribution of the response Y
i, which is equivalent to X
i
2 having no effect on any quantile level of Y
i. Similarly, it is easy to see that a null effect, say β
3
(
·
,
·
)
≡
0, is equivalent to the case that the functional covariate X
i
3
(
·
) has no effect on any quantile level of the response. Chen and Müller [21] (CM, henceforth) considered a similar model; however, their approach is restrictive to a single functional covariate. We discuss the differences between their method and ours in Section 2.2To explain our ideas, we consider the case that the functional covariates are observed without noise on a fine, regular, and common grid of sampling points, i.e.,t
i
j
=
t
j with j
=
1
,
…
,
m for all i. Bear in mind, this assumption is made for illustration only, and our framework can be extended to more general cases, including settings where the functional covariate is observed with noise and at irregular sampling points; see Section 3.3.


### 2.2. Modeling of the Covariate Effects

We modelβ
0
(
y
) and β
2
(
y
) by using prespecified, truncated univariate basis. Let B
0
,
d
0
·
:
d
0
=
1
,
…
,
κ
0 and B
1
,
d
1
·
:
d
1
=
1
,
…
,
κ
1 be two bases of dimensions κ
0 and κ
1, respectively. β
0
(
y
)
≈
∑
d
0
=
1
κ
0
B
0
,
d
0
(
y
)
θ
0
,
d
0 and β
2
(
y
)
≈
∑
d
1
=
1
κ
1
B
1
,
d
1
(
y
)
θ
1
,
d
1, where θ
0
,
d
0’s and θ
1
,
d
1’s are unknown basis coefficients. We represent β
3
(
t
,
y
) using the tensor product of two univariate bases functions, B
2
,
d
2
t
t
:
d
2
=
1
,
…
,
κ
2
,
t and B
2
,
d
2
′
y
y
:
d
2
′
=
1
,
…
,
κ
2
,
y, where κ
2
,
t and κ
2
,
y are the bases dimensions; β
3
(
t
,
y
)
≈
∑
d
2
=
1
κ
2
,
t
∑
d
2
′
=
1
κ
2
,
y
B
2
,
d
2
t
(
t
)
B
2
,
d
2
′
y
(
y
)
θ
2
,
d
2
,
d
2
′, where θ
2
,
d
2
,
d
2
′’s are unknown basis coefficients. In practice, the integration term ∫
X
i
3
(
t
)
β
3
(
t
,
y
)
d
t is approximated by Riemann integration ∫
X
i
3
(
t
)
β
3
(
t
,
y
)
d
t
≈
∑
j
=
1
m
X
i
3
(
t
j
)
β
3
(
t
j
,
y
)
(
t
j
+
1
-
t
j
) but other numerical approximation scheme can be also used.DefineZ
i
(
y
)
=
1
(
Y
i
≤
y
) for y
∈
R. In practice for each y in a fine grid, we view Z
i
(
y
) as a binary-valued random functional variable. It follows that model (1) can be written equivalently as a generalized function-on-function regression model through relating the “artificial” binary functional response Z
i
(
y
) and the mixed covariates X
i
1
,
X
i
2
,
X
i
3
(
·
). This model can be fitted by using, for example, the ideas of Scheipl et al. [22] which we briefly summarize next.Model (1) can be represented as the following generalized additive model:(2)
E
Z
i
y
∣
X
i
1
,
X
i
2
,
X
i
3
·
=
g
-
1
η
i
y
;
η
i
y
=
∑
d
0
=
1
κ
0
B
0
,
d
0
y
θ
0
,
d
0
+
X
i
1
T
β
1
+
X
i
2
∑
d
1
=
1
κ
1
B
1
,
d
1
y
θ
1
,
d
1
+
∑
j
=
1
m
t
j
+
1
-
t
j
X
i
3
t
j
∑
d
2
=
1
κ
2
,
t
∑
d
2
′
=
1
κ
2
,
y
B
2
,
d
2
t
t
j
B
2
,
d
2
′
y
y
θ
2
,
d
2
,
d
2
′
.For convenience, we use the notation B
X
i
2
,
d
1
(
y
)
=
X
i
2
B
1
,
d
1
(
y
), X
~
i
3
(
t
j
)
=
(
t
j
+
1
-
t
j
)
X
i
3
(
t
j
). We let B
0
(
y
)
=
B
0,1
(
y
)
,
…
,
B
0
,
κ
0
(
y
)
T, B
i
1
(
y
)
=
B
X
i
2
,
1
(
y
)
,
…
,
B
X
i
2
,
κ
1
(
y
)
T, B
2
,
t
(
t
)
=
B
2,1
t
(
t
)
,
…
,
B
2
,
κ
2
,
t
t
(
t
)
T, B
2
,
y
(
y
)
=
B
2,1
y
(
y
)
,
…
,
B
2
,
κ
2
,
y
y
(
y
)
T, θ
0
=
θ
0,1
,
…
,
θ
0
,
κ
0
T, θ
1
=
θ
1,1
,
…
,
θ
1
,
κ
1
T, and Θ
2
=
[
θ
2
,
d
2
,
d
2
′
]
1
≤
d
2
≤
κ
2
,
t
,
1
≤
d
2
′
≤
κ
2
,
y is a coefficient matrix. Then β
3
(
t
,
y
)
=
B
2
,
t
(
t
)
⊗
B
2
,
y
(
y
)
T
θ
2, where θ
2 is the vectorization of Θ
2. We let X
~
i
3
(
t
)
=
X
~
i
3
(
t
1
)
,
…
,
X
~
i
3
(
t
m
)
T
∈
R
m, B
2
(
t
,
y
)
=
B
2
,
t
(
t
1
)
⊗
B
2
,
y
(
y
)
,
…
,
B
2
,
t
(
t
m
)
⊗
B
2
,
y
(
y
)
T
∈
R
m
×
κ
2
,
t
κ
2
,
y, and B
i
2
(
y
)
=
B
2
t
,
y
T
X
~
i
3
(
t
). Now model (2) can be written as(3)
E
Z
i
y
∣
X
i
1
,
X
i
2
,
X
i
3
·
=
g
-
1
X
i
1
T
β
1
+
B
0
y
T
θ
0
+
B
i
1
y
T
θ
1
+
B
i
2
y
T
θ
2
.The general idea is to set the bases dimensions κ
0, κ
1, κ
2
,
t, and κ
2
,
y to be sufficiently large to capture the complexity of the coefficient functions and control the smoothness of the estimator through some roughness penalties. This approach of using roughness penalties has been widely used; see, for example, Eilers and Marx [23]; Ruppert [24]; Wood [25, 26] among many others.It is important to emphasize that, even in the case of a single functional covariate, our methodology differs from [21] in two directions: (1) our proposed method is based on modeling the unknown smooth coefficient functions using prespecified basis function expansion and using penalties to control their roughness. In contrast, CM uses data-driven basis and chooses the number of basis functions through the percentage of explained variance (PVE) of the functional predictors. This key difference allows our method to accommodate covariates of different types as well as nonlinear effects. (2) Our estimation approach is based on a single step penalized function-on-function regression while CM uses pointwise estimation based on functional principal component bases and thus requires fitting multiple generalized regressions. This nice feature leads to an computational advantage.


## 2.1. Statistical Framework

Leti be index subjects, j index repeated measurements, n the number of subjects, and m
i the number of observations for subject i. Suppose we observe Y
i
,
X
i
1
,
X
i
2
,
t
i
j
,
X
i
3
(
t
i
j
)
1
≤
j
≤
m
i
1
≤
i
≤
n, where Y
i is the response, which is a scalar random variable, X
i
1 is a p-dimensional vector of nuisance covariates, X
i
2 is a scalar covariate, and X
i
3
(
·
) is a functional covariate, which is assumed to be square-integrable on a closed domain T.We propose the following model for the conditional distribution ofY
i given X
i
1, X
i
2, and X
i
3
(
·
):(1)
F
Y
i
∣
X
i
1
,
X
i
2
,
X
i
3
·
y
=
E
1
Y
i
≤
y
∣
X
i
1
,
X
i
2
,
X
i
3
·
=
g
-
1
β
0
y
+
X
i
1
T
β
1
+
X
i
2
β
2
y
+
∫
X
i
3
t
β
3
t
,
y
d
t
,where F
(
·
) denotes the conditional distribution function as before, g
(
·
) is a known, monotone link function, namely, the logit link function defined as g
(
x
)
=
log
⁡
x
/
(
1
-
x
) for arbitrary scalar x
∈
[
0,1
], β
0
(
·
) is an unknown and smooth functional intercept, β
1 is a p-dimensional parameter capturing the linear additive effect of the covariate vector X
i
1, β
2
(
·
) is an unknown and smooth function, and β
3
(
·
,
·
) is an unknown and smooth bivariate function. Here, the effect of the nuisance covariates X
i
1 is β
1; it is assumed to be constant over y while the smooth intercept β
0
(
y
) is y-variant. The effect of X
i
2 is β
2
(
y
), which varies smoothly over y; β
3
(
·
,
y
) quantifies y-variant linear effects of the covariate X
i
3
(
·
). If the parameter function β
2
(
·
) is zero then the covariate X
i
2 has no effect on the distribution of the response Y
i, which is equivalent to X
i
2 having no effect on any quantile level of Y
i. Similarly, it is easy to see that a null effect, say β
3
(
·
,
·
)
≡
0, is equivalent to the case that the functional covariate X
i
3
(
·
) has no effect on any quantile level of the response. Chen and Müller [21] (CM, henceforth) considered a similar model; however, their approach is restrictive to a single functional covariate. We discuss the differences between their method and ours in Section 2.2To explain our ideas, we consider the case that the functional covariates are observed without noise on a fine, regular, and common grid of sampling points, i.e.,t
i
j
=
t
j with j
=
1
,
…
,
m for all i. Bear in mind, this assumption is made for illustration only, and our framework can be extended to more general cases, including settings where the functional covariate is observed with noise and at irregular sampling points; see Section 3.3.


## 2.2. Modeling of the Covariate Effects

We modelβ
0
(
y
) and β
2
(
y
) by using prespecified, truncated univariate basis. Let B
0
,
d
0
·
:
d
0
=
1
,
…
,
κ
0 and B
1
,
d
1
·
:
d
1
=
1
,
…
,
κ
1 be two bases of dimensions κ
0 and κ
1, respectively. β
0
(
y
)
≈
∑
d
0
=
1
κ
0
B
0
,
d
0
(
y
)
θ
0
,
d
0 and β
2
(
y
)
≈
∑
d
1
=
1
κ
1
B
1
,
d
1
(
y
)
θ
1
,
d
1, where θ
0
,
d
0’s and θ
1
,
d
1’s are unknown basis coefficients. We represent β
3
(
t
,
y
) using the tensor product of two univariate bases functions, B
2
,
d
2
t
t
:
d
2
=
1
,
…
,
κ
2
,
t and B
2
,
d
2
′
y
y
:
d
2
′
=
1
,
…
,
κ
2
,
y, where κ
2
,
t and κ
2
,
y are the bases dimensions; β
3
(
t
,
y
)
≈
∑
d
2
=
1
κ
2
,
t
∑
d
2
′
=
1
κ
2
,
y
B
2
,
d
2
t
(
t
)
B
2
,
d
2
′
y
(
y
)
θ
2
,
d
2
,
d
2
′, where θ
2
,
d
2
,
d
2
′’s are unknown basis coefficients. In practice, the integration term ∫
X
i
3
(
t
)
β
3
(
t
,
y
)
d
t is approximated by Riemann integration ∫
X
i
3
(
t
)
β
3
(
t
,
y
)
d
t
≈
∑
j
=
1
m
X
i
3
(
t
j
)
β
3
(
t
j
,
y
)
(
t
j
+
1
-
t
j
) but other numerical approximation scheme can be also used.DefineZ
i
(
y
)
=
1
(
Y
i
≤
y
) for y
∈
R. In practice for each y in a fine grid, we view Z
i
(
y
) as a binary-valued random functional variable. It follows that model (1) can be written equivalently as a generalized function-on-function regression model through relating the “artificial” binary functional response Z
i
(
y
) and the mixed covariates X
i
1
,
X
i
2
,
X
i
3
(
·
). This model can be fitted by using, for example, the ideas of Scheipl et al. [22] which we briefly summarize next.Model (1) can be represented as the following generalized additive model:(2)
E
Z
i
y
∣
X
i
1
,
X
i
2
,
X
i
3
·
=
g
-
1
η
i
y
;
η
i
y
=
∑
d
0
=
1
κ
0
B
0
,
d
0
y
θ
0
,
d
0
+
X
i
1
T
β
1
+
X
i
2
∑
d
1
=
1
κ
1
B
1
,
d
1
y
θ
1
,
d
1
+
∑
j
=
1
m
t
j
+
1
-
t
j
X
i
3
t
j
∑
d
2
=
1
κ
2
,
t
∑
d
2
′
=
1
κ
2
,
y
B
2
,
d
2
t
t
j
B
2
,
d
2
′
y
y
θ
2
,
d
2
,
d
2
′
.For convenience, we use the notation B
X
i
2
,
d
1
(
y
)
=
X
i
2
B
1
,
d
1
(
y
), X
~
i
3
(
t
j
)
=
(
t
j
+
1
-
t
j
)
X
i
3
(
t
j
). We let B
0
(
y
)
=
B
0,1
(
y
)
,
…
,
B
0
,
κ
0
(
y
)
T, B
i
1
(
y
)
=
B
X
i
2
,
1
(
y
)
,
…
,
B
X
i
2
,
κ
1
(
y
)
T, B
2
,
t
(
t
)
=
B
2,1
t
(
t
)
,
…
,
B
2
,
κ
2
,
t
t
(
t
)
T, B
2
,
y
(
y
)
=
B
2,1
y
(
y
)
,
…
,
B
2
,
κ
2
,
y
y
(
y
)
T, θ
0
=
θ
0,1
,
…
,
θ
0
,
κ
0
T, θ
1
=
θ
1,1
,
…
,
θ
1
,
κ
1
T, and Θ
2
=
[
θ
2
,
d
2
,
d
2
′
]
1
≤
d
2
≤
κ
2
,
t
,
1
≤
d
2
′
≤
κ
2
,
y is a coefficient matrix. Then β
3
(
t
,
y
)
=
B
2
,
t
(
t
)
⊗
B
2
,
y
(
y
)
T
θ
2, where θ
2 is the vectorization of Θ
2. We let X
~
i
3
(
t
)
=
X
~
i
3
(
t
1
)
,
…
,
X
~
i
3
(
t
m
)
T
∈
R
m, B
2
(
t
,
y
)
=
B
2
,
t
(
t
1
)
⊗
B
2
,
y
(
y
)
,
…
,
B
2
,
t
(
t
m
)
⊗
B
2
,
y
(
y
)
T
∈
R
m
×
κ
2
,
t
κ
2
,
y, and B
i
2
(
y
)
=
B
2
t
,
y
T
X
~
i
3
(
t
). Now model (2) can be written as(3)
E
Z
i
y
∣
X
i
1
,
X
i
2
,
X
i
3
·
=
g
-
1
X
i
1
T
β
1
+
B
0
y
T
θ
0
+
B
i
1
y
T
θ
1
+
B
i
2
y
T
θ
2
.The general idea is to set the bases dimensions κ
0, κ
1, κ
2
,
t, and κ
2
,
y to be sufficiently large to capture the complexity of the coefficient functions and control the smoothness of the estimator through some roughness penalties. This approach of using roughness penalties has been widely used; see, for example, Eilers and Marx [23]; Ruppert [24]; Wood [25, 26] among many others.It is important to emphasize that, even in the case of a single functional covariate, our methodology differs from [21] in two directions: (1) our proposed method is based on modeling the unknown smooth coefficient functions using prespecified basis function expansion and using penalties to control their roughness. In contrast, CM uses data-driven basis and chooses the number of basis functions through the percentage of explained variance (PVE) of the functional predictors. This key difference allows our method to accommodate covariates of different types as well as nonlinear effects. (2) Our estimation approach is based on a single step penalized function-on-function regression while CM uses pointwise estimation based on functional principal component bases and thus requires fitting multiple generalized regressions. This nice feature leads to an computational advantage.


## 3. Estimation

### 3.1. Estimation via Penalized Log-Likelihood

Lety
l
:
l
=
1
,
…
,
L be a set of equally spaced points in the range of the response variable, Y
i’s. Conditioning on X
i
1
,
X
i
2
,
X
i
3
(
·
), we model Z
i
(
y
l
) as independently distributed Bernoulli variables with mean μ
i
(
y
l
), where g
μ
i
y
l
=
η
i
(
y
l
). The coefficients β
1, θ
0, θ
1, and θ
2 are estimated by minimizing the penalized log-likelihood criterion:(4)
-
2
L
β
1
,
θ
0
,
θ
1
,
θ
2
∣
Z
i
y
l
:
∀
i
,
l
+
λ
0
P
0
θ
0
+
λ
1
P
1
θ
1
+
λ
2
,
t
P
2
,
t
θ
2
+
λ
2
,
y
P
2
,
y
θ
2
,where L is the log-likelihood function of data Z
i
y
l
:
l
=
1
,
…
,
L
1
≤
i
≤
n, λ
0, λ
1, λ
2
,
t, and λ
2
,
y are smoothing parameters, which control the balance between the model fit and its complexity, and P
0
(
·
), P
1
(
·
), P
2
,
t
(
·
), and P
2
,
y
(
·
) are all penalties.There are several choices to define the penalty matrix in nonparametric regression; see Eilers and Marx [23] and Wood [26]. We use quadratic penalties which penalize the size of the curvature of the estimated coefficient functions. Let P
0
(
θ
0
)
=
∫
∂
2
β
0
(
y
)
/
∂
y
2
2
d
y
=
θ
0
T
D
0
θ
0, where D
0 is of dimension κ
0
×
κ
0 with its (
s
,
s
′
) element equal to ∫
∂
2
B
0
,
s
(
y
)
/
∂
y
2
∂
2
B
0
,
s
′
(
y
)
/
∂
y
2
d
y. Similarly, P
1
(
θ
1
)
=
∫
∂
2
β
2
(
y
)
/
∂
y
2
2
d
y
=
θ
1
T
D
1
θ
1, where D
1 is of dimension κ
1
×
κ
1 with its (
s
,
s
′
) element equal to ∫
∂
2
B
1
,
s
(
y
)
/
∂
y
2
∂
2
B
1
,
s
′
(
y
)
/
∂
y
2
d
y. As β
3
(
·
,
·
) is a bivariate function, the choice of penalty implies penalizing the size of curvature in each direction, respectively: P
2
,
t
(
θ
2
)
=
∫
∫
∂
2
β
3
(
y
,
t
)
/
∂
t
2
2
d
y
d
t
=
θ
2
T
D
2
,
t
θ
2, where D
2
,
t
=
P
2
,
t
⊗
I
κ
2
,
y is of dimension κ
2
,
y
κ
2
,
t
×
κ
2
,
y
κ
2
,
t with the (
s
,
s
′
) element of P
2
,
t equal to ∫
∂
2
B
2
,
s
t
(
t
)
/
∂
t
2
∂
2
B
2
,
s
′
t
(
t
)
/
∂
t
2
d
t for some orthonormal spline bases. Similarly, P
2
,
y
(
θ
2
)
=
∫
∫
∂
2
β
3
(
y
,
t
)
/
∂
y
2
2
d
y
d
t
=
θ
2
T
D
2
,
y
θ
2, where D
2
,
y
=
I
κ
2
,
t
⊗
P
2
,
y is of dimension κ
2
,
y
κ
2
,
t
×
κ
2
,
y
κ
2
,
t with the (
s
,
s
′
) element of P
2
,
y equal to ∫
∂
2
B
2
,
s
y
(
y
)
/
∂
y
2
∂
2
B
2
,
s
′
y
(
y
)
/
∂
y
2
d
y.Criterion (4) can be viewed as a penalized quasilikelihood (PQL) of the corresponding generalized linear mixed model(5)
Z
i
y
l
∣
β
1
,
θ
0
,
θ
1
,
θ
2
~
B
e
r
n
o
u
l
l
i
μ
i
y
l
,
l
=
1
,
…
,
L
;
θ
0
~
N
0
,
λ
0
-
1
D
0
-
;
θ
1
~
N
0
,
λ
1
-
1
D
1
-
;
θ
2
~
N
0
,
D
2
-
,where D
0
- is the generalized inverse matrix of D
0; D
1
- and D
2
-
=
(
λ
2
,
t
D
2
,
t
+
λ
2
,
y
D
2
,
y
)
- are defined similarly. Wood [26] discusses an alternative way to deal with the rank-deficient matrices in the context of restricted maximum likelihood (REML) estimation. Here we do not account for the dependence over y; see Scheipl et al. [22] for a general formulation. See also Ivanescu et al. [27] who use the mixed model representation of a similar regression model to (5), but with a Gaussian functional response. The smoothing parameters are estimated using REML.


### 3.2. Extension to Nonlinear Model

One advantage of the proposed framework is that it can be easily extended to allow for more flexible effects, i.e., extending the ideas to accommodate multiple covariates, scalar or functional, and varied types of effects. In particular, the smooth effectX
i
2
β
2
(
y
) can be replaced by h
1
(
X
i
2
,
y
) and ∫
X
i
3
(
t
)
β
3
(
t
,
y
)
d
t by ∫
h
2
X
i
3
t
,
t
,
y
d
t, where h
1
(
·
,
·
) and h
2
(
·
,
·
,
·
) are unknown bivariate and trivariate smooth functions, respectively; see Scheipl et al. [22] and Kim et al. [28]. These changes require little additional computational effort. The modeling and estimation follow roughly similar ideas as Scheipl et al. [22]. We consider the nonlinear model in the simulation study for the case of having a scalar covariate only, i.e., h
1
(
X
i
,
y
), and the corresponding results are presented in Section S1.1 of the Supplementary Materials. The results show excellent prediction performance compared to the competitive nonlinear quantile regression method, namely, constrained B-spline smoothing (COBS) [29].


### 3.3. Extension to Sparse and Noisy Functional Covariates

In practice the functional covariates are often observed at irregular times across the units and the measurements are possibly corrupted by noises. In such case, one needs to first smooth and denoise the trajectories before fitting. When the sampling design of the functional covariate is dense, the common approach is to smooth each trajectory using splines or local polynomial smoothing, as proposed in Ramsay and Silverman [3] and Zhang and Chen [30]. When the design is sparse, the smoothing can be done by pooling all the subjects and following the PACE method proposed in Yao et al. [31]. As recovering the trajectories has been extensively discussed in the literatures, we do not review the procedures here. Instead, we discuss some available computing resources that can be used to fit these methods. In our numerical study, we used fpca.sc function in the refund R package [32] for recovering the latent trajectories, irrespective of a sampling design (dense or sparse). Alternatively, one can use fpca.face [33] in refund for regular dense design and face.spare [34] in the R package face [35] for irregular sparse design. Once the latent trajectories are estimated, they can be used in the fitting criterion (4).


### 3.4. Estimation of Conditional Quantile

Letβ
^
1, θ
^
0, θ
^
1, and θ
^
2 be parameter estimates in (5). It follows that the estimated distribution function F
^
Y
i
∣
X
i
1
,
X
i
2
,
X
i
3
(
·
)
(
y
) can be obtained by plugging in the estimated coefficients. The τth conditional quantile is estimated by inverting the estimated distribution, i.e., Q
^
Y
i
∣
X
i
1
,
X
i
2
,
X
i
3
·
(
τ
)
=
inf
⁡
y
:
F
^
Y
i
∣
X
i
1
,
X
i
2
,
X
i
3
(
·
)
(
y
)
≥
τ. The estimated distribution function is not a monotonic function yet. In practice we suggest to first apply a monotonization method as described in Section 3.5 and then estimate the conditional quantiles by inverting the resulting estimated distribution.


### 3.5. Monotonization and Implementation

While a conditional quantile function is nondecreasing, the resulting estimated quantiles may not be. Two approaches are widely used: one is to monotonize the estimated conditional distribution function and the other is to monotonize the estimated conditional quantile function. We choose the former asF
^
Y
i
∣
X
i
1
,
X
i
2
,
X
i
3
(
·
)
(
y
) is readily available at dense grid points y
l’s. We use an isotonic regression model [36] for monotonization, which imposes an order restriction; this is done by using the R function isoreg. Other monotonization approaches include Chernozhukov et al. [37], which was employed in Kato [16].Our approach is implemented by first creating an artificial binary response and then fitting a penalized function-on-function regression model and using the logit link function. Fitting models in (4) can be done by extending the ideas of Ivanescu et al. [27] for Gaussian functional response; the extension of the model to the non-Gaussian functional response has recently been studied and implemented by Scheipl et al. [22] as the pffr function in refund package [32].


## 3.1. Estimation via Penalized Log-Likelihood

Lety
l
:
l
=
1
,
…
,
L be a set of equally spaced points in the range of the response variable, Y
i’s. Conditioning on X
i
1
,
X
i
2
,
X
i
3
(
·
), we model Z
i
(
y
l
) as independently distributed Bernoulli variables with mean μ
i
(
y
l
), where g
μ
i
y
l
=
η
i
(
y
l
). The coefficients β
1, θ
0, θ
1, and θ
2 are estimated by minimizing the penalized log-likelihood criterion:(4)
-
2
L
β
1
,
θ
0
,
θ
1
,
θ
2
∣
Z
i
y
l
:
∀
i
,
l
+
λ
0
P
0
θ
0
+
λ
1
P
1
θ
1
+
λ
2
,
t
P
2
,
t
θ
2
+
λ
2
,
y
P
2
,
y
θ
2
,where L is the log-likelihood function of data Z
i
y
l
:
l
=
1
,
…
,
L
1
≤
i
≤
n, λ
0, λ
1, λ
2
,
t, and λ
2
,
y are smoothing parameters, which control the balance between the model fit and its complexity, and P
0
(
·
), P
1
(
·
), P
2
,
t
(
·
), and P
2
,
y
(
·
) are all penalties.There are several choices to define the penalty matrix in nonparametric regression; see Eilers and Marx [23] and Wood [26]. We use quadratic penalties which penalize the size of the curvature of the estimated coefficient functions. Let P
0
(
θ
0
)
=
∫
∂
2
β
0
(
y
)
/
∂
y
2
2
d
y
=
θ
0
T
D
0
θ
0, where D
0 is of dimension κ
0
×
κ
0 with its (
s
,
s
′
) element equal to ∫
∂
2
B
0
,
s
(
y
)
/
∂
y
2
∂
2
B
0
,
s
′
(
y
)
/
∂
y
2
d
y. Similarly, P
1
(
θ
1
)
=
∫
∂
2
β
2
(
y
)
/
∂
y
2
2
d
y
=
θ
1
T
D
1
θ
1, where D
1 is of dimension κ
1
×
κ
1 with its (
s
,
s
′
) element equal to ∫
∂
2
B
1
,
s
(
y
)
/
∂
y
2
∂
2
B
1
,
s
′
(
y
)
/
∂
y
2
d
y. As β
3
(
·
,
·
) is a bivariate function, the choice of penalty implies penalizing the size of curvature in each direction, respectively: P
2
,
t
(
θ
2
)
=
∫
∫
∂
2
β
3
(
y
,
t
)
/
∂
t
2
2
d
y
d
t
=
θ
2
T
D
2
,
t
θ
2, where D
2
,
t
=
P
2
,
t
⊗
I
κ
2
,
y is of dimension κ
2
,
y
κ
2
,
t
×
κ
2
,
y
κ
2
,
t with the (
s
,
s
′
) element of P
2
,
t equal to ∫
∂
2
B
2
,
s
t
(
t
)
/
∂
t
2
∂
2
B
2
,
s
′
t
(
t
)
/
∂
t
2
d
t for some orthonormal spline bases. Similarly, P
2
,
y
(
θ
2
)
=
∫
∫
∂
2
β
3
(
y
,
t
)
/
∂
y
2
2
d
y
d
t
=
θ
2
T
D
2
,
y
θ
2, where D
2
,
y
=
I
κ
2
,
t
⊗
P
2
,
y is of dimension κ
2
,
y
κ
2
,
t
×
κ
2
,
y
κ
2
,
t with the (
s
,
s
′
) element of P
2
,
y equal to ∫
∂
2
B
2
,
s
y
(
y
)
/
∂
y
2
∂
2
B
2
,
s
′
y
(
y
)
/
∂
y
2
d
y.Criterion (4) can be viewed as a penalized quasilikelihood (PQL) of the corresponding generalized linear mixed model(5)
Z
i
y
l
∣
β
1
,
θ
0
,
θ
1
,
θ
2
~
B
e
r
n
o
u
l
l
i
μ
i
y
l
,
l
=
1
,
…
,
L
;
θ
0
~
N
0
,
λ
0
-
1
D
0
-
;
θ
1
~
N
0
,
λ
1
-
1
D
1
-
;
θ
2
~
N
0
,
D
2
-
,where D
0
- is the generalized inverse matrix of D
0; D
1
- and D
2
-
=
(
λ
2
,
t
D
2
,
t
+
λ
2
,
y
D
2
,
y
)
- are defined similarly. Wood [26] discusses an alternative way to deal with the rank-deficient matrices in the context of restricted maximum likelihood (REML) estimation. Here we do not account for the dependence over y; see Scheipl et al. [22] for a general formulation. See also Ivanescu et al. [27] who use the mixed model representation of a similar regression model to (5), but with a Gaussian functional response. The smoothing parameters are estimated using REML.


## 3.2. Extension to Nonlinear Model

One advantage of the proposed framework is that it can be easily extended to allow for more flexible effects, i.e., extending the ideas to accommodate multiple covariates, scalar or functional, and varied types of effects. In particular, the smooth effectX
i
2
β
2
(
y
) can be replaced by h
1
(
X
i
2
,
y
) and ∫
X
i
3
(
t
)
β
3
(
t
,
y
)
d
t by ∫
h
2
X
i
3
t
,
t
,
y
d
t, where h
1
(
·
,
·
) and h
2
(
·
,
·
,
·
) are unknown bivariate and trivariate smooth functions, respectively; see Scheipl et al. [22] and Kim et al. [28]. These changes require little additional computational effort. The modeling and estimation follow roughly similar ideas as Scheipl et al. [22]. We consider the nonlinear model in the simulation study for the case of having a scalar covariate only, i.e., h
1
(
X
i
,
y
), and the corresponding results are presented in Section S1.1 of the Supplementary Materials. The results show excellent prediction performance compared to the competitive nonlinear quantile regression method, namely, constrained B-spline smoothing (COBS) [29].


## 3.3. Extension to Sparse and Noisy Functional Covariates

In practice the functional covariates are often observed at irregular times across the units and the measurements are possibly corrupted by noises. In such case, one needs to first smooth and denoise the trajectories before fitting. When the sampling design of the functional covariate is dense, the common approach is to smooth each trajectory using splines or local polynomial smoothing, as proposed in Ramsay and Silverman [3] and Zhang and Chen [30]. When the design is sparse, the smoothing can be done by pooling all the subjects and following the PACE method proposed in Yao et al. [31]. As recovering the trajectories has been extensively discussed in the literatures, we do not review the procedures here. Instead, we discuss some available computing resources that can be used to fit these methods. In our numerical study, we used fpca.sc function in the refund R package [32] for recovering the latent trajectories, irrespective of a sampling design (dense or sparse). Alternatively, one can use fpca.face [33] in refund for regular dense design and face.spare [34] in the R package face [35] for irregular sparse design. Once the latent trajectories are estimated, they can be used in the fitting criterion (4).


## 3.4. Estimation of Conditional Quantile

Letβ
^
1, θ
^
0, θ
^
1, and θ
^
2 be parameter estimates in (5). It follows that the estimated distribution function F
^
Y
i
∣
X
i
1
,
X
i
2
,
X
i
3
(
·
)
(
y
) can be obtained by plugging in the estimated coefficients. The τth conditional quantile is estimated by inverting the estimated distribution, i.e., Q
^
Y
i
∣
X
i
1
,
X
i
2
,
X
i
3
·
(
τ
)
=
inf
⁡
y
:
F
^
Y
i
∣
X
i
1
,
X
i
2
,
X
i
3
(
·
)
(
y
)
≥
τ. The estimated distribution function is not a monotonic function yet. In practice we suggest to first apply a monotonization method as described in Section 3.5 and then estimate the conditional quantiles by inverting the resulting estimated distribution.


## 3.5. Monotonization and Implementation

While a conditional quantile function is nondecreasing, the resulting estimated quantiles may not be. Two approaches are widely used: one is to monotonize the estimated conditional distribution function and the other is to monotonize the estimated conditional quantile function. We choose the former asF
^
Y
i
∣
X
i
1
,
X
i
2
,
X
i
3
(
·
)
(
y
) is readily available at dense grid points y
l’s. We use an isotonic regression model [36] for monotonization, which imposes an order restriction; this is done by using the R function isoreg. Other monotonization approaches include Chernozhukov et al. [37], which was employed in Kato [16].Our approach is implemented by first creating an artificial binary response and then fitting a penalized function-on-function regression model and using the logit link function. Fitting models in (4) can be done by extending the ideas of Ivanescu et al. [27] for Gaussian functional response; the extension of the model to the non-Gaussian functional response has recently been studied and implemented by Scheipl et al. [22] as the pffr function in refund package [32].


## 4. Simulation Study

### 4.1. Simulation Setting

In this section we evaluate the empirical performance of the proposed method. We present results for the case when we have both functional and scalar covariates; additional results when there is only a single scalar or a single functional covariate are discussed in the Supplementary Materials, SectionS1.Suppose the observed data for theith subject are Y
i
,
X
1
i
,
W
i
1
,
t
i
1
,
…
,
W
i
m
i
,
t
i
m
i, t
i
j
∈
[
0,10
], where X
1
i
~
i
.
i
.
d
U
n
i
f
(
-
16,16
), W
i
j
=
X
2
i
(
t
i
j
)
+
ϵ
i
j for 1
≤
i
≤
n
,
1
≤
j
≤
m
i. Let X
2
i
(
t
i
j
)
=
μ
(
t
i
j
)
+
∑
k
=
1
4
ξ
i
k
ϕ
k
(
t
i
j
)
+
ϵ
i
j, where μ
(
t
)
=
t
+
sin
⁡
(
t
), ϕ
k
(
t
)
=
cos
⁡
(
k
+
1
)
π
t
/
10
/
5 for odd values of k, ϕ
k
(
t
)
=
sin
⁡
k
π
t
/
10
/
5 for even values of k, ξ
i
k
~
i
i
d
N
(
0
,
λ
k
), (
λ
1
,
λ
2
,
λ
3
,
λ
4
)
=
{
16,9
,
7.56,5.06
}, and ϵ
i
j
~
i
i
d
N
(
0
,
σ
ϵ
2
). We assume three cases for generating response Y
i:(i)
Gaussian:Y
i
∣
X
1
i
,
X
2
i
(
·
)
~
N
(
2
∫
X
2
i
(
t
)
β
(
t
)
d
t
+
2
X
1
i
,
5
2
); this corresponds to the quantile regression model Q
Y
∣
X
1
,
X
2
(
·
)
(
τ
)
=
2
∫
X
2
i
(
t
)
β
(
t
)
d
t
+
2
X
1
i
+
5
Φ
-
1
(
τ
), where Φ
(
·
) is the distribution function of the standard normal;
(ii)
Mixture of Gaussians:Y
i
∣
X
1
i
,
X
2
i
(
·
)
~
0.5
N
(
∫
X
2
i
(
t
)
β
(
t
)
d
t
+
X
1
i
,
1
2
) + 0.5
N
(
3
∫
X
2
i
(
t
)
β
(
t
)
d
t
+
3
X
1
i
,
4
2
), where the true quantiles can be approximated numerically by using qnorMix function in the R package norMix;
(iii)
Gaussian with heterogeneous error:Y
i
∣
X
1
i
,
X
2
i
(
·
)
~
N
(
2
∫
X
2
i
(
t
)
β
(
t
)
d
t
+
2
X
1
i
,
5
2
∫
X
2
i
(
t
)
2
d
t
/
∑
k
=
1
4
λ
k
); the true quantiles are given by Q
Y
∣
X
1
,
X
2
(
·
)
(
τ
) = 2
∫
X
2
i
(
t
)
β
(
t
)
d
t
+
2
X
1
i + 5
∫
X
2
i
(
t
)
2
d
t
/
∑
k
=
1
4
λ
k
Φ
-
1
(
τ
).Letβ
(
t
)
=
∑
k
=
1
4
β
k
ϕ
k
(
t
), where β
k
=
1 for k
=
1
,
…
,
4.For each case, we use different combinations of signal to noise ratio (SNR), sample size, and sampling designs to generate500 simulated datasets. We define SNR as ∑
k
=
1
4
λ
k
/
σ
ϵ, and we consider five levels of noise: S
N
R
=
150,10,5
,
2,1. Two levels of sample size are n
=
100 and n
=
1000. Two sampling designs are considered: (i)sparse design, where t
i
j
:
j
=
1
,
…
,
m are m
=
15 randomly selected points from a set of 30 equispaced grids in [
0,10
]; and (ii)dense design, where the sampling points t
i
j
=
t
j
:
j
=
1
,
…
,
m are m
=
30 equispaced time points in [
0,10
].The performance is evaluated on a test set of100 subjects, for which we have X
1
i
∗
,
W
i
∗
j
,
t
i
∗
j
,
j
=
1
,
…
,
m available, in terms of mean absolute error (MAE) for quantile levels τ
=
0.05,0.1,0.25, and 0.5: (6)
M
A
E
τ
=
1
100
∑
i
∗
=
1
100
Q
^
i
∗
τ
-
Q
i
∗
τ
.


### 4.2. Competing Methods

We denote the proposed method by Joint QR to emphasize the single step estimation approach. We compare our method with two alternative approaches: (1) a variant of our proposed approach using pointwise estimation, denoted by Pointwise QR. This approach consists of fitting multiple regression models with binomial link function as implemented by the penalized functional regressionpfr, developed by Goldsmith et al. [7], of the refund package for generalized scalar responses; (2) a modified version of the CM method, denoted by Mod CM, that we developed to account for additional scalar covariates and which fits multiple generalized linear models with scalar covariates and fPC scores as predictors; (3) a linear quantile regression approach using the quantile loss function and the partial quantile regression bases for functional covariates, proposed by Yu et al. [19] and denoted by PQR. Notice that although the formulation of the first two methods implicitly accounts for a varying effect of the covariates on the response distribution, they do not ensure that this effect is smooth. The third approach can only estimate a specific quantile rather than the entire conditional distribution. Note that all the competing methods are monotonized for a fair comparison.TheR function pfr can incorporate both scalar/vector and functional predictors by adopting a mixed effects model framework. The functional covariates are presmoothed by fPC analysis [31]. Throughout the simulation study we fix PVE as 0.95 for fPC analysis to determine the number of principal components and use REML to select the smoothing parameters for our proposed methods. Other basis settings are set to their default values. We use 100 equally distanced points between the minimum and maximum of the observed Y
i’s to set the grid y
l
:
l
=
1
,
…
,
L for the conditional distribution function.


### 4.3. Simulation Results

Tables1 and 2 show the accuracy of the quantile prediction for the two cases (normal and mixture) when the functional covariate is observed sparsely and the sample size is n
=
100 (Table 1) and n
=
1000 (Table 2). Table 3 presents the prediction accuracy for the case of heteroskedasticity with sparsely observed functional covariates. The results based on dense sampling design show similar patterns and thus are relegated to the supplement; see Section S1.3. The comparison of running times is presented in Table 4.Table 1
Average MAE (standard error in parentheses) of the predictedτ-level quantile for the case of having a scalar covariate and a sparsely observed functional covariate. Sample size n
=
100.
Distribution
SNR
Method
τ
=
0.05
τ
=
0.1
τ
=
0.25
τ
=
0.5
Normal
150
Joint QR
3.67 (0.03)
3.53 (0.03)
3.30 (0.02)
3.17 (0.02)
Pointwise QR
4.96 (0.03)
4.61 (0.03)
4.22 (0.02)
4.18 (0.02)
Mod CM
6.04 (0.03)
5.81 (0.03)
5.55 (0.03)
5.14 (0.03)
PQR
3.17 (0.04)
2.71 (0.03)
2.31 (0.02)
2.16 (0.02)
Normal
10
Joint QR
6.32 (0.03)
6.00 (0.03)
5.76 (0.02)
5.73 (0.02)
Pointwise QR
7.44 (0.04)
6.85 (0.03)
6.39 (0.03)
6.28 (0.03)
Mod CM
8.20 (0.04)
8.10 (0.04)
8.04 (0.04)
8.01 (0.04)
PQR
6.82 (0.05)
6.11 (0.04)
5.34 (0.03)
5.09 (0.02)
Normal
5
Joint QR
7.84 (0.04)
7.34 (0.03)
6.93 (0.03)
6.84 (0.03)
Pointwise QR
8.91 (0.04)
8.12 (0.04)
7.45 (0.03)
7.26 (0.03)
Mod CM
9.34 (0.04)
9.23 (0.04)
9.14 (0.05)
9.06 (0.05)
PQR
8.68 (0.06)
7.81 (0.05)
6.74 (0.03)
6.34 (0.02)
Normal
2
Joint QR
10.05 (0.05)
9.22 (0.04)
8.47 (0.03)
8.28 (0.03)
Pointwise QR
10.91 (0.06)
9.86 (0.04)
8.87 (0.04)
8.54 (0.03)
Mod CM
10.85 (0.05)
10.55 (0.05)
10.34 (0.06)
10.21 (0.06)
PQR
11.21 (0.08)
10.03 (0.06)
8.56 (0.04)
7.96 (0.03)
Normal
1
Joint QR
11.50 (0.06)
10.41 (0.05)
9.40 (0.04)
9.11 (0.03)
Pointwise QR
12.12 (0.06)
10.88 (0.05)
9.70 (0.04)
9.30 (0.03)
Mod CM
11.95 (0.06)
11.46 (0.06)
11.07 (0.06)
11.05 (0.07 )
PQR
12.82 (0.08)
11.38 (0.06)
9.60 (0.04)
8.86 (0.03)
Mixture
150
Joint QR
6.92 (0.06)
6.23 (0.06)
6.16 (0.06)
4.81 (0.06)
Pointwise QR
8.10 (0.08)
6.80 (0.06)
6.66 (0.06)
5.25 (0.06)
Mod CM
9.18 (0.07)
8.99 (0.07)
8.93 (0.07)
7.90 (0.07)
PQR
8.43 (0.06)
7.18 (0.04)
6.22 (0.04)
5.48 (0.14)
Mixture
10
Joint QR
9.02 (0.06)
7.95 (0.05)
7.85 (0.05)
6.19 (0.06)
Pointwise QR
10.11 (0.07)
8.52 (0.05)
7.95 (0.05)
6.42 (0.06)
Mod CM
11.33 (0.07)
10.95 (0.07)
10.79 (0.07)
9.80 (0.08)
PQR
10.72 (0.08)
8.99 (0.05)
7.63 (0.04)
5.33 (0.09)
Mixture
5
Joint QR
10.18 (0.06)
8.91 (0.05)
8.53 (0.05)
6.82 (0.05)
Pointwise QR
11.18 (0.07)
9.38 (0.05)
8.58 (0.05)
6.98 (0.05)
Mod CM
12.19 (0.07)
11.75 (0.07)
11.52 (0.07)
10.47 (0.08)
PQR
12.12 (0.09)
10.12 (0.06)
8.40 (0.04)
5.73 (0.07)
Mixture
2
Joint QR
11.93 (0.07)
10.26 (0.05)
9.46 (0.05)
7.61 (0.05)
Pointwise QR
12.68 (0.08)
10.63 (0.06)
9.51 (0.05)
7.70 (0.05)
Mod CM
13.33 (0.08)
12.60 (0.08)
12.27 (0.08)
11.08 (0.10)
PQR
14.16 (0.10)
11.72 (0.06)
9.55 (0.04)
6.41 (0.05)
Mixture
1
Joint QR
13.17 (0.08)
11.19 (0.05)
10.06 (0.05)
8.04 (0.05)
Pointwise QR
13.71 (0.09)
11.44 (0.06)
10.10 (0.05)
8.13 (0.05)
Mod CM
14.16 (0.08)
13.22 (0.08)
12.71 (0.09)
11.44 (0.11)
PQR
15.44 (0.11)
12.84 (0.07)
10.23 (0.04)
6.89 (0.04)Table 2
Average MAE (standard error in parentheses) of the predictedτ-level quantile for the case of having a scalar covariate and a sparsely observed functional covariate. Sample size n
=
1000.
Distribution
SNR
Method
τ
=
0.05
τ
=
0.1
τ
=
0.25
τ
=
0.5
Normal
150
Joint QR
1.68 (0.01)
1.65 (0.01)
1.62 (0.01)
1.60 (0.01)
Pointwise QR
1.94 (0.01)
1.92 (0.01)
1.88 (0.01)
1.81 (0.01)
Mod CM
1.93 (0.01)
1.88 (0.01)
1.87 (0.01)
1.87 (0.01)
PQR
1.72 (0.01)
1.61 (0.01)
1.51 (0.01)
1.48 (0.01)
Normal
10
Joint QR
5.45 (0.02)
4.97 (0.02)
4.66 (0.02)
4.65 (0.02)
Pointwise QR
5.64 (0.02)
5.13 (0.02)
4.78 (0.02)
4.75 (0.02)
Mod CM
5.69 (0.02)
5.21 (0.02)
4.87 (0.02)
4.85 (0.02)
PQR
5.85 (0.02)
5.37 (0.02)
4.81 (0.02)
4.60 (0.02)
Normal
5
Joint QR
7.34 (0.03)
6.54 (0.02)
5.94 (0.02)
5.85 (0.02)
Pointwise QR
7.53 (0.03)
6.69 (0.02)
6.04 (0.02)
5.94 (0.02)
Mod CM
7.53 (0.03)
6.77 (0.02)
6.18 (0.02)
6.06 (0.02)
PQR
7.84 (0.03)
7.05 (0.02)
6.16 (0.02)
5.81 (0.02)
Normal
2
Joint QR
9.97 (0.03)
8.70 (0.03)
7.62 (0.02)
7.38 (0.02)
Pointwise QR
10.15 (0.03)
8.85 (0.03)
7.71 (0.02)
7.45 (0.02)
Mod CM
10.12 (0.03)
8.93 (0.03)
7.87 (0.03)
7.60 (0.03)
PQR
10.55 (0.04)
9.34 (0.03)
7.91 (0.03)
7.34 (0.02)
Normal
1
Joint QR
11.69 (0.04)
10.10 (0.03)
8.68 (0.03)
8.32 (0.03)
Pointwise QR
11.88 (0.04)
10.25 (0.04)
8.77 (0.03)
8.39 (0.03)
Mod CM
11.85 (0.04)
10.37 (0.04)
8.96 (0.03)
8.57 (0.03)
PQR
12.29 (0.04)
10.77 (0.04)
9.02 (0.03)
8.29 (0.03)
Mixture
150
Joint QR
4.56 (0.02)
4.44 (0.02)
4.33 (0.03)
3.68 (0.03)
Pointwise QR
4.34 (0.03)
4.24 (0.02)
4.20 (0.03)
3.66 (0.04)
Mod CM
4.68 (0.03)
4.59 (0.02)
4.38 (0.03)
4.01 (0.03)
PQR
7.84 (0.03)
6.45 (0.02)
5.29 (0.02)
3.19 (0.01)
Mixture
10
Joint QR
7.56 (0.03)
6.79 (0.02)
6.14 (0.03)
5.02 (0.03)
Pointwise QR
7.49 (0.03)
6.61 (0.02)
5.88 (0.03)
5.02 (0.03)
Mod CM
7.67 (0.04)
6.97 (0.03)
6.17 (0.03)
5.52 (0.04)
PQR
10.11 (0.04)
8.29 (0.03)
6.71 (0.02)
3.62 (0.02)
Mixture
5
Joint QR
9.20 (0.04)
7.13 (0.03)
6.94 (0.03)
5.6 (0.03)
Pointwise QR
9.17 (0.04)
7.01 (0.03)
6.71 (0.03)
5.58 (0.03)
Mod CM
9.32 (0.04)
7.37 (0.03)
7.08 (0.03)
6.18 (0.04)
PQR
11.46 (0.04)
9.36 (0.03)
7.49 (0.03)
4.32 (0.02)
Mixture
2
Joint QR
11.57 (0.05)
9.02 (0.03)
8.05 (0.03)
6.35 (0.03)
Pointwise QR
11.58 (0.05)
8.98 (0.04)
7.90 (0.03)
6.31 (0.03)
Mod CM
11.69 (0.05)
9.38 (0.04)
8.38 (0.04)
7.01 (0.04)
PQR
13.49 (0.05)
10.95 (0.04)
8.61 (0.03)
5.32 (0.02)
Mixture
1
Joint QR
13.18 (0.05)
10.31 (0.04)
8.79 (0.04)
6.79 (0.03)
Pointwise QR
13.21 (0.05)
10.28 (0.04)
8.69 (0.04)
6.73 (0.03)
Mod CM
13.26 (0.05)
10.67 (0.04)
9.21 (0.04)
7.47 (0.04)
PQR
14.93 (0.06)
12.05 (0.04)
9.35 (0.04)
5.96 (0.02)Table 3
Average MAE (standard error in parentheses) of the predictedτ-level quantile for the case of heteroskedasticity with a scalar covariate and a sparsely observed functional covariate.
Sample size
SNR
Method
τ
=
0.05
τ
=
0.1
τ
=
0.25
τ
=
0.5
100
150
Joint QR
4.41 (0.03)
3.99 (0.02)
3.48 (0.02)
3.25 (0.02)
Pointwise QR
5.40 (0.03)
4.84 (0.03)
4.26 (0.02)
4.21 (0.03)
Mod CM
6.00 (0.03)
5.71 (0.03)
5.42 (0.03)
5.39 (0.03)
PQR
4.38 (0.05)
3.43 (0.03)
2.52 (0.02)
2.14 (0.02)
100
10
Joint QR
6.93 (0.03)
6.40 (0.03)
5.89 (0.02)
5.76 (0.02)
Pointwise QR
7.94 (0.04)
7.20 (0.03)
6.48 (0.03)
6.30 (0.03)
Mod CM
8.41 (0.04)
8.22 (0.04)
8.13 (0.04)
8.05 (0.04)
PQR
7.76 (0.06)
6.57 (0.04)
5.47 (0.03)
5.08 (0.02)
100
5
Joint QR
8.44 (0.04)
7.72 (0.03)
7.05 (0.03)
6.86 (0.03)
Pointwise QR
9.44 (0.05)
8.50 (0.04)
7.57 (0.03)
7.26 (0.03)
Mod CM
9.65 (0.05)
9.40 (0.05)
9.36 (0.05)
9.26 (0.05)
PQR
9.51 (0.07)
8.25 (0.05)
6.87 (0.03)
6.33 (0.02)
100
2
Joint QR
10.68 (0.05)
9.63 (0.04)
8.60 (0.03)
8.30 (0.03)
Pointwise QR
11.55 (0.06)
10.29 (0.05)
9.00 (0.04)
8.54 (0.03)
Mod CM
11.27 (0.05)
10.80 (0.05)
10.43 (0.05)
10.40 (0.06)
PQR
12.07 (0.08)
10.53 (0.06)
8.66 (0.04)
7.92 (0.03)
100
1
Joint QR
12.23 (0.06)
10.91 (0.05)
9.54 (0.04)
9.11 (0.03)
Pointwise QR
12.87 (0.07)
11.39 (0.05)
9.85 (0.04)
9.29 (0.03)
Mod CM
12.43 (0.06)
11.80 (0.06)
11.19 (0.06)
11.09 (0.07)
PQR
13.70 (0.09)
11.91 (0.06)
9.70 (0.04)
8.84 (0.03)
1000
150
Joint QR
2.87 (0.01)
2.42 (0.01)
1.89 (0.01)
1.65 (0.01)
Pointwise QR
3.06 (0.01)
2.60 (0.01)
2.07 (0.01)
1.86 (0.01)
Mod CM
3.13 (0.01)
2.65 (0.01)
2.10 (0.01)
1.91 (0.01)
PQR
3.10 (0.01)
2.47 (0.01)
1.78 (0.01)
1.48 (0.01)
1000
10
Joint QR
6.21 (0.02)
5.45 (0.02)
4.79 (0.02)
4.66 (0.02)
Pointwise QR
6.38 (0.02)
5.59 (0.02)
4.90 (0.02)
4.77 (0.02)
Mod CM
6.46 (0.02)
5.70 (0.02)
5.01 (0.02)
4.86 (0.02)
PQR
6.68 (0.03)
5.82 (0.02)
4.92 (0.02)
4.60 (0.02)
1000
5
Joint QR
8.08 (0.03)
7.01 (0.02)
6.07 (0.02)
5.85 (0.02)
Pointwise QR
8.27 (0.03)
7.15 (0.02)
6.16 (0.02)
5.94 (0.02)
Mod CM
8.30 (0.03)
7.26 (0.02)
6.31 (0.02)
6.08 (0.02)
PQR
8.64 (0.03)
7.50 (0.03)
6.27 (0.02)
5.81 (0.02)
1000
2
Joint QR
10.76 (0.03)
9.21 (0.03)
7.76 (0.02)
7.38 (0.02)
Pointwise QR
10.95 (0.04)
9.34 (0.03)
7.85 (0.03)
7.45 (0.02)
Mod CM
10.92 (0.03)
9.45 (0.03)
8.01 (0.03)
7.60 (0.03)
PQR
11.38 (0.04)
9.79 (0.03)
8.03 (0.03)
7.34 (0.02)
1000
1
Joint QR
12.54 (0.04)
10.65 (0.03)
8.83 (0.03)
8.32 (0.03)
Pointwise QR
12.74 (0.04)
10.81 (0.04)
8.92 (0.03)
8.39 (0.03)
Mod CM
12.70 (0.04)
10.91 (0.04)
9.10 (0.03)
8.56 (0.03)
PQR
13.16 (0.05)
11.26 (0.04)
9.13 (0.03)
8.29 (0.03)Table 4
Average computing time (in seconds) of the three approaches that involve estimating the conditional distribution for the case of having a scalar covariate and a densely observed functional covariate.
Distribution
Method
n
=
100
n
=
1000
Normal
Joint QR
12
133
Pointwise QR
148
271
Mod CM
278
511
Mixture
Joint QR
13
154
Pointwise QR
151
296
Mod CM
327
532For the case when the response is Gaussian, Tables1 and 2 suggest that the Joint QR typically outperforms its competitors especially for lower quantile levels (τ
=
0.05 and τ
=
0.1). For very small noise level (SNR = 150), PQR performs the best, followed closely by the proposed Joint QR. The variant Pointwise QR, which has a poorer performance, is generally better than the modified CM approach. As expected, as the sample size increases (n
=
1000), all the accuracy results improve; the proposed Joint QR continues to yield most accurate quantiles for the low quantile levels. For mixture of Gaussians, the results are somewhat similar. The accuracy of the quantile estimators with the Pointwise QR improves greatly; in fact the Joint QR and Pointwise QR outperform the other approaches for quantile levels τ
=
0.05,0.1,0.25 irrespective of the SNR. Finally, Table 3 shows that the results for Gaussian with heterogeneous error are close to those for the case of Gaussian. Again, the proposed method has competitive performance in terms of prediction accuracy.Table4 compares the three methods that involve estimating the conditional distribution in terms of the running time required for fitting. The times are reported based on a computer with a 2.3 GHz CPU and 8 GB of RAM. Not surprisingly by fitting the model a single time, Joint QR is the fastest, in some cases being order of magnitude faster than the rest. Pointwise QR can be up to twice as fast as Mod CM.For completeness, we also compare our proposed method to the appropriate competitive methods for the cases (1) when there is a single scalar covariate and (2) when there is a single functional covariate. In the Supplementary Materials, SectionS1.1 discusses the former case and compares Joint QR and Pointwise QR with the linear quantile regression (LQR) [12], implemented by rq function in the R package quantreg, and the constrained B-splines nonparametric regression quantiles (COBS), implemented by the cobs function in the R package COBS [29], in an extensive simulation experiment that involves both linear quantile settings and nonlinear quantile settings. Overall the results show that the proposed methods have similar behavior as LQR; see Table S1. Furthermore we consider the proposed method and its variant with nonlinear modeling of the conditional distribution as discussed in Section 3.2, which we denote with Joint QR (NL) for joint fitting and Pointwise QR (NL) for pointwise fitting. Nonlinear versions of the proposed methods have an excellent MAE performance, which is comparable to or better than that of the COBS method.Finally, SectionS1.2 in the Supplementary Materials discusses the simulation study for the case of having a single functional covariate and compares the proposed methods with CM in terms of MAE as well as computation time; see results displayed in Tables S2 and S3. The results show that the proposed Joint QR is comparable to CM in terms of the prediction accuracy and has less computation time. In our simulation study we also consider the joint fitting of the model by treating the binary response as normal and use pffr [27] with Gaussian link, denoted by Joint QR (G).


## 4.1. Simulation Setting

In this section we evaluate the empirical performance of the proposed method. We present results for the case when we have both functional and scalar covariates; additional results when there is only a single scalar or a single functional covariate are discussed in the Supplementary Materials, SectionS1.Suppose the observed data for theith subject are Y
i
,
X
1
i
,
W
i
1
,
t
i
1
,
…
,
W
i
m
i
,
t
i
m
i, t
i
j
∈
[
0,10
], where X
1
i
~
i
.
i
.
d
U
n
i
f
(
-
16,16
), W
i
j
=
X
2
i
(
t
i
j
)
+
ϵ
i
j for 1
≤
i
≤
n
,
1
≤
j
≤
m
i. Let X
2
i
(
t
i
j
)
=
μ
(
t
i
j
)
+
∑
k
=
1
4
ξ
i
k
ϕ
k
(
t
i
j
)
+
ϵ
i
j, where μ
(
t
)
=
t
+
sin
⁡
(
t
), ϕ
k
(
t
)
=
cos
⁡
(
k
+
1
)
π
t
/
10
/
5 for odd values of k, ϕ
k
(
t
)
=
sin
⁡
k
π
t
/
10
/
5 for even values of k, ξ
i
k
~
i
i
d
N
(
0
,
λ
k
), (
λ
1
,
λ
2
,
λ
3
,
λ
4
)
=
{
16,9
,
7.56,5.06
}, and ϵ
i
j
~
i
i
d
N
(
0
,
σ
ϵ
2
). We assume three cases for generating response Y
i:(i)
Gaussian:Y
i
∣
X
1
i
,
X
2
i
(
·
)
~
N
(
2
∫
X
2
i
(
t
)
β
(
t
)
d
t
+
2
X
1
i
,
5
2
); this corresponds to the quantile regression model Q
Y
∣
X
1
,
X
2
(
·
)
(
τ
)
=
2
∫
X
2
i
(
t
)
β
(
t
)
d
t
+
2
X
1
i
+
5
Φ
-
1
(
τ
), where Φ
(
·
) is the distribution function of the standard normal;
(ii)
Mixture of Gaussians:Y
i
∣
X
1
i
,
X
2
i
(
·
)
~
0.5
N
(
∫
X
2
i
(
t
)
β
(
t
)
d
t
+
X
1
i
,
1
2
) + 0.5
N
(
3
∫
X
2
i
(
t
)
β
(
t
)
d
t
+
3
X
1
i
,
4
2
), where the true quantiles can be approximated numerically by using qnorMix function in the R package norMix;
(iii)
Gaussian with heterogeneous error:Y
i
∣
X
1
i
,
X
2
i
(
·
)
~
N
(
2
∫
X
2
i
(
t
)
β
(
t
)
d
t
+
2
X
1
i
,
5
2
∫
X
2
i
(
t
)
2
d
t
/
∑
k
=
1
4
λ
k
); the true quantiles are given by Q
Y
∣
X
1
,
X
2
(
·
)
(
τ
) = 2
∫
X
2
i
(
t
)
β
(
t
)
d
t
+
2
X
1
i + 5
∫
X
2
i
(
t
)
2
d
t
/
∑
k
=
1
4
λ
k
Φ
-
1
(
τ
).Letβ
(
t
)
=
∑
k
=
1
4
β
k
ϕ
k
(
t
), where β
k
=
1 for k
=
1
,
…
,
4.For each case, we use different combinations of signal to noise ratio (SNR), sample size, and sampling designs to generate500 simulated datasets. We define SNR as ∑
k
=
1
4
λ
k
/
σ
ϵ, and we consider five levels of noise: S
N
R
=
150,10,5
,
2,1. Two levels of sample size are n
=
100 and n
=
1000. Two sampling designs are considered: (i)sparse design, where t
i
j
:
j
=
1
,
…
,
m are m
=
15 randomly selected points from a set of 30 equispaced grids in [
0,10
]; and (ii)dense design, where the sampling points t
i
j
=
t
j
:
j
=
1
,
…
,
m are m
=
30 equispaced time points in [
0,10
].The performance is evaluated on a test set of100 subjects, for which we have X
1
i
∗
,
W
i
∗
j
,
t
i
∗
j
,
j
=
1
,
…
,
m available, in terms of mean absolute error (MAE) for quantile levels τ
=
0.05,0.1,0.25, and 0.5: (6)
M
A
E
τ
=
1
100
∑
i
∗
=
1
100
Q
^
i
∗
τ
-
Q
i
∗
τ
.


## 4.2. Competing Methods

We denote the proposed method by Joint QR to emphasize the single step estimation approach. We compare our method with two alternative approaches: (1) a variant of our proposed approach using pointwise estimation, denoted by Pointwise QR. This approach consists of fitting multiple regression models with binomial link function as implemented by the penalized functional regressionpfr, developed by Goldsmith et al. [7], of the refund package for generalized scalar responses; (2) a modified version of the CM method, denoted by Mod CM, that we developed to account for additional scalar covariates and which fits multiple generalized linear models with scalar covariates and fPC scores as predictors; (3) a linear quantile regression approach using the quantile loss function and the partial quantile regression bases for functional covariates, proposed by Yu et al. [19] and denoted by PQR. Notice that although the formulation of the first two methods implicitly accounts for a varying effect of the covariates on the response distribution, they do not ensure that this effect is smooth. The third approach can only estimate a specific quantile rather than the entire conditional distribution. Note that all the competing methods are monotonized for a fair comparison.TheR function pfr can incorporate both scalar/vector and functional predictors by adopting a mixed effects model framework. The functional covariates are presmoothed by fPC analysis [31]. Throughout the simulation study we fix PVE as 0.95 for fPC analysis to determine the number of principal components and use REML to select the smoothing parameters for our proposed methods. Other basis settings are set to their default values. We use 100 equally distanced points between the minimum and maximum of the observed Y
i’s to set the grid y
l
:
l
=
1
,
…
,
L for the conditional distribution function.


## 4.3. Simulation Results

Tables1 and 2 show the accuracy of the quantile prediction for the two cases (normal and mixture) when the functional covariate is observed sparsely and the sample size is n
=
100 (Table 1) and n
=
1000 (Table 2). Table 3 presents the prediction accuracy for the case of heteroskedasticity with sparsely observed functional covariates. The results based on dense sampling design show similar patterns and thus are relegated to the supplement; see Section S1.3. The comparison of running times is presented in Table 4.Table 1
Average MAE (standard error in parentheses) of the predictedτ-level quantile for the case of having a scalar covariate and a sparsely observed functional covariate. Sample size n
=
100.
Distribution
SNR
Method
τ
=
0.05
τ
=
0.1
τ
=
0.25
τ
=
0.5
Normal
150
Joint QR
3.67 (0.03)
3.53 (0.03)
3.30 (0.02)
3.17 (0.02)
Pointwise QR
4.96 (0.03)
4.61 (0.03)
4.22 (0.02)
4.18 (0.02)
Mod CM
6.04 (0.03)
5.81 (0.03)
5.55 (0.03)
5.14 (0.03)
PQR
3.17 (0.04)
2.71 (0.03)
2.31 (0.02)
2.16 (0.02)
Normal
10
Joint QR
6.32 (0.03)
6.00 (0.03)
5.76 (0.02)
5.73 (0.02)
Pointwise QR
7.44 (0.04)
6.85 (0.03)
6.39 (0.03)
6.28 (0.03)
Mod CM
8.20 (0.04)
8.10 (0.04)
8.04 (0.04)
8.01 (0.04)
PQR
6.82 (0.05)
6.11 (0.04)
5.34 (0.03)
5.09 (0.02)
Normal
5
Joint QR
7.84 (0.04)
7.34 (0.03)
6.93 (0.03)
6.84 (0.03)
Pointwise QR
8.91 (0.04)
8.12 (0.04)
7.45 (0.03)
7.26 (0.03)
Mod CM
9.34 (0.04)
9.23 (0.04)
9.14 (0.05)
9.06 (0.05)
PQR
8.68 (0.06)
7.81 (0.05)
6.74 (0.03)
6.34 (0.02)
Normal
2
Joint QR
10.05 (0.05)
9.22 (0.04)
8.47 (0.03)
8.28 (0.03)
Pointwise QR
10.91 (0.06)
9.86 (0.04)
8.87 (0.04)
8.54 (0.03)
Mod CM
10.85 (0.05)
10.55 (0.05)
10.34 (0.06)
10.21 (0.06)
PQR
11.21 (0.08)
10.03 (0.06)
8.56 (0.04)
7.96 (0.03)
Normal
1
Joint QR
11.50 (0.06)
10.41 (0.05)
9.40 (0.04)
9.11 (0.03)
Pointwise QR
12.12 (0.06)
10.88 (0.05)
9.70 (0.04)
9.30 (0.03)
Mod CM
11.95 (0.06)
11.46 (0.06)
11.07 (0.06)
11.05 (0.07 )
PQR
12.82 (0.08)
11.38 (0.06)
9.60 (0.04)
8.86 (0.03)
Mixture
150
Joint QR
6.92 (0.06)
6.23 (0.06)
6.16 (0.06)
4.81 (0.06)
Pointwise QR
8.10 (0.08)
6.80 (0.06)
6.66 (0.06)
5.25 (0.06)
Mod CM
9.18 (0.07)
8.99 (0.07)
8.93 (0.07)
7.90 (0.07)
PQR
8.43 (0.06)
7.18 (0.04)
6.22 (0.04)
5.48 (0.14)
Mixture
10
Joint QR
9.02 (0.06)
7.95 (0.05)
7.85 (0.05)
6.19 (0.06)
Pointwise QR
10.11 (0.07)
8.52 (0.05)
7.95 (0.05)
6.42 (0.06)
Mod CM
11.33 (0.07)
10.95 (0.07)
10.79 (0.07)
9.80 (0.08)
PQR
10.72 (0.08)
8.99 (0.05)
7.63 (0.04)
5.33 (0.09)
Mixture
5
Joint QR
10.18 (0.06)
8.91 (0.05)
8.53 (0.05)
6.82 (0.05)
Pointwise QR
11.18 (0.07)
9.38 (0.05)
8.58 (0.05)
6.98 (0.05)
Mod CM
12.19 (0.07)
11.75 (0.07)
11.52 (0.07)
10.47 (0.08)
PQR
12.12 (0.09)
10.12 (0.06)
8.40 (0.04)
5.73 (0.07)
Mixture
2
Joint QR
11.93 (0.07)
10.26 (0.05)
9.46 (0.05)
7.61 (0.05)
Pointwise QR
12.68 (0.08)
10.63 (0.06)
9.51 (0.05)
7.70 (0.05)
Mod CM
13.33 (0.08)
12.60 (0.08)
12.27 (0.08)
11.08 (0.10)
PQR
14.16 (0.10)
11.72 (0.06)
9.55 (0.04)
6.41 (0.05)
Mixture
1
Joint QR
13.17 (0.08)
11.19 (0.05)
10.06 (0.05)
8.04 (0.05)
Pointwise QR
13.71 (0.09)
11.44 (0.06)
10.10 (0.05)
8.13 (0.05)
Mod CM
14.16 (0.08)
13.22 (0.08)
12.71 (0.09)
11.44 (0.11)
PQR
15.44 (0.11)
12.84 (0.07)
10.23 (0.04)
6.89 (0.04)Table 2
Average MAE (standard error in parentheses) of the predictedτ-level quantile for the case of having a scalar covariate and a sparsely observed functional covariate. Sample size n
=
1000.
Distribution
SNR
Method
τ
=
0.05
τ
=
0.1
τ
=
0.25
τ
=
0.5
Normal
150
Joint QR
1.68 (0.01)
1.65 (0.01)
1.62 (0.01)
1.60 (0.01)
Pointwise QR
1.94 (0.01)
1.92 (0.01)
1.88 (0.01)
1.81 (0.01)
Mod CM
1.93 (0.01)
1.88 (0.01)
1.87 (0.01)
1.87 (0.01)
PQR
1.72 (0.01)
1.61 (0.01)
1.51 (0.01)
1.48 (0.01)
Normal
10
Joint QR
5.45 (0.02)
4.97 (0.02)
4.66 (0.02)
4.65 (0.02)
Pointwise QR
5.64 (0.02)
5.13 (0.02)
4.78 (0.02)
4.75 (0.02)
Mod CM
5.69 (0.02)
5.21 (0.02)
4.87 (0.02)
4.85 (0.02)
PQR
5.85 (0.02)
5.37 (0.02)
4.81 (0.02)
4.60 (0.02)
Normal
5
Joint QR
7.34 (0.03)
6.54 (0.02)
5.94 (0.02)
5.85 (0.02)
Pointwise QR
7.53 (0.03)
6.69 (0.02)
6.04 (0.02)
5.94 (0.02)
Mod CM
7.53 (0.03)
6.77 (0.02)
6.18 (0.02)
6.06 (0.02)
PQR
7.84 (0.03)
7.05 (0.02)
6.16 (0.02)
5.81 (0.02)
Normal
2
Joint QR
9.97 (0.03)
8.70 (0.03)
7.62 (0.02)
7.38 (0.02)
Pointwise QR
10.15 (0.03)
8.85 (0.03)
7.71 (0.02)
7.45 (0.02)
Mod CM
10.12 (0.03)
8.93 (0.03)
7.87 (0.03)
7.60 (0.03)
PQR
10.55 (0.04)
9.34 (0.03)
7.91 (0.03)
7.34 (0.02)
Normal
1
Joint QR
11.69 (0.04)
10.10 (0.03)
8.68 (0.03)
8.32 (0.03)
Pointwise QR
11.88 (0.04)
10.25 (0.04)
8.77 (0.03)
8.39 (0.03)
Mod CM
11.85 (0.04)
10.37 (0.04)
8.96 (0.03)
8.57 (0.03)
PQR
12.29 (0.04)
10.77 (0.04)
9.02 (0.03)
8.29 (0.03)
Mixture
150
Joint QR
4.56 (0.02)
4.44 (0.02)
4.33 (0.03)
3.68 (0.03)
Pointwise QR
4.34 (0.03)
4.24 (0.02)
4.20 (0.03)
3.66 (0.04)
Mod CM
4.68 (0.03)
4.59 (0.02)
4.38 (0.03)
4.01 (0.03)
PQR
7.84 (0.03)
6.45 (0.02)
5.29 (0.02)
3.19 (0.01)
Mixture
10
Joint QR
7.56 (0.03)
6.79 (0.02)
6.14 (0.03)
5.02 (0.03)
Pointwise QR
7.49 (0.03)
6.61 (0.02)
5.88 (0.03)
5.02 (0.03)
Mod CM
7.67 (0.04)
6.97 (0.03)
6.17 (0.03)
5.52 (0.04)
PQR
10.11 (0.04)
8.29 (0.03)
6.71 (0.02)
3.62 (0.02)
Mixture
5
Joint QR
9.20 (0.04)
7.13 (0.03)
6.94 (0.03)
5.6 (0.03)
Pointwise QR
9.17 (0.04)
7.01 (0.03)
6.71 (0.03)
5.58 (0.03)
Mod CM
9.32 (0.04)
7.37 (0.03)
7.08 (0.03)
6.18 (0.04)
PQR
11.46 (0.04)
9.36 (0.03)
7.49 (0.03)
4.32 (0.02)
Mixture
2
Joint QR
11.57 (0.05)
9.02 (0.03)
8.05 (0.03)
6.35 (0.03)
Pointwise QR
11.58 (0.05)
8.98 (0.04)
7.90 (0.03)
6.31 (0.03)
Mod CM
11.69 (0.05)
9.38 (0.04)
8.38 (0.04)
7.01 (0.04)
PQR
13.49 (0.05)
10.95 (0.04)
8.61 (0.03)
5.32 (0.02)
Mixture
1
Joint QR
13.18 (0.05)
10.31 (0.04)
8.79 (0.04)
6.79 (0.03)
Pointwise QR
13.21 (0.05)
10.28 (0.04)
8.69 (0.04)
6.73 (0.03)
Mod CM
13.26 (0.05)
10.67 (0.04)
9.21 (0.04)
7.47 (0.04)
PQR
14.93 (0.06)
12.05 (0.04)
9.35 (0.04)
5.96 (0.02)Table 3
Average MAE (standard error in parentheses) of the predictedτ-level quantile for the case of heteroskedasticity with a scalar covariate and a sparsely observed functional covariate.
Sample size
SNR
Method
τ
=
0.05
τ
=
0.1
τ
=
0.25
τ
=
0.5
100
150
Joint QR
4.41 (0.03)
3.99 (0.02)
3.48 (0.02)
3.25 (0.02)
Pointwise QR
5.40 (0.03)
4.84 (0.03)
4.26 (0.02)
4.21 (0.03)
Mod CM
6.00 (0.03)
5.71 (0.03)
5.42 (0.03)
5.39 (0.03)
PQR
4.38 (0.05)
3.43 (0.03)
2.52 (0.02)
2.14 (0.02)
100
10
Joint QR
6.93 (0.03)
6.40 (0.03)
5.89 (0.02)
5.76 (0.02)
Pointwise QR
7.94 (0.04)
7.20 (0.03)
6.48 (0.03)
6.30 (0.03)
Mod CM
8.41 (0.04)
8.22 (0.04)
8.13 (0.04)
8.05 (0.04)
PQR
7.76 (0.06)
6.57 (0.04)
5.47 (0.03)
5.08 (0.02)
100
5
Joint QR
8.44 (0.04)
7.72 (0.03)
7.05 (0.03)
6.86 (0.03)
Pointwise QR
9.44 (0.05)
8.50 (0.04)
7.57 (0.03)
7.26 (0.03)
Mod CM
9.65 (0.05)
9.40 (0.05)
9.36 (0.05)
9.26 (0.05)
PQR
9.51 (0.07)
8.25 (0.05)
6.87 (0.03)
6.33 (0.02)
100
2
Joint QR
10.68 (0.05)
9.63 (0.04)
8.60 (0.03)
8.30 (0.03)
Pointwise QR
11.55 (0.06)
10.29 (0.05)
9.00 (0.04)
8.54 (0.03)
Mod CM
11.27 (0.05)
10.80 (0.05)
10.43 (0.05)
10.40 (0.06)
PQR
12.07 (0.08)
10.53 (0.06)
8.66 (0.04)
7.92 (0.03)
100
1
Joint QR
12.23 (0.06)
10.91 (0.05)
9.54 (0.04)
9.11 (0.03)
Pointwise QR
12.87 (0.07)
11.39 (0.05)
9.85 (0.04)
9.29 (0.03)
Mod CM
12.43 (0.06)
11.80 (0.06)
11.19 (0.06)
11.09 (0.07)
PQR
13.70 (0.09)
11.91 (0.06)
9.70 (0.04)
8.84 (0.03)
1000
150
Joint QR
2.87 (0.01)
2.42 (0.01)
1.89 (0.01)
1.65 (0.01)
Pointwise QR
3.06 (0.01)
2.60 (0.01)
2.07 (0.01)
1.86 (0.01)
Mod CM
3.13 (0.01)
2.65 (0.01)
2.10 (0.01)
1.91 (0.01)
PQR
3.10 (0.01)
2.47 (0.01)
1.78 (0.01)
1.48 (0.01)
1000
10
Joint QR
6.21 (0.02)
5.45 (0.02)
4.79 (0.02)
4.66 (0.02)
Pointwise QR
6.38 (0.02)
5.59 (0.02)
4.90 (0.02)
4.77 (0.02)
Mod CM
6.46 (0.02)
5.70 (0.02)
5.01 (0.02)
4.86 (0.02)
PQR
6.68 (0.03)
5.82 (0.02)
4.92 (0.02)
4.60 (0.02)
1000
5
Joint QR
8.08 (0.03)
7.01 (0.02)
6.07 (0.02)
5.85 (0.02)
Pointwise QR
8.27 (0.03)
7.15 (0.02)
6.16 (0.02)
5.94 (0.02)
Mod CM
8.30 (0.03)
7.26 (0.02)
6.31 (0.02)
6.08 (0.02)
PQR
8.64 (0.03)
7.50 (0.03)
6.27 (0.02)
5.81 (0.02)
1000
2
Joint QR
10.76 (0.03)
9.21 (0.03)
7.76 (0.02)
7.38 (0.02)
Pointwise QR
10.95 (0.04)
9.34 (0.03)
7.85 (0.03)
7.45 (0.02)
Mod CM
10.92 (0.03)
9.45 (0.03)
8.01 (0.03)
7.60 (0.03)
PQR
11.38 (0.04)
9.79 (0.03)
8.03 (0.03)
7.34 (0.02)
1000
1
Joint QR
12.54 (0.04)
10.65 (0.03)
8.83 (0.03)
8.32 (0.03)
Pointwise QR
12.74 (0.04)
10.81 (0.04)
8.92 (0.03)
8.39 (0.03)
Mod CM
12.70 (0.04)
10.91 (0.04)
9.10 (0.03)
8.56 (0.03)
PQR
13.16 (0.05)
11.26 (0.04)
9.13 (0.03)
8.29 (0.03)Table 4
Average computing time (in seconds) of the three approaches that involve estimating the conditional distribution for the case of having a scalar covariate and a densely observed functional covariate.
Distribution
Method
n
=
100
n
=
1000
Normal
Joint QR
12
133
Pointwise QR
148
271
Mod CM
278
511
Mixture
Joint QR
13
154
Pointwise QR
151
296
Mod CM
327
532For the case when the response is Gaussian, Tables1 and 2 suggest that the Joint QR typically outperforms its competitors especially for lower quantile levels (τ
=
0.05 and τ
=
0.1). For very small noise level (SNR = 150), PQR performs the best, followed closely by the proposed Joint QR. The variant Pointwise QR, which has a poorer performance, is generally better than the modified CM approach. As expected, as the sample size increases (n
=
1000), all the accuracy results improve; the proposed Joint QR continues to yield most accurate quantiles for the low quantile levels. For mixture of Gaussians, the results are somewhat similar. The accuracy of the quantile estimators with the Pointwise QR improves greatly; in fact the Joint QR and Pointwise QR outperform the other approaches for quantile levels τ
=
0.05,0.1,0.25 irrespective of the SNR. Finally, Table 3 shows that the results for Gaussian with heterogeneous error are close to those for the case of Gaussian. Again, the proposed method has competitive performance in terms of prediction accuracy.Table4 compares the three methods that involve estimating the conditional distribution in terms of the running time required for fitting. The times are reported based on a computer with a 2.3 GHz CPU and 8 GB of RAM. Not surprisingly by fitting the model a single time, Joint QR is the fastest, in some cases being order of magnitude faster than the rest. Pointwise QR can be up to twice as fast as Mod CM.For completeness, we also compare our proposed method to the appropriate competitive methods for the cases (1) when there is a single scalar covariate and (2) when there is a single functional covariate. In the Supplementary Materials, SectionS1.1 discusses the former case and compares Joint QR and Pointwise QR with the linear quantile regression (LQR) [12], implemented by rq function in the R package quantreg, and the constrained B-splines nonparametric regression quantiles (COBS), implemented by the cobs function in the R package COBS [29], in an extensive simulation experiment that involves both linear quantile settings and nonlinear quantile settings. Overall the results show that the proposed methods have similar behavior as LQR; see Table S1. Furthermore we consider the proposed method and its variant with nonlinear modeling of the conditional distribution as discussed in Section 3.2, which we denote with Joint QR (NL) for joint fitting and Pointwise QR (NL) for pointwise fitting. Nonlinear versions of the proposed methods have an excellent MAE performance, which is comparable to or better than that of the COBS method.Finally, SectionS1.2 in the Supplementary Materials discusses the simulation study for the case of having a single functional covariate and compares the proposed methods with CM in terms of MAE as well as computation time; see results displayed in Tables S2 and S3. The results show that the proposed Joint QR is comparable to CM in terms of the prediction accuracy and has less computation time. In our simulation study we also consider the joint fitting of the model by treating the binary response as normal and use pffr [27] with Gaussian link, denoted by Joint QR (G).


## 5. Sow Data Application

Our motivating application is an experimental study carried out at a commercial farm in Oklahoma from July 21, 2013, to August 19, 2013 [38]. The study comprises 480 lactating sows of different parities (i.e., number of previous pregnancies, which serves as a surrogate for age and body weight) that were observed during their first 21 lactation days; their feed intake was recorded daily as the difference between the feed offer and the feed refusal. In addition the study contains information on the temperature and humidity of the farrowing rooms, each recorded at five minute intervals. The final dataset we used for the analysis consists of 475 sows after five sows with unreliable measurements were removed by the experimenters.The experiment was conducted to gain better insights into the way that the ambient temperature and humidity of the farrowing room affect the feed intake of lactating sows. Previous studies seem to suggest a reduction in the sow’s feed intake due to heat stress: above 29°C sows decrease feed intake by 0.5 kg per additional degree in temperature [9]. Studying the effect of heat stress on lactating sows is a very important scientific question because of a couple of reasons. First, the reduction of feed intake of the lactating sows is associated with a decrease in both their bodyweight (BW) and milk production, as well as the weight gain of their litter [10, 39, 40]. Sows with poor feed intake during lactation continue the subsequent reproductive period with negative energy balance [41], which leads to preventing the onset of a new reproductive cycle. Second, heat stress reduces farrowing rate (number of sows that deliver a new litter) and number of piglets born [42]; the reduction in reproduction due to seasonality is estimated to cost 300 million dollars per year for the swine industry [11]. Economic losses are estimated to increase [43] because high temperatures are likely to occur more frequently due to global warming [44].Our primary goal is to understand the thermal needs of the lactating sows for proper feeding behavior during the lactation time. We are interested in how the interplay between the temperature and humidity of the farrowing room affects the feed intake demeanor of lactating sows of different parities. We focus on three specific time points during the lactation period—beginning (lactation day 4), middle (day 11), and end (day 18)—and the analyses are done separately for each time point. We consider two types of responses that are meant to assess the feed intake behavior using the current and the previous lactation days. The first one quantifies the absolute change in the feed intake over two consecutive days and the second one quantifies the relative change and takes into account the usual sow’s feed intake. We define them formally after introducing some notation.LetF
I
i
j be the jth measurement of the feed intake observed for the ith sow and denote by the lactation day L
D
i
j when F
I
i
j is measured; here j
=
1
,
…
,
n
i. Most sows are observed every day within the first 21 lactation days and thus have n
i
=
21. First define the absolute change in the feed intake between two consecutive days as Δ
i
(
j
+
1
)
(
1
)
=
F
I
i
(
j
+
1
)
-
F
I
i
j for j that satisfies L
D
i
(
j
+
1
)
-
L
D
i
j
=
1. For instance, Δ
i
(
j
+
1
)
(
1
)
=
0 means there was no change in feed intake of sow i between the current day and the previous day, while Δ
i
(
j
+
1
)
(
1
)
<
0 means that the feed intake consumed by the ith sow in the current day is smaller than the feed intake consumed in the previous day. However, the same amount of change in the feed intake may reflect some stress level for a sow who typically eats a lot and a more serious stress level for a sow that usually has a lower appetite. For this, we define the relative change in the feed intake by Δ
i
(
j
+
1
)
(
2
)
=
(
F
I
i
(
j
+
1
)
-
F
I
i
j
)
/
L
D
i
j
+
1
-
L
D
i
j
·
T
A
i, where T
A
i is the trimmed average of feed intake of ith sow calculated as the average feed intake after removing the lowest 20
% and highest 20
% of the feed intake measurements {
F
I
i
1
,
…
,
F
I
i
n
i
} taken for the corresponding sow. Here T
A
i is surrogate for the usual amount of feed intake of the ith sow. Trimmed average is used instead of the common average, to remove outliers of very low feed intakes in first few lactating days. For example, consider the situation of two sows: sow i thattypically consumes 10lb food per day and sow i
′ that consumes 5lb food per day. A reduction of 5lb in the feed intake over two consecutive days corresponds to Δ
i
(
j
+
1
)
(
2
)
=
-
50
% for the ith sow and Δ
i
′
(
j
+
1
)
(
2
)
=
-
100
% for the i
′th sow. Clearly both sows are stressed (negative value) but the second sow is stressed more, as its absolute relative change is larger; in view of this we refer to the second response as thestress index. Due to the construction of the two types of responses, the data size varies for lactation days 4 (j
=
3), 11 (j
=
10), and 18 (j
=
17); for the first response, Δ
i
(
j
+
1
)
(
1
), we have sample sizes of 233, 350, and 278, whereas for Δ
i
(
j
+
1
)
(
2
) the sample sizes are 362, 373, and 336 for the respective lactation days.In this analysis we center the attention on the effect of the ambient temperature and humidity on the1st quartile of the proxy stress measures and gain more understanding of the food consumption of sows that are most susceptible to heat stress. While the association between the feed intake of lactating sows and the ambient conditions of the farrowing room has been an active research area for some time, accounting for the temperature daily profile has not been considered yet hitherto. Figure 1 displays the temperature and humidity daily profiles recorded at a frequency of 5-minute window intervals for three different days. Preliminary investigation reveals that temperature is negatively correlated with humidity at each time; this phenomenon is caused because the farm uses cool cell panels and fans to control the ambient temperature. Furthermore, it appears that there is a strong pointwise correlation between temperature and humidity. In view of these observations, in our analysis we consider the daily average of humidity. Exploratory analysis of the feed intake behavior of the sows suggests similarities for the sows with parity greater than older sows (ones who are at their third pregnancy or higher); thus we use a parity indicator instead of the actual parity of the sow. The parity indicator P
i is defined as one, if the ith sow has parity one and zero otherwise.Figure 1
Temperature (°C) and humidity (%) observed profiles (dashed) for three randomly selected days and the corresponding smoothed ones (solid); the x-axis begins at 14H (2PM).For the analysis we smooth daily temperature measurements of each sow using univariate smoother with15 cubic regression bases and quadratic penalty; REML is used to estimate smoothing parameter. The smoothed temperature curve for sow i’s jth repeated measure is denoted by T
i
j
(
t
)
,
t
∈
[
0,24
), and the corresponding daily average humidity is denoted by A
H
i
j. Both temperature and average humidity are centered before being used in the analysis.For convenience we denote the response withΔ
i
j by removing the superscript. In this application for fixed j, Δ
i
j corresponds to Y
i in Section 2, P
i and A
H
i
j correspond to scalar covariates X
i
2, and T
i
j
(
t
) and A
H
i
j
·
T
i
j
(
t
) correspond to functional covariates X
i
3
(
·
). We first estimate the conditional distribution of Δ
i
j given temperature T
i
j
(
t
), average humidity A
H
i
j, parity P
i, and interaction A
H
i
j
·
T
i
j
(
t
). Specifically for each of lactation days of interest (j
=
3,10 and 17) we create a set of 100 equispaced grid of points between the fifth smallest and fifth largest values of Δ
i
j’s and denote the grids with D
=
d
l
:
l
=
1
,
…
,
100. Then we create artificial binary responses, 1
Δ
i
j
≤
d
l
:
l
=
1
,
…
,
100, and fit the following model for F
i
j
(
d
l
)
=
E
1
Δ
i
j
≤
d
l
∣
T
i
j
(
t
)
,
A
H
i
j
,
P
i: (7)
E
1
Δ
i
j
≤
d
l
∣
T
i
j
t
,
A
H
i
j
,
P
i
=
g
-
1
β
0
d
l
+
β
1
d
l
P
i
+
β
2
d
l
A
H
i
j
+
∫
β
3
d
l
,
t
T
i
j
t
d
t
+
A
H
i
j
∫
β
4
d
l
,
t
T
i
j
t
d
t
,where β
0
(
·
) is a smooth intercept, β
1
(
·
) quantifies the smooth effect of young sows, β
2
(
·
) describes the effect of the humidity, and β
3
(
·
,
t
) and β
4
(
·
,
t
) quantify the effect of the temperature at time t as well as the interaction between the temperature at time t and average humidity. We model β
0
(
·
) using 20 univariate basis functions, β
1
(
·
) and β
2
(
·
) using five univariate basis functions and β
3
(
·
,
·
) and β
4
(
·
,
·
) using tensor product of two univariate bases functions (total of 25 functions). Throughout the analysis, cubic B-spline bases are used and REML is used for estimating smoothing parameters. The estimated conditional distribution, denoted by F
^
i
j
(
d
), is monotonized by fitting isotonic regression to d
l
,
F
^
i
j
d
l
:
l
=
10
,
…
,
90; ten smallest and ten largest d
l and the corresponding values of F
^
j
(
d
l
) are removed to avoid boundary effects. By abuse of notation, F
^
i
j
(
d
) denotes the resulting monotonized estimated distribution. Finally, we obtain estimated first quartiles, i.e., quantiles at τ
=
0.25 level, by inverting F
^
i
j
(
d
), namely, Q
^
τ
=
0.25
∣
T
i
j
(
t
)
,
A
H
i
j
,
P
i
=
inf
⁡
d
:
F
^
i
j
d
≥
0.25.To understand the relationship between the lactating sows feed intake and the thermal condition of the farrowing room, we systematically compare and study the predicted quantiles of two responses at combinations of different values of temperature, humidity, and parity. For each of three lactation days (j
=
3,10,17) we consider three values of average humidity (first quartile, median, and third quartile) and two levels of parity (0 for older sows and 1 for younger sows). Based on the experimenters’ interest, for the functional covariate T
i
j
(
·
) we consider seven smooth temperature curves given in Figure 2. Each of these curves is obtained by first calculating pointwise quantiles of temperature at five-minute intervals for a specific level and then smoothing it; we considered quantiles levels η
=
0.2,0.3
,
…, and 0.8. In short, for each of three lactation days we obtain the first quartile of two responses for 42 different combinations (3 humidity values × 2 parity levels × 7 temperature curves) using the proposed method. To avoid extrapolation we ascertain that (i) there are reasonably many observed measurements at each of the combinations and (ii) bottom 25% of the responses are not dominantly from one of the parity group; see distribution of each response by the parity in Figure 3.Figure 2
Temperature curves with which prediction of quantiles is made. Dashed black line is pointwise average of temperature curves and solid lines are pointwise quartiles; all curves are smoothed.Figure 3
Top panels: back-to-back boxplots of the absolute change in feed intake at a specific day by parity. Bottom panels: back-to-back boxplots of the relative change in feed intake at a specific day by parity.The resulting predicted quantiles are shown in Figure4. Here we focus our discussion on predicted quantile of Δ
i
(
j
+
1
)
(
2
) at quantile level τ
=
0.25 for lactation day 4 (j
=
3)—the first plot of the second row in Figure 4. The results suggest that the feed intake of older sows (parity P
i
=
0; grey lines) is less affected by high temperatures than younger sows (black lines); this finding is in agreement with Bloemhof et al. [42]. We also observe that the effects of humidity and temperature on feed intake change are strongly intertwined. For illustration, we focus on lactation day 4 (j
=
3) again for younger sows (black lines). For medium humidity (dashed lines) their feed intake stays pretty constant as temperature increases, while for low and high humidity levels (solid and dotted lines, respectively) it changes with an opposite direction. Specifically when temperature increases, the predicted first quartile of Δ
i
(
j
+
1
)
(
2
) increases for low humidity (solid line) whereas it decreases for high humidity (dotted line). Our results imply that high humidity (dotted line) is related to a negative impact of high temperature on feed intake while low humidity (solid line) alleviates it; and this finding is consistent with a previous study [45]. The analysis result suggests to keep low humidity levels in order to maintain healthy feed intake behavior, when ambient temperature is above 60th percentile; high humidity levels are desirable for cooler ambient temperature.Figure 4
Displayed are the predicted quantiles ofΔ
i
(
j
+
1
)
(
1
) and Δ
i
(
j
+
1
)
(
2
) for different parities, average humidity, and temperature levels. In each of all six panels, black thick lines correspond to the young sows (P
i
=
1) and grey thin lines correspond to the old sows (P
i
=
0). Line types indicate different average humidity levels; solid, dashed, and dotted correspond to low, medium, and high average humidity levels (given by the first quartile, median, and the third quartiles of A
H
i
j), respectively. The seven grids in x-axis of each panel correspond to the 7 temperature curves given in the respective panel of Figure 2.Interpretation of the other results is similar. While the effects of covariates on feed intake are less apparent toward the end of lactation period, we still observe similar pattern across all three lactation days. For the 11th day (j
=
10), the 25th quantile of the feed intake is predicted to decrease when the temperature stays below the 40th percentile, regardless of humidity level and sows age. However, it starts increasing with low humidity while it continues decreasing with high humidity when the temperature rises above the 40th percentile. Similarly, for the 18th day (j
=
17) when the temperature rises above the 60th percentile, the predicted first quartile increases with low humidity while it decreases with high humidity. The effect of temperature on feed intake seems less obvious for lactation days 11 and 18 than for day 4; while the effect may be due to lactation day, it may also be a result of other factors, such as more fluctuation and variability in temperature curves on day 4 than on other two days (see Figure 2). Overall we conclude that high humidity and temperature affect the sows feed intake behavior negatively and young sows (parity one) are more sensitive to heat stress than older sows (higher parity), especially at the beginning of lactation period.


## 6. Discussion

The proposed modeling framework opens up a couple of future research directions. A first research avenue is to develop significance tests of null covariate effect. Testing for the null effect of a covariate on the conditional distribution of the response is equivalent to testing that the corresponding regression coefficient function is equal to zero in the associated function-on-function mean regression model. Such significance tests have been studied when the functional response is continuous [30, 46]; however their study for binary-valued functional responses is an open problem in functional data literature and only recently has been considered in Chen et al. [47]. Another research avenue is to do variable selection in the setting where there are many scalar covariates and functional covariates. Many current applications collect data with increasing number of mixed covariates and selecting the ones that have an effect on the conditional distribution of the response is very important. This problem is an active research area in functional mean regression where the response is normal [48, 49]. The proposed modeling framework has the potential to facilitate studying such problem.



---

*Source: 3743762-2019-07-16.xml*