Langevin

R 패키지 메타데이터와 수집 신호를 모아 봅니다.

Packages / CRAN / Langevin

Langevin

v1.3.3
Repository CRANLicense GPL (>= 2)Lifecycle activeNeeds compilation yes
DOI
10.32614/CRAN.package.Langevin

Core Signals

첫 화면에서 판단해야 할 수집 신호를 먼저 배치합니다.

0
표시할 핵심 신호가 없습니다.

Supported Backends

DESCRIPTION에서 감지한 backend 관련 package입니다.

0
backend package 신호가 없습니다.

Quick Facts

기본 메타데이터를 작은 카드와 토큰으로 압축합니다.

profile
Repository
CRAN
Version
1.3.3
License
GPL (>= 2)
Lifecycle
active
Needs compilation
yes
Last observed
2026-05-30
CRAN
cran.r-project.org/package=Langevin

Build fields

LinkingTo
2
RcppRcppArmadillo (>= 15.0.2-2)

수집 소스별 패키지 정보

1개 소스
CRAN
1.3.3
2026-05-30
License
GPL (>= 2)
Depends
R (>= 3.3.0)
Imports
Rcpp (>= 1.0.12)
LinkingTo
Rcpp, RcppArmadillo (>= 15.0.2-2)
Needs compilation
yes
Lifecycle
active
Last observed
2026-05-30 10:45:11

이 패키지가 의존하는 패키지

3개 표시전체 3개
PackageTypeSpec
Rcpp
CRAN · 1.3.3 · 2026-05-30
ImportsRcpp (>= 1.0.12)
Rcpp
CRAN · 1.3.3 · 2026-05-30
LinkingToRcpp
RcppArmadillo
CRAN · 1.3.3 · 2026-05-30
LinkingToRcppArmadillo (>= 15.0.2-2)
1 / 1

이 패키지를 쓰는 패키지

0개 표시전체 0개
PackageTypeSpec
표시할 dependency edge가 없습니다.
1 / 1

패키지 페이지

