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).
North Carolina Agricultural FoundationNational Science FoundationDMS 0454942DMS 1454942National Institutes of HealthR01 NS085211R01 MH0866335P01 CA142538-091. 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.
Let QY∣X(·)(τ) denote the τth conditional quantile of Y given a functional covariate X(·), and let FY∣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., FY∣X(·)(y)=E1(Y≤y)∣X(·)=g-1∫Xtβt,ydt, where 1(·) is an indicator function and g is the logit link function, and we study the conditional quantiles by exploiting the relationship between QY∣X(·)(τ) and FY∣X(·)(y) through QY∣X)(·)(τ)=infy:FY∣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. Section 2 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. Methodology2.1. Statistical Framework
Let i be index subjects, j index repeated measurements, n the number of subjects, and mi the number of observations for subject i. Suppose we observe Yi,Xi1,Xi2,tij,Xi3(tij)1≤j≤mi1≤i≤n, where Yi is the response, which is a scalar random variable, Xi1 is a p-dimensional vector of nuisance covariates, Xi2 is a scalar covariate, and Xi3(·) 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 of Yi given Xi1, Xi2, and Xi3(·):(1)FYi∣Xi1,Xi2,Xi3·y=E1Yi≤y∣Xi1,Xi2,Xi3·=g-1β0y+Xi1Tβ1+Xi2β2y+∫Xi3tβ3t,ydt,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)=logx/(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 Xi1, β2(·) is an unknown and smooth function, and β3(·,·) is an unknown and smooth bivariate function. Here, the effect of the nuisance covariates Xi1 is β1; it is assumed to be constant over y while the smooth intercept β0(y) is y-variant. The effect of Xi2 is β2(y), which varies smoothly over y; β3(·,y) quantifies y-variant linear effects of the covariate Xi3(·). If the parameter function β2(·) is zero then the covariate Xi2 has no effect on the distribution of the response Yi, which is equivalent to Xi2 having no effect on any quantile level of Yi. Similarly, it is easy to see that a null effect, say β3(·,·)≡0, is equivalent to the case that the functional covariate Xi3(·) 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.2
To 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., tij=tj 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 B0,d0·:d0=1,…,κ0 and B1,d1·:d1=1,…,κ1 be two bases of dimensions κ0 and κ1, respectively. β0(y)≈∑d0=1κ0B0,d0(y)θ0,d0 and β2(y)≈∑d1=1κ1B1,d1(y)θ1,d1, where θ0,d0’s and θ1,d1’s are unknown basis coefficients. We represent β3(t,y) using the tensor product of two univariate bases functions, B2,d2tt:d2=1,…,κ2,t and B2,d2′yy:d2′=1,…,κ2,y, where κ2,t and κ2,y are the bases dimensions; β3(t,y)≈∑d2=1κ2,t∑d2′=1κ2,yB2,d2t(t)B2,d2′y(y)θ2,d2,d2′, where θ2,d2,d2′’s are unknown basis coefficients. In practice, the integration term ∫Xi3(t)β3(t,y)dt is approximated by Riemann integration ∫Xi3(t)β3(t,y)dt≈∑j=1mXi3(tj)β3(tj,y)(tj+1-tj) but other numerical approximation scheme can be also used.
Define Zi(y)=1(Yi≤y) for y∈R. In practice for each y in a fine grid, we view Zi(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 Zi(y) and the mixed covariates Xi1,Xi2,Xi3(·). 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)EZiy∣Xi1,Xi2,Xi3·=g-1ηiy;ηiy=∑d0=1κ0B0,d0yθ0,d0+Xi1Tβ1+Xi2∑d1=1κ1B1,d1yθ1,d1+∑j=1mtj+1-tjXi3tj∑d2=1κ2,t∑d2′=1κ2,yB2,d2ttjB2,d2′yyθ2,d2,d2′.For convenience, we use the notation BXi2,d1(y)=Xi2B1,d1(y), X~i3(tj)=(tj+1-tj)Xi3(tj). We let B0(y)=B0,1(y),…,B0,κ0(y)T, Bi1(y)=BXi2,1(y),…,BXi2,κ1(y)T, B2,t(t)=B2,1t(t),…,B2,κ2,tt(t)T, B2,y(y)=B2,1y(y),…,B2,κ2,yy(y)T, θ0=θ0,1,…,θ0,κ0T, θ1=θ1,1,…,θ1,κ1T, and Θ2=[θ2,d2,d2′]1≤d2≤κ2,t,1≤d2′≤κ2,y is a coefficient matrix. Then β3(t,y)=B2,t(t)⊗B2,y(y)Tθ2, where θ2 is the vectorization of Θ2. We let X~i3(t)=X~i3(t1),…,X~i3(tm)T∈Rm, B2(t,y)=B2,t(t1)⊗B2,y(y),…,B2,t(tm)⊗B2,y(y)T∈Rm×κ2,tκ2,y, and Bi2(y)=B2t,yTX~i3(t). Now model (2) can be written as(3)EZiy∣Xi1,Xi2,Xi3·=g-1Xi1Tβ1+B0yTθ0+Bi1yTθ1+Bi2yTθ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. Estimation3.1. Estimation via Penalized Log-Likelihood
Let yl:l=1,…,L be a set of equally spaced points in the range of the response variable, Yi’s. Conditioning on Xi1,Xi2,Xi3(·), we model Zi(yl) as independently distributed Bernoulli variables with mean μi(yl), where gμiyl=ηi(yl). The coefficients β1, θ0, θ1, and θ2 are estimated by minimizing the penalized log-likelihood criterion:(4)-2Lβ1,θ0,θ1,θ2∣Ziyl:∀i,l+λ0P0θ0+λ1P1θ1+λ2,tP2,tθ2+λ2,yP2,yθ2,where L is the log-likelihood function of data Ziyl:l=1,…,L1≤i≤n, λ0, λ1, λ2,t, and λ2,y are smoothing parameters, which control the balance between the model fit and its complexity, and P0(·), P1(·), P2,t(·), and P2,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 P0(θ0)=∫∂2β0(y)/∂y22dy=θ0TD0θ0, where D0 is of dimension κ0×κ0 with its (s,s′) element equal to ∫∂2B0,s(y)/∂y2∂2B0,s′(y)/∂y2dy. Similarly, P1(θ1)=∫∂2β2(y)/∂y22dy=θ1TD1θ1, where D1 is of dimension κ1×κ1 with its (s,s′) element equal to ∫∂2B1,s(y)/∂y2∂2B1,s′(y)/∂y2dy. As β3(·,·) is a bivariate function, the choice of penalty implies penalizing the size of curvature in each direction, respectively: P2,t(θ2)=∫∫∂2β3(y,t)/∂t22dydt=θ2TD2,tθ2, where D2,t=P2,t⊗Iκ2,y is of dimension κ2,yκ2,t×κ2,yκ2,t with the (s,s′) element of P2,t equal to ∫∂2B2,st(t)/∂t2∂2B2,s′t(t)/∂t2dt for some orthonormal spline bases. Similarly, P2,y(θ2)=∫∫∂2β3(y,t)/∂y22dydt=θ2TD2,yθ2, where D2,y=Iκ2,t⊗P2,y is of dimension κ2,yκ2,t×κ2,yκ2,t with the (s,s′) element of P2,y equal to ∫∂2B2,sy(y)/∂y2∂2B2,s′y(y)/∂y2dy.
Criterion (4) can be viewed as a penalized quasilikelihood (PQL) of the corresponding generalized linear mixed model(5)Ziyl∣β1,θ0,θ1,θ2~Bernoulliμiyl,l=1,…,L;θ0~N0,λ0-1D0-;θ1~N0,λ1-1D1-;θ2~N0,D2-,where D0- is the generalized inverse matrix of D0; D1- and D2-=(λ2,tD2,t+λ2,yD2,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 effect Xi2β2(y) can be replaced by h1(Xi2,y) and ∫Xi3(t)β3(t,y)dt by ∫h2Xi3t,t,ydt, where h1(·,·) and h2(·,·,·) 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., h1(Xi,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^Yi∣Xi1,Xi2,Xi3(·)(y) can be obtained by plugging in the estimated coefficients. The τth conditional quantile is estimated by inverting the estimated distribution, i.e., Q^Yi∣Xi1,Xi2,Xi3·(τ)=infy:F^Yi∣Xi1,Xi2,Xi3(·)(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 as F^Yi∣Xi1,Xi2,Xi3(·)(y) is readily available at dense grid points yl’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 Study4.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, Section S1.
Suppose the observed data for the ith subject are Yi,X1i,Wi1,ti1,…,Wimi,timi, tij∈[0,10], where X1i~i.i.dUnif(-16,16), Wij=X2i(tij)+ϵij for 1≤i≤n,1≤j≤mi. Let X2i(tij)=μ(tij)+∑k=14ξikϕk(tij)+ϵij, where μ(t)=t+sin(t), ϕk(t)=cos(k+1)πt/10/5 for odd values of k, ϕk(t)=sinkπt/10/5 for even values of k, ξik~iidN(0,λk), (λ1,λ2,λ3,λ4)={16,9,7.56,5.06}, and ϵij~iidN(0,σϵ2). We assume three cases for generating response Yi:
Gaussian: Yi∣X1i,X2i(·)~N(2∫X2i(t)β(t)dt+2X1i,52); this corresponds to the quantile regression model QY∣X1,X2(·)(τ)=2∫X2i(t)β(t)dt+2X1i+5Φ-1(τ), where Φ(·) is the distribution function of the standard normal;
Mixture of Gaussians: Yi∣X1i,X2i(·)~0.5N(∫X2i(t)β(t)dt+X1i,12) + 0.5N(3∫X2i(t)β(t)dt+3X1i,42), where the true quantiles can be approximated numerically by using qnorMix function in the R package norMix;
Gaussian with heterogeneous error: Yi∣X1i,X2i(·)~N(2∫X2i(t)β(t)dt+2X1i,52∫X2i(t)2dt/∑k=14λk); the true quantiles are given by QY∣X1,X2(·)(τ) = 2∫X2i(t)β(t)dt+2X1i + 5∫X2i(t)2dt/∑k=14λkΦ-1(τ).
Let β(t)=∑k=14β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 generate 500 simulated datasets. We define SNR as ∑k=14λk/σϵ, and we consider five levels of noise: SNR=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 tij: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 tij=tj:j=1,…,m are m=30 equispaced time points in [0,10].
The performance is evaluated on a test set of 100 subjects, for which we have X1i∗,Wi∗j,ti∗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)MAEτ=1100∑i∗=1100Q^i∗τ-Qi∗τ.
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 regression pfr, 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.
The R 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 Yi’s to set the grid yl:l=1,…,L for the conditional distribution function.
4.3. Simulation Results
Tables 1 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.
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)
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)
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)
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
532
For the case when the response is Gaussian, Tables 1 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.
Table 4 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, Section S1.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, Section S1.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.
Let FIij be the jth measurement of the feed intake observed for the ith sow and denote by the lactation day LDij when FIij is measured; here j=1,…,ni. Most sows are observed every day within the first 21 lactation days and thus have ni=21. First define the absolute change in the feed intake between two consecutive days as Δi(j+1)(1)=FIi(j+1)-FIij for j that satisfies LDi(j+1)-LDij=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)=(FIi(j+1)-FIij)/LDij+1-LDij·TAi, where TAi 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 {FIi1,…,FIini} taken for the corresponding sow. Here TAi 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 that typically 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 the stress 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 the 1st 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 Pi is defined as one, if the ith sow has parity one and zero otherwise.
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 with 15 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 Tij(t),t∈[0,24), and the corresponding daily average humidity is denoted by AHij. Both temperature and average humidity are centered before being used in the analysis.
For convenience we denote the response with Δij by removing the superscript. In this application for fixed j, Δij corresponds to Yi in Section 2, Pi and AHij correspond to scalar covariates Xi2, and Tij(t) and AHij·Tij(t) correspond to functional covariates Xi3(·). We first estimate the conditional distribution of Δij given temperature Tij(t), average humidity AHij, parity Pi, and interaction AHij·Tij(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 Δij’s and denote the grids with D=dl:l=1,…,100. Then we create artificial binary responses, 1Δij≤dl:l=1,…,100, and fit the following model for Fij(dl)=E1Δij≤dl∣Tij(t),AHij,Pi: (7)E1Δij≤dl∣Tijt,AHij,Pi=g-1β0dl+β1dlPi+β2dlAHij+∫β3dl,tTijtdt+AHij∫β4dl,tTijtdt,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^ij(d), is monotonized by fitting isotonic regression to dl,F^ijdl:l=10,…,90; ten smallest and ten largest dl and the corresponding values of F^j(dl) are removed to avoid boundary effects. By abuse of notation, F^ij(d) denotes the resulting monotonized estimated distribution. Finally, we obtain estimated first quartiles, i.e., quantiles at τ=0.25 level, by inverting F^ij(d), namely, Q^τ=0.25∣Tij(t),AHij,Pi=infd:F^ijd≥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 Tij(·) 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.
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.
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 Figure 4. 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 Pi=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.
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 (Pi=1) and grey thin lines correspond to the old sows (Pi=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 AHij), 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.
Data Availability
The data used to support the findings of this study are available from the corresponding author upon request.
Conflicts of Interest
The authors declare that they have no conflicts of interests.
Acknowledgments
The data used originated from work supported in part by the North Carolina Agricultural Foundation, Raleigh, NC. The authors acknowledge Zhen Han for preparing simulations. Staicu’s research was supported by National Science Foundation DMS 0454942 and DMS 1454942 and National Institutes of Health grants R01 NS085211, R01 MH086633, and 5P01 CA142538-09.
Supplementary Materials
Section S1 provides additional simulation settings and results for the cases of having either a single scalar covariate or a single functional covariate. Additional results for the case of having a scalar covariate and a densely observed functional covariate are also included. Section S2 presents additional data analysis using the proposed method on the bike sharing dataset [50, 51].
CardotH.FerratyF.SardaP.Functional linear model1999451112210.1016/S0167-7152(99)00036-XMR1718346JamesG. M.Generalized linear models with functional predictors200264341143210.1111/1467-9868.00342MR1924298Zbl1090.62070RamsayJ.SilvermanB.2005New York, NY, USASpringerMR2168993RamsayJ.SilvermanB. W.2002New York, NY, USASpringerFerratyF.VieuP.2006New York, NY, USASpringerFerratyF.VieuP.Additive prediction and boosting for functional data2009534140014132-s2.0-5854908770810.1016/j.csda.2008.11.023Zbl05687855GoldsmithJ.BobbJ.CrainiceanuC. M.CaffoB.ReichD.Penalized functional regression201120483085110.1198/jcgs.2010.10007MR28789502-s2.0-83455181653McLeanM. W.HookerG.StaicuA.-M.ScheiplF.RuppertD.Functional generalized additive models201423124926910.1080/10618600.2012.729985MR31737702-s2.0-84901804822QuiniouN.NobletJ.Influence of high ambient temperatures on performance of multiparous lactating sows19997782124213410.2527/1999.7782124x2-s2.0-0033174495RenaudeauD.NobletJ.Effects of exposure to high ambient temperature and dietary protein level on sow milk production and performance of piglets2001796154015482-s2.0-003538006610.2527/2001.7961540xSt-PierreN.CobanovB.SchnitkeyG.Economic losses from heat stress by US livestock industries200386E52E7710.3168/jds.S0022-0302(03)74040-5KoenkerR.BassettG.Jr.Regression quantiles1978461335010.2307/1913643MR0474644Zbl0373.62038KoenkerR.201538Cambridge University PressBondellH. D.ReichB. J.WangH.Noncrossing quantile regression curve estimation201097482583810.1093/biomet/asq048MR2746154Zbl1204.620612-s2.0-78651310251CardotH.CrambesC.SardaP.Quantile regression when the covariates are functions200517784185610.1080/10485250500303015MR21803692-s2.0-27744593604KatoK.Estimation in functional linear quantile regression20124063108313610.1214/12-AOS1066MR3097971TangQ.ChengL.Partial functional linear quantile regression201457122589260810.1007/s11425-014-4819-xMR3275408Zbl1308.62086LuY.DuJ.SunZ.Functional partially linear quantile regression model201477231733210.1007/s00184-013-0439-7MR3157989YuD.KongL.MizeraI.Partial functional linear quantile regression for neuroimaging data analysis201619574872-s2.0-8496405705710.1016/j.neucom.2015.08.116FerratyF.RabhiA.VieuP.Conditional quantiles for dependent functional data with application to the climatic 'el niño' phenomenon2005672378398MR2208895ChenK.MüllerH.-G.Conditional quantile analysis when covariates are functions, with application to growth data2012741678910.1111/j.1467-9868.2011.01008.xMR2885840ScheiplF.GertheissJ.GrevenS.Generalized functional additive mixed models20161011455149210.1214/16-EJS1145MR3507370Zbl1341.622422-s2.0-84973397855EilersP. H.MarxB. D.Flexible smoothing with b-splines and penalties199689102RuppertD.Selecting the number of knots for penalized splines200211473575710.1198/106186002321018768MR19442612-s2.0-0036921633WoodS. N.Thin plate regression splines20036519511410.1111/1467-9868.00374MR1959095Zbl1063.620592-s2.0-0141576514WoodS.2006Boca Raton, FL, USAChapman and Hall/CRCIvanescuA. E.StaicuA.-M.ScheiplF.GrevenS.Penalized function-on-function regression201530253956810.1007/s00180-014-0548-4MR3357075Zbl1317.650372-s2.0-84930948325KimJ. S.StaicuA.-M.MaityA.CarrollR. J.RuppertD.Additive function-on-function regression201827123424410.1080/10618600.2017.1356730MR37883152-s2.0-85045617567NgP.MaechlerM.A fast and efficient implementation of qualitatively constrained quantile smoothing splines20077431532810.1177/1471082X0700700403MR2749902ZhangJ. T.ChenJ.Statistical inferences for functional data20073531052107910.1214/009053606000001505MR2341698Zbl1129.620292-s2.0-49749105599YaoF.MüllerH.WangJ.Functional data analysis for sparse longitudinal data20051004705775902-s2.0-1974437546610.1198/016214504000001745Zbl1117.62451HuangL.ScheiplF.GoldsmithJ.R package refund: methodology for regression with functional data (version 0.1-13)2015, https://cran.r-project.org/web/packages/refund/index.htmlXiaoL.ZipunnikovV.RuppertD.CrainiceanuC.Fast covariance estimation for high-dimensional functional data2016261-240942110.1007/s11222-014-9485-xMR34393822-s2.0-84953355890XiaoL.LiC.CheckleyW.CrainiceanuC.Fast covariance estimation for sparse functional data201828351152210.1007/s11222-017-9744-8MR3761337Zbl1384.621422-s2.0-85017475389XiaoL.LiC.CheckleyW.CrainiceanuC.R package face: fast covariance estimation for sparse functional data (version 0.1-4)2018, http://cran.r-project.org/web/packages/face/index.htmlBarlowR. E.BartholomewD. J.BremnerJ. M.BrunkH. D.(No. 04; QA278. 7, B3.). New York: Wiley, 1972MR0326887ChernozhukovV.Fernandez-ValI.GalichonA.Improving point and interval estimators of monotone functions by rearrangement200996355957510.1093/biomet/asp030MR2538757RoseroD. S.BoydR. D.McCulleyM.OdleJ.van HeugtenE.Essential fatty acid supplementation during lactation is required to maximize the subsequent reproductive performance of the modern sow20161681511632-s2.0-8497948342710.1016/j.anireprosci.2016.03.01027037065JohnstonL. J.EllisM.LibalG. W.MayroseV. B.WeldonW. C.ArthurR. D.BrummM. C.ChristensonR. K.CrenshawJ. D.HinesR. H.JesseG. W.JonesD. D.LeibbrandtV. D.RozeboomD. W.ZimmermanD. R.Effect of room temperature and dietary amino acid concentration on performance of lactating sows. ncr-89 committee on swine management19997771638164410.2527/1999.7771638x2-s2.0-0033158755RenaudeauD.QuiniouN.NobletJ.Effects of exposure to high ambient temperature and dietary protein level on performance of multiparous lactating sows2001795124012492-s2.0-003535104010.2527/2001.7951240xBlackJ. L.MullanB. P.LorschyM. L.GilesL. R.Lactation in the sow during heat stress1993351-21531702-s2.0-3824900249210.1016/0301-6226(93)90188-NBloemhofS.MathurP. K.KnolE. F.van der WaaijE. H.Effect of daily environmental temperature on farrowing rate and total born in dam line sows2013916266726792-s2.0-8488264002110.2527/jas.2012-590223482580NelsonG. C.RosegrantM. W.KooJ.Climate change: impact on agriculture and costs of adaptation200921MelilloJ. M.2014HighlightsUs national climate assessmentBergsmaR.HermeschS.Exploring breeding opportunities for reduced thermal sensitivity of feed intake in the lactating sow201290185982-s2.0-8485537906310.2527/jas.2011-402121788430ShenQ.FarawayJ.An f test for linear models with functional responses200412391257MR2126351ChenS.XiaoL.StaicuA.-M.Testing for generalized scalar-on-function linear modelshttps://arxiv.org/abs/1906.04889, 2018GertheissJ.MaityA.StaicuA.-M.Variable selection in generalized functional linear models2013218610110.1002/sta4.202-s2.0-84900855077ChenY.GoldsmithJ.OgdenR. T.Variable selection in function-on-scalar regression2016518810110.1002/sta4.106MR3478799Fanaee-TH.GamaJ.Event labeling combining ensemble detectors and background knowledge201422-311312710.1007/s13748-013-0040-3LichmanM.UCI machine learning repository2013