Discrete Laplace Mixture Inference using the EM Algorithm

Make inference in a mixture of discrete Laplace distributions using the EM algorithm. This can e.g. be used for modelling the distribution of Y chromosomal haplotypes as described in [1, 2] (refer to the URL section).


An R package (https://www.r-project.org/) to perform inference in a mixture of discrete Laplace distributions using the EM algorithm. Intended for forensic Y chromosomal STR (Y-STR) haplotype analyses.

See documentation included in package (vignettes and manual) at https://mikldk.github.io/disclapmix/.

Installation

You first need R (https://www.r-project.org/). Then you can install disclapmix from CRAN using

install.packages("disclapmix")

You can also install the development version from GitHub by using the remotes package (https://CRAN.R-project.org/package=remotes):

# install.packages("remotes")
remotes::install_github("mikldk/disclapmix")

Getting started

Refer to the included vignettes. You can get an overview of the included vignettes by the following R command:

vignette(package = "disclapmix")

To read a vignette, type:

vignette("introduction", package = "disclapmix")

Running tests

Note that to also install the tests, you need to install the package as follows:

# install.packages("remotes")
remotes::install_github("mikldk/disclapmix", INSTALL_opts="--install-tests")

You can now run the tests:

library(disclapmix)
library(testthat)
test_package('disclapmix')

Contribute, issues, and support

Please use the issue tracker at https://github.com/mikldk/disclapmix/issues if you want to notify us of an issue or need support. If you want to contribute, please either create an issue or make a pull request.

References

Andersen MM, PS Eriksen, N Morling (2013). The discrete Laplace exponential family and estimation of Y-STR haplotype frequencies. Journal of Theoretical Biology 329. https://doi.org/10.1016/j.jtbi.2013.03.009

Andersen MM, PS Eriksen, N Morling (2013). A gentle introduction to the discrete Laplace method for estimating Y-STR haplotype frequencies. arXiv:1304.2129. https://arxiv.org/abs/1304.2129

Disclaimer

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

License

License: GPL-2.

Badges

The Journal of Open Source Software:

DOI

Zenodo:

DOI

Travis CI:

Travis-CI Build Status

News

Changes in version 1.7.2

  • Maintenance updates
  • Remove Makevars files as not required by Rcpp >= 0.11.

Changes in version 1.7.1

Changes in version 1.7

  • Moving to Github
  • Roxygen
  • testthat
  • Travis CI

Changes in version 1.6.3

  • Avoid two centers being equal (mainly a problem for very few loci)
  • Internal: PedigreeSums added with increased stack size and progress indicator

Changes in version 1.6.2

  • Minor technical changes for keeping CRAN checks happy

Changes in version 1.6.1

  • Plot functionality for disclapmix was broken for fits with only one subpopulation/cluster.

Changes in version 1.6

  • Plot functionality for disclapmix fit takes an argument for the distances between clusters (defaults to clusterdist(x)). This can be used if the distances have been precalculated.
  • Minor technical changes for keeping CRAN checks happy

Changes in version 1.5

  • Added AICc (Akaike Information Criterium with finite sample correction)
  • Added plot functionality for a disclapmix fit
  • Corrected number of model observations, leading to corrected BIC values (AIC not affected)
  • Error in full likelihood ratio corrected (not used for model selection)

Changes in version 1.4

  • Added separation of two persons mixtures (see example in ?rank_contributor_pairs)
  • Added AIC (Akaike Information Criterium) for a model disclapmixfit

Changes in version 1.3

  • Added simulate from fitted model
  • Added haplotype diversity calculation from a fitted model
  • Added parameter to control number of IRLS iterations (glm_control_maxit)
  • Added parameter to control IRLS convergence (glm_control_eps)
  • Changed default iterations to 100L, glm_control_maxit to 50L and glm_control_eps to 1e-6
  • Fixed error with no IRLS output for verbose = 2L expect for glm.fit
  • Small changes in verbose output

Changes in version 1.2

  • Changed default glm_method to internal_coef due to speed considerations
  • Fixed issues when having one cluster, one locus or both

Changes in version 1.1

  • Code changes for OS X, Windows and Solaris compatibility

Changes in version 1.0

  • Totally rewritten such that the algorithm is more memory and CPU efficient and can be used to analyse larger datasets
  • Internal IRLS algorithm implemented, much faster than glm.fit for this kind of data. glm.fit is still available. See glm_method in ?disclapmix.
  • NOTE: Updated API

Changes in version 0.4

  • Fixed error when there is no variation in a subpopulation

Changes in version 0.3

  • Fixed error such that verbose = 1 outputs progress information
  • Number of model parameters corrected, which changes marginal and full BIC slightly, but only with a constant change meaning that for the same data, the optimal number of centers is the same

Changes in version 0.2 * disclapmix: verbose more fine grained * FIXED: disclapmix: use.parallel = TRUE created problems under Windows * Corrected minor documentation errors

Changes in version 0.1 * Initial release

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("disclapmix")

1.7.3 by Mikkel Meyer Andersen, 8 months ago


http://dx.doi.org/10.1016/j.jtbi.2013.03.009 http://arxiv.org/abs/1304.2129


Report a bug at https://github.com/mikldk/disclapmix/issues


Browse source code at https://github.com/cran/disclapmix


Authors: Mikkel Meyer Andersen [aut, cre] , Poul Svante Eriksen [aut]


Documentation:   PDF Manual  


GPL-2 | file LICENSE license


Imports Rcpp, disclap, cluster, MASS, stats, graphics, methods, utils

Suggests knitr, ggplot2, gridExtra, ggdendro, scales, seriation, fwsim, testthat, rmarkdown

Linking to Rcpp, RcppProgress

System requirements: C++11


See at CRAN