# p.eqn8.supp

0th

Percentile

##### A postiori probability of hyperparameters

Function to determine the a-postiori probability of hyperparameters $\rho$, $\lambda$ and $\psi_2$, given observations and $\psi_1$.

Keywords
array
##### Usage
p.eqn8.supp(theta, D1, D2, H1, H2, d, include.prior=FALSE,
lognormally.distributed=FALSE, return.log=FALSE, phi)
p.eqn8.supp.vector(theta, D1, D2, H1, H2, d, include.prior=FALSE,
lognormally.distributed=FALSE, return.log=FALSE, phi)
##### Arguments
theta

Parameters

D1

Matrix of code run points

D2

Matrix of observation points

H1

Regression function for D1

H2

Regression function for D2

d

Vector of code output values and observations

include.prior

Boolean, with TRUE meaning to include the prior PDF for $\theta$ and default FALSE meaning return the likelihood, multiplied by an undetermined constant

lognormally.distributed

Boolean, with TRUE meaning to assume prior is lognormal (see prob.theta() for more info)

return.log

Boolean, with default FALSE meaning to return the probability; TRUE means to return the (natural) logarithm of the answer

phi

Hyperparameters

##### Details

The user should always use p.eqn8.supp(), which is a wrapper for p.eqn8.supp.vector(). The forms differ in their treatment of $\theta$. In the former, $\theta$ must be a vector; in the latter, $\theta$ may be a matrix, in which case p.eqn8.supp.vector() is applied to the rows

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

W2,stage1

##### Aliases
• p.eqn8.supp
• p.eqn8.supp.vector
##### Examples
# NOT RUN {
data(toys)
p.eqn8.supp(theta=theta.toy, D1=D1.toy, D2=D2.toy, H1=H1.toy, H2=H2.toy,
d=d.toy, phi=phi.toy)

## Now try using the true hyperparameters, and data directly drawn from
## the appropriate multivariate distn:

phi.true <- phi.true.toy(phi=phi.toy)
jj <- create.new.toy.datasets(D1.toy , D2.toy)
d.toy <- jj\$d.toy
p.eqn8.supp(theta=theta.toy, D1=D1.toy, D2=D2.toy, H1=H1.toy,
H2=H2.toy, d=d.toy, phi=phi.true)

## Now try p.eqn8.supp() with a vector of possible thetas:
p.eqn8.supp(theta=sample.theta(n=11,phi=phi.true), D1=D1.toy,
D2=D2.toy, H1=H1.toy, H2=H2.toy,  d=d.toy, phi=phi.true)

# }

Documentation reproduced from package calibrator, version 1.2-8, License: GPL-2

### Community examples

Looks like there are no examples yet.