All links
24
Repository
CRAN
Version
1.3.3
Collected
2026-05-27 11:39:04
Package page
https://cran.r-project.org/web/packages/Langevin/index.html
DOI
10.32614/CRAN.package.Langevin
Citation
https://cran.r-project.org/web/packages/Langevin/citation.html
CRAN checks
https://cran.r-project.org/web/checks/check_results_Langevin.html
README
https://cran.r-project.org/web/packages/Langevin/readme/README.html
Reference HTML
https://cran.r-project.org/web/packages/Langevin/refman/Langevin.html
Reference PDF
https://cran.r-project.org/web/packages/Langevin/Langevin.pdf
Source package
https://cran.r-project.org/src/contrib/Langevin_1.3.3.tar.gz
Archive
https://CRAN.R-project.org/src/contrib/Archive/Langevin
Page fields
Author
Philip Rinn [aut, cre], Pedro G. Lind [aut], David Bastine [ctb]
CRAN Checks
Langevin results
Citation
Langevin citation info
DOI
10.32614/CRAN.package.Langevin
License
GPL-2 | GPL-3 [expanded from: GPL (≥ 2)]
LinkingTo
Rcpp , RcppArmadillo (≥ 15.0.2-2)
Maintainer
Philip Rinn <philip.rinn at uni-oldenburg.de>
Materials
README , ChangeLog
NeedsCompilation
yes
Old Sources
Langevin archive
Package Source
Langevin_1.3.3.tar.gz
Published
2025-10-12
Reference Manual
Langevin.html , Langevin.pdf
URL
https://gitlab.uni-oldenburg.de/TWiSt/Langevin
Version
1.3.3
Vignettes
An Introduction to Modeling Markov Processes with the Langevin Approach ( source )
Windows Binaries
r-devel: Langevin_1.3.3.zip , r-release: Langevin_1.3.3.zip , r-oldrel: Langevin_1.3.3.zip
MacOS Binaries
r-release (arm64): Langevin_1.3.3.tgz , r-oldrel (arm64): Langevin_1.3.3.tgz , r-release (x86_64): Langevin_1.3.3.tgz , r-oldrel (x86_64): Langevin_1.3.3.tgz
Version
1.3.3
LinkingTo
Rcpp , RcppArmadillo (≥ 15.0.2-2)
Published
2025-10-12
DOI
10.32614/CRAN.package.Langevin
Author
Philip Rinn [aut, cre], Pedro G. Lind [aut], David Bastine [ctb]
Maintainer
Philip Rinn <philip.rinn at uni-oldenburg.de>
License
GPL-2 | GPL-3 [expanded from: GPL (≥ 2)]
URL
https://gitlab.uni-oldenburg.de/TWiSt/Langevin
NeedsCompilation
yes
Citation
Langevin citation info
Materials
README , ChangeLog
CRAN Checks
Langevin results
Reference Manual
Langevin.html , Langevin.pdf
Vignettes
An Introduction to Modeling Markov Processes with the Langevin Approach ( source )
Package Source
Langevin_1.3.3.tar.gz
Windows Binaries
r-devel: Langevin_1.3.3.zip , r-release: Langevin_1.3.3.zip , r-oldrel: Langevin_1.3.3.zip
MacOS Binaries
r-release (arm64): Langevin_1.3.3.tgz , r-oldrel (arm64): Langevin_1.3.3.tgz , r-release (x86_64): Langevin_1.3.3.tgz , r-oldrel (x86_64): Langevin_1.3.3.tgz
Old Sources
Langevin archive
Page sections 3
Documentation
Heading
Documentation
Links
[{"label":"Langevin.html","section":"","type":"","url":"https://cran.r-project.org/web/packages/Langevin/refman/Langevin.html"},{"label":"Langevin.pdf","section":"","type":"","url":"https://cran.r-project.org/web/packages/Langevin/Langevin.pdf"},{"label":"An Introduction to Modeling Markov Processes with the Langevin Approach","section":"","type":"","url":"https://cran.r-project.org/web/packages/Langevin/vignettes/Langevin.pdf"},{"label":"source","section":"","type":"","url":"https://cran.r-project.org/web/packages/Langevin/vignettes/Langevin.Rnw"}]
Text
Reference manual: Langevin.html , Langevin.pdf Vignettes: An Introduction to Modeling Markov Processes with the Langevin Approach ( source )
Downloads
Heading
Downloads
Links
[{"label":"Langevin_1.3.3.tar.gz","section":"","type":"","url":"https://cran.r-project.org/src/contrib/Langevin_1.3.3.tar.gz"},{"label":"Langevin_1.3.3.zip","section":"","type":"","url":"https://cran.r-project.org/bin/windows/contrib/4.7/Langevin_1.3.3.zip"},{"label":"Langevin_1.3.3.zip","section":"","type":"","url":"https://cran.r-project.org/bin/windows/contrib/4.6/Langevin_1.3.3.zip"},{"label":"Langevin_1.3.3.zip","section":"","type":"","url":"https://cran.r-project.org/bin/windows/contrib/4.5/Langevin_1.3.3.zip"},{"label":"Langevin_1.3.3.tgz","section":"","type":"","url":"https://cran.r-project.org/bin/macosx/sonoma-arm64/contrib/4.6/Langevin_1.3.3.tgz"},{"label":"Langevin_1.3.3.tgz","section":"","type":"","url":"https://cran.r-project.org/bin/macosx/big-sur-arm64/contrib/4.5/Langevin_1.3.3.tgz"},{"label":"Langevin_1.3.3.tgz","section":"","type":"","url":"https://cran.r-project.org/bin/macosx/big-sur-x86_64/contrib/4.6/Langevin_1.3.3.tgz"},{"label":"Langevin_1.3.3.tgz","section":"","type":"","url":"https://cran.r-project.org/bin/macosx/big-sur-x86_64/contrib/4.5/Langevin_1.3.3.tgz"},{"label":"Langevin archive","section":"","type":"","url":"https://CRAN.R-project.org/src/contrib/Archive/Langevin"}]
Text
Package source: Langevin_1.3.3.tar.gz Windows binaries: r-devel: Langevin_1.3.3.zip , r-release: Langevin_1.3.3.zip , r-oldrel: Langevin_1.3.3.zip macOS binaries: r-release (arm64): Langevin_1.3.3.tgz , r-oldrel (arm64): Langevin_1.3.3.tgz , r-release (x86_64): Langevin_1.3.3.tgz , r-oldrel (x86_64): Langevin_1.3.3.tgz Old sources: Langevin archive
Linking
Heading
Linking
Links
[{"label":"https://CRAN.R-project.org/package=Langevin","section":"","type":"","url":"https://CRAN.R-project.org/package=Langevin"}]
Text
Please use the canonical form https://CRAN.R-project.org/package=Langevin to link to this page.
Materials 2
Documentation 4
Vignettes 2
Downloads 9
All page links 24

패키지 문서 원문

