mlmc.test | R Documentation |
Computes a suite of diagnostic values for an MLMC estimation problem.
mlmc.test(
mlmc_l,
N,
L,
N0,
eps.v,
Lmin,
Lmax,
alpha = NA,
beta = NA,
gamma = NA,
parallel = NA,
silent = FALSE,
...
)
mlmc_l |
a user supplied function which provides the estimate for level The user supplied function should return a named list containing one element named
See the function (and source code of) |
N |
number of samples to use in convergence tests, kurtosis, telescoping sum check. |
L |
number of levels to use in convergence tests, kurtosis, telescoping sum check. |
N0 |
initial number of samples which are used for the first 3 levels and for any subsequent levels which are automatically added in the complexity tests.
Must be |
eps.v |
a vector of one or more target accuracies for the complexity tests.
Must all be |
Lmin |
the minimum level of refinement for complexity tests.
Must be |
Lmax |
the maximum level of refinement for complexity tests.
Must be |
alpha |
the weak error, |
beta |
the variance, |
gamma |
the sample cost, |
parallel |
if an integer is supplied, R will fork |
silent |
set to TRUE to supress running output (identical output can still be printed by printing the return result) |
... |
additional arguments which are passed on when the user supplied |
See one of the example level sampler functions (e.g. opre_l()
) for example usage.
This function is based on GPL-2 'Matlab' code by Mike Giles.
An mlmc.test
object which contains all the computed diagnostic values.
This object can be printed or plotted (see plot.mlmc.test
).
Louis Aslett <louis.aslett@durham.ac.uk>
Mike Giles <Mike.Giles@maths.ox.ac.uk>
Tigran Nagapetyan <nagapetyan@stats.ox.ac.uk>
# Example calls with realistic arguments
# Financial options using an Euler-Maruyama discretisation
tst <- mlmc.test(opre_l, N = 2000000,
L = 5, N0 = 1000,
eps.v = c(0.005, 0.01, 0.02, 0.05, 0.1),
Lmin = 2, Lmax = 6,
option = 1)
tst
plot(tst)
# Financial options using a Milstein discretisation
tst <- mlmc.test(mcqmc06_l, N = 20000,
L = 8, N0 = 200,
eps.v = c(0.005, 0.01, 0.02, 0.05, 0.1),
Lmin = 2, Lmax = 10,
option = 1)
tst
plot(tst)
# Toy versions for CRAN tests
tst <- mlmc.test(opre_l, N = 10000,
L = 5, N0 = 1000,
eps.v = c(0.025, 0.1),
Lmin = 2, Lmax = 6,
option = 1)
tst <- mlmc.test(mcqmc06_l, N = 10000,
L = 8, N0 = 1000,
eps.v = c(0.025, 0.1),
Lmin = 2, Lmax = 10,
option = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.