Learn R Programming

sdetorus (version 0.1.10)

Statistical Tools for Toroidal Diffusions

Description

Implementation of statistical methods for the estimation of toroidal diffusions. Several diffusive models are provided, most of them belonging to the Langevin family of diffusions on the torus. Specifically, the wrapped normal and von Mises processes are included, which can be seen as toroidal analogues of the Ornstein-Uhlenbeck diffusion. A collection of methods for approximate maximum likelihood estimation, organized in four blocks, is given: (i) based on the exact transition probability density, obtained as the numerical solution to the Fokker-Plank equation; (ii) based on wrapped pseudo-likelihoods; (iii) based on specific analytic approximations by wrapped processes; (iv) based on maximum likelihood of the stationary densities. The package allows the replicability of the results in García-Portugués et al. (2019) .

Copy Link

Version

Install

install.packages('sdetorus')

Monthly Downloads

253

Version

0.1.10

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Eduardo Portugues

Last Published

March 1st, 2024

Functions in sdetorus (0.1.10)

dTpdPde1D

Transition probability density in 1D by PDE solving
dTpdPde2D

Transition probability density in 2D by PDE solving
dTpdWou1D

Approximation of the transition probability density of the WN diffusion in 1D
dTpdWou2D

Approximation of the transition probability density of the WN diffusion in 2D
dVm

Density of the von Mises
dWn1D

WN density in 1D
dTpdWou

Conditional probability density of the WOU process
dTvm

Mixtures of toroidal von Mises densities
diffCirc

Lagged differences for circular time series
driftMixVm

Drift for the mivM diffusion (circular case)
dTpdOu

Transition probability density of the univariate OU diffusion
driftMixIndVm

Drift for the mivM diffusion
euler1D

Simulation of trajectories of the WN or vM diffusion in 1D
dTpdMou

Transition probability density of the multivariate OU diffusion
driftWn1D

Drift of the WN diffusion in 1D
euler2D

Simulation of trajectories of the WN or MvM diffusion in 2D
driftWn2D

Drift of the WN diffusion in 2D
driftMvm

Drift for the MvM diffusion
matlab.like.colorRamps

Generate color palettes similar to the Matlab default
matMatch

Matching of matrices
driftJp

Drift for the JP diffusion
logBesselI0Scaled

Efficient computation of Bessel related functions
logLikWouPairs

Loglikelihood of WN in 2D when only the initial and final points are observed
mcTorusIntegrate

Monte Carlo integration on the torus
mleMou

Maximum likelihood estimation of the multivariate OU diffusion
linesCirc

Lines and arrows with vertical wrapping
driftWn

Drift for the WN diffusion
kIndex

Utilities for conversion between row-column indexing and linear indexing of matrices
linesTorus3d

Lines and arrows with wrapping in the torus
linesTorus

Lines and arrows with wrapping in the torus
plotSurface2D

Contour plot of a 2D surface
rStatWn2D

Simulation from the stationary density of a WN diffusion in 2D
mleOptimWrapper

Optimization wrapper for likelihood-based procedures
mlePde2D

MLE for toroidal process via PDE solving in 2D
mlePde1D

MLE for toroidal process via PDE solving in 1D
periodicTrapRule1D

Quadrature rules in 1D, 2D and 3D
plotSurface3D

Visualization of a 3D surface
rTpdWn2D

Simulation from the approximated transition distribution of a WN diffusion in 2D
mleOu

Maximum likelihood estimation of the OU diffusion
psMle

Maximum pseudo-likelihood estimation by wrapped pseudo-likelihoods
rTrajLangevin

Simulation of trajectories of a Langevin diffusion
rTrajMou

Simulation of trajectories for the multivariate OU diffusion
rTrajOu

Simulation of trajectories for the univariate OU diffusion
sigmaDiff

High-frequency estimate of the diffusion matrix
sdetorus

sdetorus - Statistical Tools for Toroidal Diffusions
rTrajWn1D

Simulation of trajectories for the WN diffusion in 1D
solveTridiag

Thomas algorithm for solving tridiagonal matrix systems, with optional presaving of LU decomposition
stepAheadWn1D

Multiple simulation of trajectory ends of the WN or vM diffusion in 1D
table.ramp.colorRamps

Constructs color palettes with sharp breaks
stepAheadWn2D

Multiple simulation of trajectory ends of the WN or MvM diffusion in 2D
torusAxis

Draws pretty axis labels for circular variables
toPiInt

Wrapping of radians to its principal values
weightsLinearInterp1D

Weights for linear interpolation in 1D and 2D
repRow

Replication of rows and columns
torusAxis3d

Draws pretty axis labels for circular variables
safeSoftMax

Safe softmax function for computing weights
scoreMatchWnBvm

Score and moment matching of a univariate or bivariate wrapped normal by a von Mises
rTrajWn2D

Simulation of trajectories for the WN diffusion in 2D
unwrapCircSeries

Unwrapping of circular time series
approxMleWn2D

Approximate MLE of the WN diffusion in 2D
dStatWn2D

Stationary density of a WN diffusion (with diagonal diffusion matrix) in 2D
approxMleWn1D

Approximate MLE of the WN diffusion in 1D
dBvm

Bivariate Sine von Mises density
crankNicolson1D

Crank--Nicolson finite difference scheme for the 1D Fokker--Planck equation with periodic boundaries
dPsTpd

Wrapped Euler and Shoji--Ozaki pseudo-transition probability densities
dJp

Jones and Pewsey (2005)'s circular distribution
crankNicolson2D

Crank--Nicolson finite difference scheme for the 2D Fokker--Planck equation with periodic boundaries
alphaToA

Valid drift matrices for the Ornstein--Uhlenbeck diffusion in 2D
approxMleWnPairs

Approximate MLE of the WN diffusion in 2D from a sample of initial and final pairs of angles.