5 artifacts
citation
Citation
CRAN · 1.3.3 · Citation · text/html · 2,099 · 2026-05-07
Title
CRAN: Langevin citation info
Label
Citation
Text content
Text content
CRAN: Langevin citation info To cite the 'Langevin' package in publications use: Rinn P, Lind P, Wächter M, Peinke J (2016). “The Langevin Approach: An R Package for Modeling Markov Processes.” Journal of Open Research Software , 4 (1), e34. ISSN 2049-9647, doi:10.5334/jors.123 . To cite the 'Langevin Approach' in publications use: Friedrich R, Peinke J, Sahimi M, Reza Rahimi Tabar M (2011). “Approaching complexity by stochastic methods: From biological systems to turbulence.” Physics Reports , 506 (5), 87–162. ISSN 0370-1573, doi:10.1016/j.physrep.2011.05.003 . Corresponding BibTeX entries: @Article{Rinn2016, title = {The Langevin Approach: An R Package for Modeling Markov Processes}, author = {Philip Rinn and Pedro G. Lind and Matthias Wächter and Joachim Peinke}, journal = {Journal of Open Research Software}, year = {2016}, number = {1}, pages = {e34}, volume = {4}, doi = {10.5334/jors.123}, issn = {2049-9647}, publisher = {Ubiquity Press}, } @Article{Friedrich2011, title = {Approaching complexity by stochastic methods: From biological systems to turbulence}, author = {Rudolf Friedrich and Joachim Peinke and Muhammad Sahimi and Mohammed {Reza Rahimi Tabar}}, journal = {Physics Reports}, year = {2011}, number = {5}, pages = {87--162}, volume = {506}, doi = {10.1016/j.physrep.2011.05.003}, issn = {0370-1573}, publisher = {Elsevier BV}, }
field
README
CRAN · 1.3.3 · Materials · text/html · 6,267 · 2026-05-07
Title
README
Label
README
Text content
Text content
README code{white-space: pre-wrap;} span.smallcaps{font-variant: small-caps;} span.underline{text-decoration: underline;} div.column{display: inline-block; vertical-align: top; width: 50%;} div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} ul.task-list{list-style: none;} pre > code.sourceCode { white-space: pre; position: relative; } pre > code.sourceCode > span { display: inline-block; line-height: 1.25; } pre > code.sourceCode > span:empty { height: 1.2em; } .sourceCode { overflow: visible; } code.sourceCode > span { color: inherit; text-decoration: inherit; } div.sourceCode { margin: 1em 0; } pre.sourceCode { margin: 0; } @media screen { div.sourceCode { overflow: auto; } } @media print { pre > code.sourceCode { white-space: pre-wrap; } pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; } } pre.numberSource code { counter-reset: source-line 0; } pre.numberSource code > span { position: relative; left: -4em; counter-increment: source-line; } pre.numberSource code > span > a:first-child::before { content: counter(source-line); position: relative; left: -1em; text-align: right; vertical-align: baseline; border: none; display: inline-block; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; padding: 0 4px; width: 4em; color: #aaaaaa; } pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; } div.sourceCode { } @media screen { pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; } } code span.al { color: #ff0000; font-weight: bold; } /* Alert */ code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */ code span.at { color: #7d9029; } /* Attribute */ code span.bn { color: #40a070; } /* BaseN */ code span.bu { color: #008000; } /* BuiltIn */ code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */ code span.ch { color: #4070a0; } /* Char */ code span.cn { color: #880000; } /* Constant */ code span.co { color: #60a0b0; font-style: italic; } /* Comment */ code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */ code span.do { color: #ba2121; font-style: italic; } /* Documentation */ code span.dt { color: #902000; } /* DataType */ code span.dv { color: #40a070; } /* DecVal */ code span.er { color: #ff0000; font-weight: bold; } /* Error */ code span.ex { } /* Extension */ code span.fl { color: #40a070; } /* Float */ code span.fu { color: #06287e; } /* Function */ code span.im { color: #008000; font-weight: bold; } /* Import */ code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */ code span.kw { color: #007020; font-weight: bold; } /* Keyword */ code span.op { color: #666666; } /* Operator */ code span.ot { color: #007020; } /* Other */ code span.pp { color: #bc7a00; } /* Preprocessor */ code span.sc { color: #4070a0; } /* SpecialChar */ code span.ss { color: #bb6688; } /* SpecialString */ code span.st { color: #4070a0; } /* String */ code span.va { color: #19177c; } /* Variable */ code span.vs { color: #4070a0; } /* VerbatimString */ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */ Langevin Analysis in One and Two Dimensions The Langevin package provides R functions to estimate drift and diffusion functions from time series and generate synthetic time series from given drift and diffusion coefficients. Documentation All functions of the Langevin package have corresponding help files. Additionally the package ships a pdf vignette which corresponds to a paper published in the Journal of Open Research Software. Citation To cite the Langevin package and/or the mathematical concept behind it correctly see citation("Langevin") for details. Examples The help files for each function contain usage examples, additionally the package repository ships a script with examples that reproduce the figures from the vignette. Installation Released and tested versions of the Langevin package are available at CRAN and can be installed from within R via install.packages ( "Langevin" ) The development version of the Langevin package can be installed from within R via install.packages ( "devtools" ) devtools :: install_git ( "https://gitlab.uni-oldenburg.de/TWiSt/Langevin.git" ) Authors Philip Rinn, Pedro G. Lind and David Bastine License GPL (>= 2)
reference_manual_html
Reference manual HTML
CRAN · 1.3.3 · Documentation · text/html · 26,485 · 2026-05-07
Title
Help for package Langevin
Label
Reference manual HTML
Text content
Text content
Help for package Langevin const macros = { "\\R": "\\textsf{R}", "\\mbox": "\\text", "\\code": "\\texttt"}; function processMathHTML() { var l = document.getElementsByClassName('reqn'); for (let e of l) { katex.render(e.textContent, e, { throwOnError: false, macros }); } return; } Package {Langevin} Contents Langevin-package Langevin1D Langevin2D plot.Langevin print.Langevin summary.Langevin timeseries1D timeseries2D Type: Package Title: Langevin Analysis in One and Two Dimensions Version: 1.3.3 Date: 2025-10-12 Description: Estimate drift and diffusion functions from time series and generate synthetic time series from given drift and diffusion coefficients. Encoding: UTF-8 License: GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] URL: https://gitlab.uni-oldenburg.de/TWiSt/Langevin LazyLoad: yes ByteCompile: yes NeedsCompilation: yes Depends: R (≥ 3.3.0) Imports: Rcpp (≥ 1.0.12) LinkingTo: Rcpp, RcppArmadillo (≥ 15.0.2-2) RoxygenNote: 7.3.1 Packaged: 2025-10-12 17:27:29 UTC; philip Author: Philip Rinn [aut, cre], Pedro G. Lind [aut], David Bastine [ctb] Maintainer: Philip Rinn <philip.rinn@uni-oldenburg.de> Repository: CRAN Date/Publication: 2025-10-12 18:30:02 UTC An R package for stochastic data analysis Description The Langevin package provides functions to estimate drift and diffusion functions from data sets. Details This package was developed by the research group Turbulence, Wind energy and Stochastics (TWiSt) at the Carl von Ossietzky University of Oldenburg (Germany). Mathematical Background A wide range of dynamic systems can be described by a stochastic differential equation, the Langevin equation. The time derivative of the system trajectory \dot{X}(t) can be expressed as a sum of a deterministic part D^{(1)} and the product of a stochastic force \Gamma(t) and a weight coefficient D^{(2)} . The stochastic force \Gamma(t) is \delta -correlated Gaussian white noise. For stationary continuous Markov processes Siegert et al. and Friedrich et al. developed a method to reconstruct drift D^{(1)} and diffusion D^{(2)} directly from measured data. \dot{X}(t) = D^{(1)}(X(t),t) + \sqrt{D^{(2)}(X(t),t)}\,\Gamma(t)\quad \mathrm{with} D^{(n)}(x,t) = \lim_{\tau \rightarrow 0} \frac{1}{\tau} M^{(n)}(x,t,\tau)\quad \mathrm{and} M^{(n)}(x,t,\tau) = \frac{1}{n!} \langle (X(t+\tau) - x)^n \rangle |_{X(t) = x} The Langevin equation should be interpreted in the way that for every time t_i where the system meets an arbitrary but fixed point x in phase space, X(t_i+\tau) is defined by the deterministic function D^{(1)}(x) and the stochastic function \sqrt{D^{(2)}(x)}\Gamma(t_i) . Both, D^{(1)}(x) and D^{(2)}(x) are constant for fixed x . One can integrate drift and diffusion numerically over small intervals. If the system is at time t in the state x = X(t) the drift can be calculated for small \tau by averaging over the difference of the system state at t+\tau and the state at t . The average has to be taken over the whole ensemble or in the stationary case over all t = t_i with X(t_i) = x . Diffusion can be calculated analogously. Author(s) Philip Rinn References A review of the Langevin method can be found at: Friedrich, R.; et al. (2011) Approaching Complexity by Stochastic Methods: From Biological Systems to Turbulence . Physics Reports, 506(5), 87–162. For further reading: Risken, H. (1996) The Fokker-Planck equation . Springer. Siegert, S.; et al. (1998) Analysis of data sets of stochastic systems . Phys. Lett. A. Friedrich, R.; et al. (2000) Extracting model equations from experimental data . Phys. Lett. A. Honisch, C.; Friedrich, R. (2011). Estimation of Kramers-Moyal coefficients at low sampling rates. . Physical Review E, 83(6), 066701. See Also Useful links: https://gitlab.uni-oldenburg.de/TWiSt/Langevin Calculate the Drift and Diffusion of one-dimensional stochastic processes Description Langevin1D calculates the Drift and Diffusion vectors (with errors) for a given time series. Usage Langevin1D( data, bins, steps, sf = ifelse(is.ts(data), frequency(data), 1), bin_min = 100, reqThreads = -1, kernel = FALSE, h ) Arguments data a vector containing the time series or a time-series object. bins a scalar denoting the number of bins to calculate the conditional moments on. steps a vector giving the \tau steps to calculate the conditional moments (in samples (= \tau * sf )). Only used if kernel is FALSE . sf a scalar denoting the sampling frequency (optional if data is a time-series object). bin_min a scalar denoting the minimal number of events per bin . Defaults to 100 . reqThreads a scalar denoting how many threads to use. Defaults to -1 which means all available cores. Only used if kernel is FALSE . kernel a logical denoting if the kernel based Nadaraya-Watson estimator should be used to calculate drift and diffusion vectors. h a scalar denoting the bandwidth of the data. Defaults to Scott's variation of Silverman's rule of thumb. Only used if kernel is TRUE . Value Langevin1D returns a list with thirteen (six if kernel is TRUE ) components: D1 a vector of the Drift coefficient for each bin . eD1 a vector of the error of the Drift coefficient for each bin . D2 a vector of the Diffusion coefficient for each bin . eD2 a vector of the error of the Diffusion coefficient for each bin . D4 a vector of the fourth Kramers-Moyal coefficient for each bin . mean_bin a vector of the mean value per bin . density a vector of the number of events per bin . If kernel is FALSE . M1 a matrix of the first conditional moment for each \tau . Rows correspond to bin , columns to \tau . If kernel is FALSE . eM1 a matrix of the error of the first conditional moment for each \tau . Rows correspond to bin , columns to \tau . If kernel is FALSE . M2 a matrix of the second conditional moment for each \tau . Rows correspond to bin , columns to \tau . If kernel is FALSE . eM2 a matrix of the error of the second conditional moment for each \tau . Rows correspond to bin , columns to \tau . If kernel is FALSE . M4 a matrix of the fourth conditional moment for each \tau . Rows correspond to bin , columns to \tau . If kernel is FALSE . U a vector of the bin borders. If kernel is FALSE . Author(s) Philip Rinn See Also Langevin2D Examples # Set number of bins, steps and the sampling frequency bins <- 20 steps <- c(1:5) sf <- 1000 #### Linear drift, constant diffusion # Generate a time series with linear D^1 = -x and constant D^2 = 1 x <- timeseries1D(N = 1e6, d11 = -1, d20 = 1, sf = sf) # Do the analysis est <- Langevin1D(data = x, bins = bins, steps = steps, sf = sf) # Plot the result and add the theoretical expectation as red line plot(est$mean_bin, est$D1) lines(est$mean_bin, -est$mean_bin, col = "red") plot(est$mean_bin, est$D2) abline(h = 1, col = "red") #### Cubic drift, constant diffusion # Generate a time series with cubic D^1 = x - x^3 and constant D^2 = 1 x <- timeseries1D(N = 1e6, d13 = -1, d11 = 1, d20 = 1, sf = sf) # Do the analysis est <- Langevin1D(data = x, bins = bins, steps = steps, sf = sf) # Plot the result and add the theoretical expectation as red line plot(est$mean_bin, est$D1) lines(est$mean_bin, est$mean_bin - est$mean_bin^3, col = "red") plot(est$mean_bin, est$D2) abline(h = 1, col = "red") Calculate the Drift and Diffusion of two-dimensional stochastic processes Description Langevin2D calculates the Drift (with error) and Diffusion matrices for given time series. Usage Langevin2D( data, bins, steps, sf = ifelse(is.mts(data), frequency(data), 1), bin_min = 100, reqThreads = -1 ) Arguments data a matrix containing the time series as columns or a time-series object. bins a scalar denoting the number of bins to calculate Drift and Diffusion on. steps a vector giving the \tau steps to calculate the moments (in samples). sf a scalar denoting the sampling frequency (optional if data is a time-series object). bin_min a scalar denoting the minimal number of events per bin . Defaults to 100 . reqThreads a scalar denoting how many threads to use. Defaults to -1 which mea
section
An Introduction to Modeling Markov Processes with the Langevin Approach
CRAN · 1.3.3 · Documentation · application/pdf · 449,554 · 2026-05-07
Title
An Introduction to Modeling Markov Processes with the Langevin Approach
Label
An Introduction to Modeling Markov Processes with the Langevin Approach
section
Langevin.pdf
CRAN · 1.3.3 · Documentation · application/pdf · 156,684 · 2026-05-07
Title
Langevin.pdf
Label
Langevin.pdf

