CircularDDM implements circular drift-diffusion model, using Armadillo C++.
MATLAB callable functions reside in inst/matlab folder. Currently, we provide only Linux binary (mexa64 files compiled by g++ 5.4.0). If the libraries, GNU gsl and armadillo C++ (requiring LAPACK and BLAS), are installed, one should be able to compile the source codes in other systems, such as Windows (mexw64 files) and OS X (mexmaci64 files).
The following examples are extracted from CircularDDM help pages
require(CircularDDM)
###################
## dcddm example ##
###################
x <- cbind(
RT= c(1.2595272, 0.8693937, 0.8009044, 1.0018933, 2.3640007, 1.0521304),
R = c(1.9217430, 1.7844653, 0.2662521, 2.1569724, 1.7277440, 0.8607271)
)
pVec <- c(a=2.45, vx=1.5, vy=1.25, t0=.1, s=1)
dcddm(x, pVec)
###################
## rcddm example ##
###################
pVec <- c(a=2, vx=1.5, vy=1.25, t0=.25, s=1)
den <- rcddm(1e3, pVec);
hist(den[,1], breaks = "fd", xlab="Response Time", main="Density")
hist(den[,3], breaks = "fd", xlab="Response Angle", main="Density")
## From github
devtools::install_github("TasCL/CircularDDM")
## From source:
install.packages("CircularDDM_0.0.8.tar.gz", repos = NULL, type="source")
R package requires:
The installation for MATLAB is simply copying the files in ‘matlab’ folder to MATLAB toolbox folder. For example, in Linux default path, MATLAB toolbox is at ‘/usr/local/MATLAB/R2016a/toolbox’ (version number may vary, e.g., ‘R2015’, etc.). The following is a step-by-step instruction.
help('rcircularddm')
help('dcircularddm')
help('rvonmises')
MATLAB package requires: