cov.p5.supp {calibrator} R Documentation

## Covariance function for posterior distribution of z

### Description

Covariance function for posterior distribution of z(\cdot) conditional on estimated hyperparameters and calibration parameters \theta.

### Usage

Cov.eqn9.supp(x, xdash=NULL, theta, d, D1, D2, H1, H2, phi)
cov.p5.supp  (x, xdash=NULL, theta, d, D1, D2, H1, H2, phi)


### Arguments

 x first point, or (Cov.eqn9.supp()) a matrix whose rows are the points of interest xdash The second point, or (Cov.eqn9.supp()) a matrix whose rows are the points of interest. The default of NULL means to use xdash=x theta Parameters. For Cov.eqn9.supp(), supply a vector which will be interpreted as a single point in parameter space. For cov.p5.supp(), supply a matrix whose rows will be interpreted as points in parameter space d Observed values D1 Code run design matrix D2 Observation points of real process H1 Basis function for D1 H2 Basis function for D2 phi Hyperparameters

### Details

Evaluates the covariance function: the last formula on page 5 of the supplement. The two functions documented here are vectorized differently.

Function Cov.eqn9.supp() takes matrices for arguments x and xdash and a single vector for theta. Evaluation is thus taken at a single, fixed value of theta. The function returns a matrix whose rows correspond to rows of x and whose columns correspond to rows of xdash.

Function cov.p5.supp() takes a vector for arguments x and xdash and a matrix for argument theta whose rows are the points in parameter space. A vector V, with elements corresponding to the rows of argument theta is returned:

V[i] = \mbox{cov}\left(z(x),z(x')|\theta_i\right)

### Value

Returns a matrix of covariances

### Note

May return the transpose of the desired object

### 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) pp425-464

• 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)

### Examples

data(toys)
x <- rbind(x.toy,x.toy+1,x.toy,x.toy,x.toy)
rownames(x) <- letters[1:5]
xdash <- rbind(x*2,x.toy)
rownames(xdash) <- LETTERS[1:6]

Cov.eqn9.supp(x=x,xdash=xdash,theta=theta.toy,d=d.toy,D1=D1.toy,
D2=D2.toy,H1=H1.toy,H2=H2.toy,phi=phi.toy)

phi.true <- phi.true.toy(phi=phi.toy)

Cov.eqn9.supp(x=x,xdash=xdash,theta=theta.toy,d=d.toy,D1=D1.toy,
D2=D2.toy,H1=H1.toy,H2=H2.toy,phi=phi.true)

# Now try a sequence of thetas:
cov.p5.supp(x=x.toy,theta=t.vec.toy,d=d.toy,D1=D1.toy,D2=D2.toy,
H1=H1.toy,H2=H2.toy,phi=phi.toy)



[Package calibrator version 1.2-8 Index]