Usage
stage1(D1, y, H1, maxit, trace=100, method="Nelder-Mead", directory = ".", do.filewrite=FALSE, do.print=TRUE, phi.fun, lognormally.distributed=FALSE, include.prior=TRUE, phi)
stage2(D1, D2, H1, H2, y, z, maxit, trace=100, method = "Nelder-Mead", directory =
".", do.filewrite=FALSE, do.print=TRUE, extractor, phi.fun, E.theta,
Edash.theta, isotropic=FALSE, lognormally.distributed = FALSE, include.prior = TRUE, use.standin = FALSE, phi)
stage3(D1, D2, H1, H2, d, maxit, trace=100, method="Nelder-Mead", directory = ".",
do.filewrite=FALSE, do.print=TRUE, include.prior = TRUE, lognormally.distributed=FALSE, theta.start=NULL, phi)
Arguments
maxit
Maximum number of iterations as passed to optim()
trace
Amount of information displayed, as passed to optim()
D1
Matrix whose rows are points at which code output is known
D2
Matrix whose rows are points at which observations were made
H1
Regressor basis functions for D1
H2
Regressor basis functions for D2
y
Code outputs. Toy example is y.toy
z
Observations. Toy example is z.toy
d
Data vector consisting of the code runs and observations
extractor
extractor function for D1
E.theta
Expectation WRT theta. Toy example is E.theta.toy()
Edash.theta
Expectation WRT the dashed theta. Toy example is
Edash.theta.toy()
phi.fun
Function to create hyperparameters; passed (in
stage1()
and stage2()
) to phi.change()
. Toy
version is phi.fun.toy()
method
Method argument passed to optim()
; qv
include.prior
Boolean variable with default TRUE
meaning
to include the prior distribution in the optimization process and
FALSE
meaning to use an uniformative prior (effectively
uniform support). This variable is passed to
lognormally.distributed
Boolean with TRUE
meaning to use
a lognormal distn. See prob.theta
for details
do.filewrite
Boolean, with TRUE
meaning to
save a load
able file stage[123].
, containing the interim value of phi
and the corresponding optimand to directory
at each evalution
of the opt
directory
The directory to write files to; only matters if
do.filewrite
is TRUE
isotropic
In function stage2()
, Boolean with default
FALSE
meaning to carry out a full optimization, and
TRUE
meaning to restrict the scope to isotroic roughness
matrices. See details section below
do.print
Boolean, with default TRUE
meaning to print
interim values of phi
at each evaluation
use.standin
In stage2()
, a Boolean argument, with
default FALSE
meaning to use the real value for matrix
V.temp
, and TRUE
meaning to use a standing that is the
same size but contains fictitious values.
theta.start
In stage3()
, the starting point of the
optimization with default NULL
meaning to use the maximum
likelihood point of the apriori distribution (ie phi$theta.apriori$mean
)
phi
Hyperparameters. Used as initial values for the
hyperparameters in the optimization routines