R build status

The package adass implements the adaptive smoothing spline (AdaSS) estimator for the function-on-function linear regression model proposed by Centofanti et al. (2020). The AdaSS estimator is obtained by the optimization of an objective function with two spatially adaptive penalties, based on initial estimates of the partial derivatives of the regression coefficient function. This allows the proposed estimator to adapt more easily to the true coefficient function over regions of large curvature and not to be undersmoothed over the remaining part of the domain. The package comprises two main functions and adass.fr_eaass. The former implements the AdaSS estimator for fixed tuning parameters. The latter executes the evolutionary algorithm for the adaptive smoothing spline estimator (EAASS) algorithm to select the optimal tuning parameter combination as described in Centofanti et al. (2020).


The development version can be installed from GitHub with:

# install.packages("devtools")


This is a basic example which shows you how to apply the two main functions and adass.fr_eaass on a synthetic dataset generated as described in the simulation study of Centofanti et al. (2020).

We start by loading and attaching the adass package.


Then, we generate the synthetic dataset and build the basis function sets as follows.

case<-"Scenario HAT"
X_fd <- data$X_fd
Y_fd <- data$Y_fd
basis_s <- fda::create.bspline.basis(c(0,1),nbasis = 30,norder = 4)
basis_t <- fda::create.bspline.basis(c(0,1),nbasis = 30,norder = 4)

Then, we calculate the initial estimate of the partial derivatives of the coefficient function.

mod_smooth <,X_fd,basis_s = basis_s,basis_t = basis_t,tun_par=c(10^-6,10^-6,0,0,0,0))
grid_s<-seq(0,1,length.out = 10)
grid_t<-seq(0,1,length.out = 10)
beta_der_eval_s<-fda::eval.bifd(grid_s,grid_t,mod_smooth$Beta_hat_fd,sLfdobj = 2)
beta_der_eval_t<-fda::eval.bifd(grid_s,grid_t,mod_smooth$Beta_hat_fd,tLfdobj = 2) 

Then, we apply the EAASS algorithm through the adass.fr_eaass function to identify the optimal combination of tuning parameters.

                      beta_ders=beta_der_eval_s, beta_dert=beta_der_eval_t,
                      popul_size = 10,ncores=8,iter_num=5)

Finally, is applied with tuning parameters fixed to their optimal values.

mod_adass <, X_fd, basis_s = basis_s, basis_t = basis_t,
                   tun_par=mod_adass_eaass$tun_par_opt,beta_ders = beta_der_eval_s,
                   beta_dert = beta_der_eval_t,grid_eval_ders=grid_s,grid_eval_dert=grid_t )

The resulting estimator is plotted as follows.