Reference for Langevin (1.3.3)

8개 topic
Langevin-package
An package for stochastic data analysis
CRAN · 1.3.3 · package · Langevin/man/Langevin-package.Rd · 2026-05-07

The Langevin package provides functions to estimate drift and diffusion functions from data sets.

Aliases
LangevinLangevin-package
Keywords
internal
Details
This package was developed by the research group Turbulence, Wind energy and Stochastics (TWiSt) at the Carl von Ossietzky University of Oldenburg (Germany).
See also
Useful links: https://gitlab.uni-oldenburg.de/TWiSt/Langevin
Custom sections
Mathematical Background
A wide range of dynamic systems can be described by a stochastic differential equation, the Langevin equation. The time derivative of the system trajectory X(t) can be expressed as a sum of a deterministic part D^(1) and the product of a stochastic force (t) and a weight coefficient D^(2). The stochastic force (t) is -correlated Gaussian white noise. For stationary continuous Markov processes Siegert et al. and Friedrich et al. developed a method to reconstruct drift D^(1) and diffusion D^(2) directly from measured data. X(t) = D^(1)(X(t),t) + D^(2)(X(t),t)\,(t) with D^(n)(x,t) = _ 0 1 M^(n)(x,t,) and M^(n)(x,t,) = 1n! (X(t+) - x)^n |_X(t) = x The Langevin equation should be interpreted in the way that for every time t_i where the system meets an arbitrary but fixed point x in phase space, X(t_i+) is defined by the deterministic function D^(1)(x) and the stochastic function D^(2)(x)(t_i). Both, D^(1)(x) and D^(2)(x) are constant for fixed x. One can integrate drift and diffusion numerically over small intervals. If the system is at time t in the state x = X(t) the drift can be calculated for small by averaging over the difference of the system state at t+ and the state at t. The average has to be taken over the whole ensemble or in the stationary case over all t = t_i with X(t_i) = x. Diffusion can be calculated analogously.
Author
Philip Rinn
References
A review of the Langevin method can be found at: Friedrich, R.; et al. (2011) Approaching Complexity by Stochastic Methods: From Biological Systems to Turbulence. Physics Reports, 506(5), 87–162. For further reading: Risken, H. (1996) The Fokker-Planck equation. Springer. Siegert, S.; et al. (1998) Analysis of data sets of stochastic systems. Phys. Lett. A. Friedrich, R.; et al. (2000) Extracting model equations from experimental data. Phys. Lett. A. Honisch, C.; Friedrich, R. (2011). Estimation of Kramers-Moyal coefficients at low sampling rates.. Physical Review E, 83(6), 066701.
Langevin1D
Calculate the Drift and Diffusion of one-dimensional stochastic processes
CRAN · 1.3.3 · Langevin/man/Langevin1D.Rd · 2026-05-07

