Martin Lysy, Yun Ling
Tools for implementing various models for particle subdiffusion in biological fluids. In addition to the well-known semiparametric least-squares estimator based on the mean square displacement (MSD), the package provides functions for simulation, inference, and goodness-of-fit for two fully-parametric subdiffusion models: fractional Brownian motion and the generalized Langevin equation (GLE) model with Rouse memory kernel. A generic model class allows users to easily implement custom subdiffusion models, with a ready-made framework for drift, high-frequency error correction, and efficient maximum likelihood estimation.
-
Install the Rcpp package. To do this properly you will also need to install a C++ compiler. Instructions for this are available here.
To test that this step is done correctly, quit + restart R, then run the following command:
Rcpp::evalCpp("2 + 2")
If the output is
4
then Rcpp is installed correctly. -
Install the devtools package.
-
In an R session run the following commands:
devtools::install_github("mlysy/subdiff", force = TRUE, INSTALL_opts = "--install-tests")
-
Once the packages are installed, you can test that everything works correctly by first quitting + restarting R, then running the command:
testthat::test_package("subdiff", reporter = "progress")
Occasionally due to random chance a few of the tests may fail. However, if everything is installed correctly, then rerunning this a few times will eventually produce zero test failures.
Please see the package vignette: vignette("subdiff")
.