ae | R Documentation |
Asymptotic expansion of uni-dimensional and multi-dimensional diffusion processes.
ae( model, xinit, order = 1L, true.parameter = list(), sampling = NULL, eps.var = "eps", solver = "rk4", verbose = FALSE )
model |
an object of |
xinit |
initial value vector of state variables. |
order |
integer. The asymptotic expansion order. Higher orders lead to better approximations but longer computational times. |
true.parameter |
named list of parameters. |
sampling |
a |
eps.var |
character. The perturbation variable. |
solver |
the solver for ordinary differential equations. One of |
verbose |
logical. Print on progress? Default |
If sampling
is not provided, then model
must be an object of yuima-class
with non-empty sampling
.
if eps.var
does not appear in the model specification, then it is internally added in front of the diffusion matrix to apply the asymptotic expansion scheme.
An object of yuima.ae-class
Emanuele Guidotti <emanuele.guidotti@unine.ch>
## Not run: # model gbm <- setModel(drift = 'mu*x', diffusion = 'sigma*x', solve.variable = 'x') # settings xinit <- 100 par <- list(mu = 0.01, sigma = 0.2) sampling <- setSampling(Initial = 0, Terminal = 1, n = 1000) # asymptotic expansion approx <- ae(model = gbm, sampling = sampling, order = 4, true.parameter = par, xinit = xinit) # exact density x <- seq(50, 200, by = 0.1) exact <- dlnorm(x = x, meanlog = log(xinit)+(par$mu-0.5*par$sigma^2)*1, sdlog = par$sigma*sqrt(1)) # compare plot(x, exact, type = 'l', ylab = "Density") lines(x, aeDensity(x = x, ae = approx, order = 1), col = 2) lines(x, aeDensity(x = x, ae = approx, order = 2), col = 3) lines(x, aeDensity(x = x, ae = approx, order = 3), col = 4) lines(x, aeDensity(x = x, ae = approx, order = 4), col = 5) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.