Learn R Programming

SSM (version 1.0.1)

predict.SSM: Point prediction of smooth supersaturated models.

Description

This method gives the prediction of an SSM object at a point. If the SSM has a metamodel error estimate then a \((1 - \alpha)\) credible interval is also output.

Usage

# S3 method for SSM
predict(object, x, alpha = 0.05, ...)

Arguments

object

An SSM object.

x

A \(d\) length vector identifying the prediction point.

alpha

(optional) A number in \([0, 1]\) for the \((1 - \alpha)\) metamodel error estimate credible interval. Set to 0.05 by default.

...

further arguments passed to or from other methods.

Value

Either a number if the SSM has no metamodel error estimating Gaussian process, or three numbers giving the model prediction ($model), and the lower and upper bounds of the credible interval ($lower and $upper) respectively.

Examples

Run this code
data(attitude)
X <- transform11(attitude[ 2:7])
Y <- attitude[ , 1]
# with no metamodel error estimating GP.
s <- fit.ssm(X, Y)
predict(s, rep(1,6))

# with metamodel error estimating GP.
s <- fit.ssm(X, Y, GP = TRUE)
predict(s, rep(1,6))

Run the code above in your browser using DataLab