Langevin1D calculates the Drift and Diffusion vectors (with errors) for a given time series.

Aliases
Langevin1D
Usage
Langevin1D( data, bins, steps, sf = ifelse(is.ts(data), frequency(data), 1), bin_min = 100, reqThreads = -1, kernel = FALSE, h )
Arguments
data
a vector containing the time series or a time-series object.
bins
a scalar denoting the number of bins to calculate the conditional moments on.
steps
a vector giving the steps to calculate the conditional moments (in samples (= * sf)). Only used if kernel is FALSE.
sf
a scalar denoting the sampling frequency (optional if data is a time-series object).
bin_min
a scalar denoting the minimal number of events per bin. Defaults to 100.
reqThreads
a scalar denoting how many threads to use. Defaults to -1 which means all available cores. Only used if kernel is FALSE.
kernel
a logical denoting if the kernel based Nadaraya-Watson estimator should be used to calculate drift and diffusion vectors.
h
a scalar denoting the bandwidth of the data. Defaults to Scott's variation of Silverman's rule of thumb. Only used if kernel is TRUE.
Value
Langevin1D returns a list with thirteen (six if kernel is TRUE) components: D1a vector of the Drift coefficient for each bin. eD1a vector of the error of the Drift coefficient for each bin. D2a vector of the Diffusion coefficient for each bin. eD2a vector of the error of the Diffusion coefficient for each bin. D4a vector of the fourth Kramers-Moyal coefficient for each bin. mean_bina vector of the mean value per bin. densitya vector of the number of events per bin. If kernel is FALSE. M1a matrix of the first conditional moment for each . Rows correspond to bin, columns to . If kernel is FALSE. eM1a matrix of the error of the first conditional moment for each . Rows correspond to bin, columns to . If kernel is FALSE. M2a matrix of the second conditional moment for each . Rows correspond to bin, columns to . If kernel is FALSE. eM2a matrix of the error of the second conditional moment for each . Rows correspond to bin, columns to . If kernel is FALSE. M4a matrix of the fourth conditional moment for each . Rows correspond to bin, columns to . If kernel is FALSE. Ua vector of the bin borders. If kernel is FALSE.
Examples
# Set number of bins, steps and the sampling frequency bins <- 20 steps <- c(1:5) sf <- 1000 #### Linear drift, constant diffusion # Generate a time series with linear D^1 = -x and constant D^2 = 1 x <- timeseries1D(N = 1e6, d11 = -1, d20 = 1, sf = sf) # Do the analysis est <- Langevin1D(data = x, bins = bins, steps = steps, sf = sf) # Plot the result and add the theoretical expectation as red line plot(est$mean_bin, est$D1) lines(est$mean_bin, -est$mean_bin, col = "red") plot(est$mean_bin, est$D2) abline(h = 1, col = "red") #### Cubic drift, constant diffusion # Generate a time series with cubic D^1 = x - x^3 and constant D^2 = 1 x <- timeseries1D(N = 1e6, d13 = -1, d11 = 1, d20 = 1, sf = sf) # Do the analysis est <- Langevin1D(data = x, bins = bins, steps = steps, sf = sf) # Plot the result and add the theoretical expectation as red line plot(est$mean_bin, est$D1) lines(est$mean_bin, est$mean_bin - est$mean_bin^3, col = "red") plot(est$mean_bin, est$D2) abline(h = 1, col = "red")
See also
Langevin2D
Author
Philip Rinn
Langevin2D
Calculate the Drift and Diffusion of two-dimensional stochastic processes
CRAN · 1.3.3 · Langevin/man/Langevin2D.Rd · 2026-05-07

