Skip to content

code to fit a stochastic differential equation to data

Notifications You must be signed in to change notification settings

porlan1/sde-fit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sdef is software for fitting stochastic differential equations to data. Currently, it is in an early stage of development, but works well for fitting data to the stochastic logistic equation. In the future, I plan on expanding this to multidimensional (SDE systems) problems as well as accommodating for observation errors in the data.

The main program found in "sdef_Fit.c" has the following structure:

  1. Stochastic data is generated by the numerical solution of the logistic SDE.

  2. A simulated annealing algorithm is used to find optimal parameters that minimize the negative log likelihood function. I use a modified brownian bridge procedure to estimate the likelihood relatively quickly. Alternatively, a Fokker-Planck based NLL function is also included.

  3. Observation and fit data, along with NLL data is used to generate scripts for gnuplot (http://gnuplot.info).

The program depends upon the gsl C library (https://www.gnu.org/software/gsl/).

To compile on a mac, in terminal run:

gcc -lgsl -lm -lblas -o sdef sdef_Fit.c sdef_Fokker_Planck.c sdef_ODE.c sdef_SDE.c sdef_siman.c sdef_misc.c sdef_NLL.c sdef_plotting.c

To execute the program run:

./sdef

About

code to fit a stochastic differential equation to data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages