View source: R/FunctionAndOperators.R
setMap | R Documentation |
'setMap
' is the constructor of an object of class yuima.Map
that describes a map of a SDE
setMap(func, yuima, out.var = "", nrow = 1, ncol = 1)
func |
a matrix or a vector of strings that describe each component of the map. |
yuima |
an object of class |
out.var |
label for the output |
nrow |
dimension of Map if |
ncol |
dimension of output if |
The constructor returns an object of class yuima.Map
.
The YUIMA Project Team
Yuima Documentation
## Not run: # Definition of a yuima model mod <- setModel(drift=c("a1", "a2"), diffusion = matrix(c("s1","0","0","s2"),2,2), solve.variable = c("X","Y")) # Definition of a map my.Map <- matrix(c("(X+Y)","-X-Y", "a*exp(X-a1*t)","b*exp(Y-a2*t)"), nrow=2,ncol=2) # Construction of yuima.Map yuimaMap <- setMap(func = my.Map, yuima = mod, out.var = c("f11","f21","f12","f22")) # Simulation of a Map set.seed(123) samp <- setSampling(0, 100,n = 1000) mypar <- list(a=1, b=1, s1=0.1, s2=0.2, a1=0.1, a2=0.1) sim1 <- simulate(object = yuimaMap, true.parameter = mypar, sampling = samp) # plot plot(sim1, ylab = yuimaMap@Output@param@out.var, main = "simulation Map", cex.main = 0.8) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.