plot.gpfr: Plot GPFR model for either training or prediction

Description Usage Arguments Value Examples

Description

Plot GPFR model for either training or prediction

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## S3 method for class 'gpfr'
plot(
  x,
  type = c("raw", "meanFunction", "fitted", "prediction"),
  ylab = "y",
  xlab = "t",
  ylim = NULL,
  realisations = NULL,
  alpha = 0.05,
  colourTrain = 2,
  colourNew = 4,
  mar = c(4.5, 5.1, 2.2, 0.8),
  oma = c(0, 0, 1, 0),
  cex.lab = 1.5,
  cex.axis = 1,
  cex.main = 1.5,
  ...
)

Arguments

x

Plot GPFR for training or prediction from a given object of 'gpfr' class.

type

Required type of plots. Options are: 'raw', 'meanFunction', 'fitted' and 'prediction'.

ylab

Title for the y axis.

xlab

Title for the x axis.

ylim

Graphical parameter. If NULL (default), it is chosen automatically.

realisations

Index vector identifying which training realisations should be plotted. If NULL (default), all training realisations are plotted. For predictions, 'realisations' should be '0' if no training realisation is to be plotted.

alpha

Significance level used for 'fitted' or 'prediction'. Default is 0.05.

colourTrain

Colour for training realisations when 'type' is set to 'prediction' and 'realisations' is positive.

colourNew

Colour for predictive mean for the new curve when 'type' is set to 'prediction'.

mar

Graphical parameter passed to par().

oma

Graphical parameter passed to par().

cex.lab

Graphical parameter passed to par().

cex.axis

Graphical parameter passed to par().

cex.main

Graphical parameter passed to par().

...

Other graphical parameters passed to plot().

Value

A plot.

Examples

1
2
## See examples in vignette:
# vignette("gpfr", 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.