sde.examples {msde} | R Documentation |
Example SDE models.
Description
Provides sample C++
code for several SDE models.
Usage
sde.examples(
model = c("hest", "pgnet", "lotvol", "biou", "eou"),
file.only = FALSE
)
Arguments
model |
Character string giving the name of a sample model. Possible values are: |
file.only |
If |
Details
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")
.
Value
An sde.model
object, or the path to the C++ model header file.
See Also
sde.make.model()
for sde.model
objects, mvn.hyper.check()
for specification of the default prior.
Examples
# 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)
[Package msde version 1.0.5 Index]