simulate,Regression-method {BaPreStoPro} | R Documentation |
Simulation of the regression model y_i = f(φ, t_i) + ε_i, ε_i\sim N(0,γ^2\widetilde{s}(t_i)).
## S4 method for signature 'Regression' simulate(object, nsim = 1, seed = NULL, t, plot.series = TRUE)
object |
class object of parameters: "Diffusion" |
nsim |
number of trajectories to simulate. Default is 1. |
seed |
optional: seed number for random number generator |
t |
vector of time points |
plot.series |
logical(1), if TRUE, simulated series are depicted grafically |
model <- set.to.class("Regression", parameter = list(phi = 5, gamma2 = 0.1), fun = function(phi, t) phi*t) t <- seq(0, 1, by = 0.01) data <- simulate(model, t = t, plot.series = TRUE)