Langevin2D calculates the Drift (with error) and Diffusion matrices for given time series.

Aliases
Langevin2D
Usage
Langevin2D( data, bins, steps, sf = ifelse(is.mts(data), frequency(data), 1), bin_min = 100, reqThreads = -1 )
Arguments
data
a matrix containing the time series as columns or a time-series object.
bins
a scalar denoting the number of bins to calculate Drift and Diffusion on.
steps
a vector giving the steps to calculate the moments (in samples).
sf
a scalar denoting the sampling frequency (optional if data is a time-series object).
bin_min
a scalar denoting the minimal number of events per bin. Defaults to 100.
reqThreads
a scalar denoting how many threads to use. Defaults to -1 which means all available cores.
Value
Langevin2D returns a list with nine components: D1a tensor with all values of the drift coefficient. Dimension is bins x bins x 2. The first bins x bins elements define the drift D^(1)_1 for the first variable and the rest define the drift D^(1)_2 for the second variable. eD1a tensor with all estimated errors of the drift coefficient. Dimension is bins x bins x 2. Same expression as above. D2a tensor with all values of the diffusion coefficient. Dimension is bins x bins x 3. The first bins x bins elements define the diffusion D^(2)_11, the second bins x bins elements define the diffusion D^(2)_22 and the rest define the diffusion D^(2)_12 = D^(2)_21. mean_bina matrix of the mean value per bin. Dimension is bins x bins x 2. The first bins x bins elements define the mean for the first variable and the rest for the second variable. densitya matrix of the number of events per bin. Rows label the bin of the first variable and columns the second variable. M1a tensor of the first moment for each bin (line label) and each step (column label). Dimension is bins x bins x 2length(steps). eM1a tensor of the standard deviation of the first moment for each bin (line label) and each step (column label). Dimension is bins x bins x 2length(steps). M2a tensor of the second moment for each bin (line label) and each step (column label). Dimension is bins x bins x 3length(steps). Ua matrix of the bin borders
See also
Langevin1D
Author
Philip Rinn
plot.Langevin
Plot estimated drift and diffusion coefficients
CRAN · 1.3.3 · Langevin/man/plot.Langevin.Rd · 2026-05-07

