Ez.eqn9.supp {calibrator}R Documentation

Expectation as per equation 10 of KOH2001

Description

Expectation as per equation 10 of KOH2001 (not the supplement)

Usage

Ez.eqn9.supp(x, theta, d, D1, D2, H1, H2,  phi)
Ez.eqn9.supp.vector(x, theta, d, D1, D2, H1, H2, phi)

Arguments

x point at which expectation is needed
theta parameters
d observations and code outputs
D1 code run points
D2 observation points
H1 regression function for D1
H2 regression function for D2
phi hyperparameters

Details

The user should always use Ez.eqn9.supp(), which is a wrapper for Ez.eqn9.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 Ez.eqn9.supp.vector() is applied to the rows.

Note that Ez.eqn9.supp.vector() is vectorized in x but not theta (if given a multi-row object, apply(theta,1,...) is used to evaluate the function for each row supplied).

Function Ez.eqn9.supp() will take multiple-row arguments for x and theta. The output will be a matrix, with rows corresponding to the rows of x and columns corresponding to the rows of theta. See the third example below.

Note that function Ez.eqn9.supp() determines whether there are multiple values of theta by is.vector(theta). If this returns TRUE, it is assumed that theta is a single point in multidimensional parameter space; if FALSE, it is assumed to be a matrix whose rows correspond to points in parameter space.

So if theta is one dimensional, calling Ez.eqn9.supp() with a vector-valued theta will fail because the function will assume that theta is a single, multidimensional, point. To get round this, use as.matrix(theta), which is not a vector; the rows are the (1D) parameter values.

Author(s)

Robin K. S. Hankin

References

See Also

tee

Examples

data(toys)
Ez.eqn9.supp(x=x.toy,  theta=theta.toy,  d=d.toy, D1=D1.toy,  D2=D2.toy, H1=H1.toy,H2=H2.toy, phi=phi.toy)
Ez.eqn9.supp(x=D2.toy, theta=t.vec.toy,  d=d.toy, D1=D1.toy, D2=D2.toy, H1=H1.toy,H2=H2.toy, phi=phi.toy)
Ez.eqn9.supp(x=x.vec,  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.0-58 Index]