Description Usage Arguments Details Value References Examples
View source: R/gpfr.functions6.R
Use functional regression (FR) model for the mean structure and Gaussian
Process (GP) for the covariance structure.
Let 'n' be the number of
time points 't' of functional objects and 'nrep' the number of independent
replications in the sample.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 
response 
Response data. It can be an 'fd' object or a matrix with 'nrep' rows and 'n' columns. 
time 
Input 't' of functional objects. It is a numeric vector of length 'n'. 
uReg 
Scalar covariates for the FR model. It should be a matrix with 'nrep' rows. 
fxReg 
Functional covariates for the FR model. It can be a matrix with 'nrep' rows and 'n' columns, an 'fd' object, or a list of matrices or 'fd' objects. 
fyList 
A list to control the smoothing of response. 
uCoefList 
A list to control the smoothing of the regression coefficient function of the scalar covariates in the FR model. 
fxList 
A list to control the smoothing of functional covariates in the FR model. 
concurrent 
Logical. If TRUE (default), concurrent functional regression will be carried out; otherwise, the full functional regression will be carried out. 
fxCoefList 
A list to control the smoothing of the regression coefficient function of functional covariates in the functional concurrent model. 
gpReg 
Covariates in the GP model. It should be a matrix, a numeric vector, an 'fd' object, a list of matrices or a list of 'fd' objects. 
hyper 
Vector of initial hyperparameters. Default to NULL. 
NewHyper 
Vector of names of new hyperparameters from the customized kernel function. 
Cov 
Covariance function(s) to use. Options are: 'linear', 'pow.ex', 'rat.qu', and 'matern'. Default to 'power.ex'. 
gamma 
Power parameter used in powered exponential kernel function. It must be 0<gamma<=2. 
nu 
Smoothness parameter of the Matern class. It must be a positive value. 
useGradient 
Logical. If TRUE, first derivatives will be used in the optimization. 
rel.tol 
Relative tolerance passed to nlminb(). Default to be 1e10. 
trace.iter 
Print the processing of iterations of optimization. 
fitting 
Logical. If TRUE, fitting is carried out. Default to FALSE. 
fyList
is a list with the following items:
time
: a sequence of time points; default to be 100
points from 0 to 1.
nbasis
: number of basis functions used in
smoothing, default to be less than or equal to 23.
norder
:
order of the functional curves; default to be 6.
bSpline
:
logical. If TRUE (default), Bsplines basis is used; otherwise, Fourier
basis is used.
Pen
: default to be c(0,0), meaning that the
penalty is only applied to the second order derivative of the curve, with
no penalty for the zeroth and first order derivatives of the curve.
lambda
: smoothing parameter for the penalty, default to be 1e4.
fxList
is similar to fyList
. However, it is a list of lists
to allow for different specifications for each functional covariate if
there are multiple ones.
uCoefList
and fxCoefList
are similar to
each other. Each one is expected to be a list of lists. If a list of one
element is provided, then the items of this element are applied to each of
the functional coefficients of scalar covariates and of functional covariates,
respectively.
rtime
: range of time, default to be c(0,1).
nbasis
: nnumber of basis functions used in smoothing, default to be
less than or equal to 19.
norder
: order of the functional
curves; default to be 6.
bSpline
: logical. If TRUE (default),
Bsplines basis is used; otherwise, Fourier basis is used.
Pen
: default to be c(0,0).
lambda
: smoothing parameter
for the penalty, default to be 1e4.
bivar
:logical. Used for
nonconcurrent models; if TRUE, bivariate basis will be used; if FALSE
(default), normal basis will be used; see details in
bifdPar
.
lambdas
: smoothing parameter for
the penalty of the additional basis, default to be 1.
Note that all items have default settings.
A list containing:
Estimated hyperparameters
A vector of estimated standard deviation of hyperparameters
List of FR models fitted before Gaussian process
Covariance function used
Parameter 'gamma' used in Gaussian process with powered exponential kernel
Parameter 'nu' used in Gaussian process with Matern kernel
Raw response data
Residual after the fitted values from FR models have been taken out
Fitted values
Standard deviation of the fitted values
The type of the model applied in the function.
Training scalar covariates for the FR model
Training functional covariates for the FR model
List of 'fd' objects from training data for FR model with functional covariates
Training data for Gaussian Process
Input time 't'
Inverse of covariance matrix for uReg
Inverse of covariance matrix for fxReg
Fitted values from the FR model
fyList object used
Ramsay, J., and Silverman, B. W. (2006), “Functional Data Analysis”, 2nd ed., Springer, New York.
Shi, J. Q., and Choi, T. (2011), “Gaussian Process Regression Analysis for Functional Data”, CRC Press.
1 2  ## See examples in vignette:
# vignette("gpfr", package = "GPFDA")

Loading required package: fda.usc
Loading required package: fda
Loading required package: splines
Loading required package: Matrix
Loading required package: fds
Loading required package: rainbow
Loading required package: MASS
Loading required package: pcaPP
Loading required package: RCurl
Attaching package: ‘fda’
The following object is masked from ‘package:graphics’:
matplot
Loading required package: mgcv
Loading required package: nlme
This is mgcv 1.833. For overview type 'help("mgcvpackage")'.

Functional Data Analysis and Utilities for Statistical Computing
fda.usc version 2.0.2 (built on 20200217) is now loaded
fda.usc is running sequentially usign foreach package
Please, execute ops.fda.usc() once to run in local parallel mode
Deprecated functions: min.basis, min.np, anova.hetero, anova.onefactor, anova.RPm
New functions: optim.basis, optim.np, fanova.hetero, fanova.onefactor, fanova.RPm

Loading required package: spam
Loading required package: dotCall64
Loading required package: grid
Spam version 2.51 (20191212) is loaded.
Type 'help( Spam)' or 'demo( spam)' for a short introduction
and overview of this package.
Help for individual functions is also obtained by adding the
suffix '.spam' to the function name, e.g. 'help( chol.spam)'.
Attaching package: ‘spam’
The following object is masked from ‘package:Matrix’:
det
The following objects are masked from ‘package:base’:
backsolve, forwardsolve
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.