sde.examples {msde} | R Documentation |
Provides sample C++
code for several SDE models.
sde.examples(model = c("hest", "pgnet", "lotvol", "biou", "eou"), file.only = FALSE)
model |
Character string giving the name of a sample model. Possible values are: |
file.only |
If |
All pre-compiled models are with the default prior and with OpenMP
disabled. A full description of the example models can be found in the package vignette; to view it run vignette("msde-exmodels")
.
An sde.model
object, or the path to the C++ model header file.
sde.make.model
for sde.model
objects, mvn.hyper.check
for specification of the default prior.
# Heston's model hmod <- sde.examples("hest") # load pre-compiled model # inspect model's C++ code hfile <- sde.examples("hest", file.only = TRUE) cat(readLines(hfile), sep = "\n") ## Not run: # compile it from scratch param.names <- c("alpha", "gamma", "beta", "sigma", "rho") data.names <- c("X", "Z") hmod <- sde.make.model(ModelFile = hfile, param.names = param.names, data.names = data.names) ## End(Not run)