plot method for class "Langevin". This method is only implemented for one-dimensional analysis for now.

Aliases
plot.Langevin
Usage
plotLangevin(x, pch = 20, ...)
Arguments
x
an object of class "Langevin".
pch
Either an integer specifying a symbol or a single character to be used as the default in plotting points. See points for possible values and their interpretation. Default is pch = 20.
...
Arguments to be passed to methods, such as par.
Author
Philip Rinn
print.Langevin
Print estimated drift and diffusion coefficients
CRAN · 1.3.3 · Langevin/man/print.Langevin.Rd · 2026-05-07

print method for class "Langevin".

Aliases
print.Langevin
Usage
printLangevin(x, digits = max(3, getOption("digits") - 3), ...)
Arguments
x
an object of class "Langevin".
digits
integer, used for number formatting with signif().
...
further arguments to be passed to or from other methods. They are ignored in this function.
Value
The function print.Langevin() returns an overview of the estimated drift and diffusion coefficients.
Author
Philip Rinn
summary.Langevin
Summarize estimated drift and diffusion coefficients
CRAN · 1.3.3 · Langevin/man/summary.Langevin.Rd · 2026-05-07

summary method for class "Langevin".

Aliases
summary.Langevin
Usage
summaryLangevin(object, ..., digits = max(3, getOption("digits") - 3))
Arguments
object
an object of class "Langevin".
...
arguments to be passed to or from other methods. They are ignored in this function.
digits
integer, used for number formatting with signif().
Value
The function summary.Langevin() returns a summary of the estimated drift and diffusion coefficients
Author
Philip Rinn
timeseries1D
Generate a 1D Langevin process
CRAN · 1.3.3 · Langevin/man/timeseries1D.Rd · 2026-05-07

