mgpr: Multivariate Gaussian process regression (MGPR) model

Description Usage Arguments Value References Examples

View source: R/mgp.functions.R

Description

Multivariate Gaussian process regression where each of the N outputs is unidimensional. The multivariate output is allowed to have multiple independent realisations.

Usage

1
mgpr(Data, m = NULL, meanModel = 0, mu = NULL)

Arguments

Data

List of two elements: 'input' and 'response'. The element 'input' is a list of N vectors, where each vector represents the input covariate values for a particular output. The element 'response' is the corresponding list of N matrices (if there are multiple realisations) or vectors (for a single realisation) representing the response variables.

m

If Subset of Data is to be used in the estimation, m denotes the subset size. It cannot be larger than the total sample size. Default to NULL (Subsetting is not used).

meanModel

Type of mean function applied to all outputs. It can be

0

Zero mean function for each output.

1

Constant mean function to be estimated for each output.

't'

Linear model for the mean function of each output.

'avg'

The average across replications is used as the mean function of each output. This can only be used if there are more than two realisations observed at the same input values.

Default to 0. If argument 'mu' is specified, then 'meanModel' will be set to 'userDefined'.

mu

Vector of concatenated mean function values defined by the user. Default to NULL.

Value

A list containing:

fitted.mean

Fitted values for the training data

fitted.sd

Standard deviation of the fitted values for training data

N

Number of response variables

X

Original input variables

Y

Original response

idx

Index vector identifying to which output the elements of concatenated vectors correspond to.

Cov

Covariance matrix

mean

Concatenated mean function

meanModel

Mean model used for each output

meanLinearModel

'lm' object for each output if the linear regression model is used for the mean functions. NULL otherwise.

References

Shi, J. Q., and Choi, T. (2011), “Gaussian Process Regression Analysis for Functional Data”, CRC Press.

Examples

1
2
## See examples in vignette:
# vignette("mgpr", package = "GPFDA")

Example output

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:fdaThe following object is masked frompackage:graphics:

    matplot

Loading required package: mgcv
Loading required package: nlme
This is mgcv 1.8-33. For overview type 'help("mgcv-package")'.
----------------------------------------------------------------------------------
 Functional Data Analysis and Utilities for Statistical Computing
 fda.usc version 2.0.2 (built on 2020-02-17) 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.5-1 (2019-12-12) 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:spamThe following object is masked frompackage:Matrix:

    det

The following objects are masked frompackage:base:

    backsolve, forwardsolve

GPFDA documentation built on Jan. 29, 2021, 5:14 p.m.