reality {calibrator}  R Documentation 
Reality
Description
Function to compute reality, gratis deus ex machina. Includes a simple computer model that substitutes for a complex climate model, and a simple function that substitutes for the base system, in this case the climate.
Usage
model.inadequacy(X, set.seed.to.zero=TRUE, draw.from.prior=FALSE,
export.true.hyperparameters=FALSE,phi=NULL)
computer.model(X, params=NULL, set.seed.to.zero=TRUE,
draw.from.prior=FALSE, export.true.hyperparameters=FALSE,phi=NULL)
phi.true.toy(phi)
Arguments
X 
Observation point 
params 
Parameters needed by 
set.seed.to.zero 
Boolean, with the default value of 
draw.from.prior 
Boolean, with default 
export.true.hyperparameters 
Boolean, with default value
of 
phi 
In function In functions 
Details
Function reality()
provides the scalar value observed at
a point x
. Evaluation expense is zero; there is no overhead.
(However, it does not compute “reality”: the function returns a
value subject to observational error N(0,\lambda)
as per equation 5. It might be better to call this function
observation()
)
Function computer.model()
returns the output of a simple,
nonlinear computer model.
Both functions documented here return a random variable drawn from an appropriate (correlated) multivariate Gaussian distribution, and are thus Gaussian processes.
The approach is more explicit in the help pages of the emulator
package. There, Gaussian processes are generated by directly invoking
rmvnorm()
with a suitable correlation matrix
Author(s)
Robin K. S. Hankin
References

M. C. Kennedy and A. O'Hagan 2001. Bayesian calibration of computer models. Journal of the Royal Statistical Society B, 63(3) pp425464

M. C. Kennedy and A. O'Hagan 2001. Supplementary details on Bayesian calibration of computer models, Internal report, University of Sheffield. Available at http://www.tonyohagan.co.uk/academic/ps/calsup.ps

R. K. S. Hankin 2005. Introducing BACCO, an R bundle for Bayesian analysis of computer code output, Journal of Statistical Software, 14(16)
See Also
Examples
data(toys)
computer.model(X=D2.toy,params=theta.toy)
computer.model(D1.toy)
computer.model(X=x.toy, params=extractor.toy(D1.toy)$t.vec)
phi.fix < phi.change(old.phi=phi.toy,
psi1=c(1, 0.5, 1, 1, 0.5, 0.4),phi.fun=phi.fun.toy)
#The values come from c(REAL.SCALES,REAL.SIGMA1SQUARED) as
#seen in the sourcecode for computer.model().
computer.model(D1.toy) # use debug(computer.model) and examine
# var.matrix directly. It should match the
# output from V1():
# first fix phi so that it has the correct values for psi1 (see the
# section on psi1 in ?phi.fun.toy for how to get this):
phi.fix < phi.change(old.phi=phi.toy,psi1=c(1, 0.5, 1.0, 1.0, 0.5,
0.4), phi.fun=phi.fun.toy)
V1(D1.toy,phi=phi.fix)
# What are the hyperparameters that were used to create reality?
phi.true.toy(phi=phi.toy)
#
computer.model(X=D2.toy,params=theta.toy,draw.from.prior=TRUE,phi=phi.toy)