p.eqn8.supp: A postiori probability of hyperparameters

Description Usage Arguments Details Author(s) References See Also Examples

Description

Function to determine the a-postiori probability of hyperparameters rho, lambda and psi2, given observations and psi1.

Usage

1
2
3
4
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

Author(s)

Robin K. S. Hankin

References

See Also

W2,stage1

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
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)

RobinHankin/calibrator documentation built on April 27, 2021, 2:47 p.m.