13
$\begingroup$

I'm looking for a general, clean and fast (i.e. using C++ routines) R package for simulating paths from a non-homogeneous nonlinear diffusion like (1) using the Euler-Maruyama scheme, the Milstein scheme (or any other). This is destined to be embedded into a larger estimation code and therefore deserves to be optimized.

$$dX_t = f(\theta, t, X_t)\, dt + g(\theta, t, X_t)\, dW_t, \tag{1}$$

with $W_t$ the standard Brownian motion.

$\endgroup$
3
  • 1
    $\begingroup$ (+1) Interesting question. It is important to notice that the solution to this sort of SDE does not always exist or it may not be unique. In addition, simulation of diffusion processes can be quite difficult (it is actually a hot topic at the moment). $\endgroup$ – user10525 Oct 9 '12 at 14:37
  • 2
    $\begingroup$ It is. Analytic solutions are indeed rare and the existence of a solution is to be demonstrated but you are always able to simulate though...I will end-up recoding my R programs in C if nobody comes up with a ready made tool...most general analysis software generally have an all-purpose solver funny R seems to provide only specific simulators, or I may have overlooked the right package $\endgroup$ – julien stirnemann Oct 9 '12 at 22:19
  • $\begingroup$ Here is a good place (and people) to start with: web.warwick.ac.uk/statsdept/user-2011/tutorials/Soetaert.html $\endgroup$ – JohnRos Feb 12 '13 at 7:27
7
+50
$\begingroup$

CRAN is your friend: http://cran.r-project.org/web/views/DifferentialEquations.html

Stochastic Differential Equations (SDEs)

In a stochastic differential equation, the unknown quantity is a stochastic process.

  • The package sde provides functions for simulation and inference for stochastic differential equations. It is the accompanying package to the book by Iacus (2008).
  • The package pomp contains functions for statistical inference for partially observed Markov processes.
  • The Sim.DiffProc package simulates diffusion processes and has functions for numerical solution of stochastic differential equations.
  • Package GillespieSSA implements Gillespie's exact stochastic simulation algorithm (Direct method) and several approximate methods.
$\endgroup$
0
$\begingroup$

There is a R package for SDE: http://cran.r-project.org/web/packages/sde/sde.pdf But I am not sure if it works for non-homogeneous SDE

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.