Description Usage Arguments Details Value Author(s) References See Also Examples
Function to create (phi.fun.toy) or modify
(phi.change) toy hyperparameters phi
in a form suitable for passing to the other functions in the library.
The user should never make phi by hand; always use one of these functions
1 2 3 4 5 6 7 8  | phi.fun.toy(rho, lambda, psi1, psi1.apriori, psi2, psi2.apriori,
  theta.apriori)
phi.change(phi.fun, old.phi = NULL, rho = NULL, lambda = NULL,
          psi1 = NULL, psi1.apriori=NULL,  psi1.apriori.mean=NULL,
          psi1.apriori.sigma=NULL, psi2 = NULL, psi2.apriori=NULL,
          psi2.apriori.mean=NULL,  psi2.apriori.sigma=NULL,
          theta.apriori=NULL, theta.apriori.mean=NULL,
          theta.apriori.sigma=NULL)
 | 
phi.fun | 
 In   | 
old.phi | 
 In function   | 
rho | 
 Correlation hyperparameter appearing in main equation  | 
lambda | 
 Noise hyperparameter  | 
psi1 | 
 Roughness lengths hyperparameter for design matrix
 Recall that omega_x and omega_t are
arbitrary functions of psi1.  In this case,
the values are   | 
psi1.apriori | 
 A priori PDF for psi1.  In the form
of a two element list with first element (  | 
psi1.apriori.mean | 
 In function   | 
psi1.apriori.sigma | 
 In function   | 
psi2 | 
 Roughness lengths hyperparameter for  Internal function  NB: function   | 
psi2.apriori | 
 A priori PDF for psi2 and hyperparameters rho and lambda (in that order). As for  The second element of   | 
psi2.apriori.mean | 
 In   | 
psi2.apriori.sigma | 
 In
  | 
theta.apriori | 
 Apriori PDF for
theta.  As above, in the form of a list with elements
for the mean and covariance.  The distribution is multivariate
normal (NB: The distribution is multivariate normal and NOT
lognormal!  To be explicit: log(theta) is
lognormally distributed).  Use function   | 
theta.apriori.mean | 
 In   | 
theta.apriori.sigma | 
 In   | 
Note that this toy function contains within itself
pdm.maker.toy() which extracts omega_x and
omega_t and sigma1squared from psi1.
This will need to  be changed for real-world applications.
Earlier versions of the package had pdm.maker.toy()
defined separately.
Returns a list of several elements:
rho | 
 Correlation hyperparameter  | 
lambda | 
 Noise hyperparameter  | 
psi1 | 
 Roughness lengths hyperparameter for   | 
psi1.apriori | 
 Apriori mean and variance matrix for   | 
psi2 | 
 Roughness lengths hyperparameter for   | 
psi2.apriori | 
 Apriori mean and variance matrix for   | 
theta.apriori | 
 Apriori mean and variance matrix for the parameters  | 
omega_x | 
 Positive definite matrix for the lat/long part of
  | 
omega_t | 
 Positive definite matrix for the code parameters theta,
whose diagonal is   | 
omegastar_x | 
 Positive definite matrix for use in equation 13 of
the supplement; represents distances between rows of   | 
sigma1squared | 
 variance  | 
sigma2squared | 
 variance  | 
omega_x.upper | 
 Upper triangular Cholesky decomposition for   | 
omega_x.lower | 
 Lower triangular Cholesky decomposition for   | 
omega_t.upper | 
 Upper triangular Cholesky decomposition for   | 
omega_t.lower | 
 Lower triangular Cholesky decomposition for   | 
a | 
 Precalculated matrix for use in
  | 
b | 
 Precalculated matrix for use in
  | 
c | 
 Precalculated scalar for use in
  | 
A | 
 Precalculated scalarfor use in
  | 
A.upper | 
 Upper triangular Cholesky decomposition for   | 
A.lower | 
 Lower triangular Cholesky decomposition for   | 
Robin K. S. Hankin
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)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  | phi.fun.toy(100,101,1:6,list(mean=rep(1,6),sigma=1+diag(6)),50:55,
list(mean=rep(0,4),sigma=0.1+diag(4)),
list(mean=0.1+(1:3),sigma=2.1+diag(3)))
phi.fun.toy(rho=1, lambda=1,
    psi1 = structure(c(1.1, 1.2, 1.3, 1.4, 1.5, 0.7),
            .Names = c("x", "y", "A","B", "C","s1sq")),
    psi1.apriori  = list(
             mean=rep(0,6), sigma=0.4+diag(6)),
             psi2=structure(c(2.1, 2.2), .Names = c("x","y")),
             psi2.apriori  = list(mean=rep(0,5),sigma=0.2+diag(5)),
             theta.apriori = list(mean=0.1+(1:3),sigma=2.1+diag(3))
)
data(toys)
phi.change(phi.fun=phi.fun.toy, old.phi = phi.toy, rho = 100)
phi.change(phi.fun=phi.fun.toy, old.phi = phi.toy,
     theta.apriori.sigma = 4*diag(3))
identical(phi.toy, phi.change(phi.fun=phi.fun.toy, old.phi=phi.toy))
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.