timeseries1D generates a one-dimensional Langevin process using a simple Euler integration. The drift function is a cubic polynomial, the diffusion function a quadratic.

Aliases
timeseries1D
Usage
timeseries1D( N, startpoint = 0, d13 = 0, d12 = 0, d11 = -1, d10 = 0, d22 = 0, d21 = 0, d20 = 1, sf = 1000, dt = 0 )
Arguments
N
a scalar denoting the length of the time-series to generate.
startpoint
a scalar denoting the starting point of the time series.
d13, d12, d11, d10
scalars denoting the coefficients for the drift polynomial.
d22, d21, d20
scalars denoting the coefficients for the diffusion polynomial.
sf
a scalar denoting the sampling frequency.
dt
a scalar denoting the maximal time step of integration. Default dt=0 yields dt=1/sf.
Value
timeseries1D returns a time-series object of length N with the generated time-series.
Examples
# Generate standardized Ornstein-Uhlenbeck-Process (d11=-1, d20=1) # with integration time step 0.01 and sampling frequency 1 s <- timeseries1D(N=1e4, sf=1, dt=0.01); t <- 1:1e4; plot(t, s, t="l", main=paste("mean:", mean(s), " var:", var(s)));
See also
timeseries2D
Author
Philip Rinn
timeseries2D
Generate a 2D Langevin process
CRAN · 1.3.3 · Langevin/man/timeseries2D.Rd · 2026-05-07

timeseries2D generates a two-dimensional Langevin process using a simple Euler integration. The drift function is a cubic polynomial, the diffusion function a quadratic.

Aliases
timeseries2D
Usage
timeseries2D( N, startpointx = 0, startpointy = 0, D1_1 = matrix(c(0, -1, rep(0, 14)), nrow = 4), D1_2 = matrix(c(0, 0, 0, 0, -1, rep(0, 11)), nrow = 4), g_11 = matrix(c(1, 0, 0, 0, 0, 0, 0, 0, 0), nrow = 3), g_12 = matrix(c(0, 0, 0, 0, 0, 0, 0, 0, 0), nrow = 3), g_21 = matrix(c(0, 0, 0, 0, 0, 0, 0, 0, 0), nrow = 3), g_22 = matrix(c(1, 0, 0, 0, 0, 0, 0, 0, 0), nrow = 3), sf = 1000, dt = 0 )
Arguments
N
a scalar denoting the length of the time-series to generate.
startpointx
a scalar denoting the starting point of the time series x.
startpointy
a scalar denoting the starting point of the time series y.
D1_1
a 4x4 matrix denoting the coefficients of D1 for x.
D1_2
a 4x4 matrix denoting the coefficients of D1 for y.
g_11
a 3x3 matrix denoting the coefficients of g11 for x.
g_12
a 3x3 matrix denoting the coefficients of g12 for x.
g_21
a 3x3 matrix denoting the coefficients of g21 for y.
g_22
a 3x3 matrix denoting the coefficients of g22 for y.
sf
a scalar denoting the sampling frequency.
dt
a scalar denoting the maximal time step of integration. Default dt=0 yields dt=1/sf.
Details
The elements a_ij of the matrices are defined by the corresponding equations for the drift and diffusion terms: D^1_1,2 = _i,j=1^4 a_ij x_1^(i-1)x_2^(j-1) with a_ij = 0 for i + j > 5. g_11,12,21,22 = _i,j=1^3 a_ij x_1^(i-1)x_2^(j-1) with a_ij = 0 for i + j > 4
Value
timeseries2D returns a time-series object with the generated time-series as columns.
See also
timeseries1D
Author
Philip Rinn

버전 이력

RepositoryVersionPublishedFirst seenLast seenDocs
CRAN1.3.32026-05-292026-05-30

보안

표시할 OSV 데이터가 없습니다.

문헌 신호

표시할 OpenAlex 데이터가 없습니다.