gp.predict {GPBayes}R Documentation

Prediction at new inputs based on a Gaussian stochastic process model

Description

This function provides the capability to make prediction based on a GaSP when different estimation methods are employed.

Usage

gp.predict(obj, input.new, method = "Bayes")

Arguments

obj

an S4 object gp

input.new

a matrix of new input lomessageions

method

a string indicating the parameter estimation method:

MPLE

This indicates that the maximum profile likelihood estimation (MPLE) is used. This correponds to simple kriging formulas

MMLE

This indicates that the maximum marginal likelihood estimation (MMLE) is used. This corresponds to universal kriging formulas when the vairance parameter is not integrated out. If the variance parameter is integrated out, the predictive variance differs from the universal kriging variance by the factor \frac{n-q}{n-q-2}, since the predictive distribution is a Student's t-distribution with degrees of freedom n-q.

MAP

This indicates that the posterior estimates of model parameters are plugged into the posterior predictive distribution. Thus this approach does not take account into uncertainty in model parameters (range, tail, nu, nugget).

Bayes

This indicates that a fully Bayesian approach is used for parameter estimation (and hence prediction). This approach takes into account uncertainty in all model parameters.

Value

a list of predictive mean, predictive standard deviation, 95% predictive intervals

Author(s)

Pulong Ma mpulong@gmail.com

See Also

GPBayes-package, GaSP, gp, gp.mcmc, gp.optim

Examples


 
code = function(x){
y = (sin(pi*x/5) + 0.2*cos(4*pi*x/5))*(x<=9.6) + (x/10-1)*(x>9.6) 
return(y)
}
n=100
input = seq(0, 20, length=n)
XX = seq(0, 20, length=99)
Ztrue = code(input)
set.seed(1234)
output = Ztrue + rnorm(length(Ztrue), sd=0.1)
obj = gp(formula=~1, output, input, 
        param=list(range=4, nugget=0.1,nu=2.5),
        smooth.est=FALSE,
        cov.model=list(family="matern", form="isotropic"))
 
fit.optim = gp.optim(obj, method="MMLE")
obj = fit.optim$obj
pred = gp.predict(obj, input.new=XX, method="MMLE")
                   
                   
                   
                   


[Package GPBayes version 0.1.0-6 Index]