prob.psi1 {calibrator}  R Documentation 
Function to determine the apriori probability of \psi_1
and \psi_2
of the hyperparameters, and \theta
,
given the apriori means and standard deviations.
Function sample.theta()
samples \theta
from its prior distribution.
prob.psi1(phi,lognormally.distributed=TRUE)
prob.psi2(phi,lognormally.distributed=TRUE)
prob.theta(theta,phi,lognormally.distributed=FALSE)
sample.theta(n=1,phi)
phi 
Hyperparameters 
theta 
Parameters 
lognormally.distributed 
Boolean variable with

n 
In function 
These functions use package mvtnorm
to calculate the
probability density under the assumption that the PDF is lognormal.
One implication would be that phi$psi2.apriori$mean
and phi$psi1.apriori$mean
are the means of the
logarithms of the elements of psi1
and psi2
(which are thus assumed to be positive). The sigma
matrix is
the covariance matrix of the logarithms as well.
In these functions, interpretation of argument phi
depends on
the value of Boolean argument lognormally.distributed
. Take
prob.theta()
as an example. If lognormally.distributed
is TRUE
, then log(theta)
is normally distributed with
mean phi$theta.aprior$mean
and variance
phi$theta.apriori$sigma
. If FALSE
, theta
is
normally distributed with mean phi$theta.aprior$mean
and
variance phi$theta.apriori$sigma
.
Interpretation of phi$theta.aprior$mean
depends on the value of
lognormally.distributed
: if TRUE
it is the expected
value of log(theta)
; if FALSE
, it is the expectation of
theta
.
The reason that prob.theta
has a different default value for
lognormally.distributed
is that some elements of theta
might be negative, contraindicating a lognormal distribution
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) 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)
p.eqn4.supp
, stage1
, p.eqn8.supp
data(toys)
prob.psi1(phi=phi.toy)
prob.psi2(phi=phi.toy)
prob.theta(theta=theta.toy,phi=phi.toy)
sample.theta(n=4,phi=phi.toy)