r-ash / anclik Goto Github PK
View Code? Open in Web Editor NEWThis project forked from jeffeaton/anclik
C implementation of ANC HIV prevalence likelihood described by Alkema, Raftery, Clark (2007)
This project forked from jeffeaton/anclik
C implementation of ANC HIV prevalence likelihood described by Alkema, Raftery, Clark (2007)
This implements the random effects likelihood for ANC HIV prevalence described by Alkema, Raftery, Clark Ann Appl Stat 2007 (http://dx.doi.org/10.1214/07-AOAS111). This is implemented in the EPP model used by UNAIDS for generating HIV epidemic trends: http://www.unaids.org/en/dataanalysis/datatools/spectrumepp2013. The code is implemeted as an R package in the subdirectory anclik/. To install the R package using devtools: > devtools::install_github("jeffeaton/anclik") The script "R/anclik.R" includes a function for preparing ANC data for likelihood calculation and a wrapper function for calling the C function. This includes an equivalent R implementation of the C code. The script "example.R" provides an example for preparing the data and calling the likelihood, and compares the performance of the C and R implementations. The initial implementation relied on GNU Scientific Library (GSL) for adapative Gaussian quadrature numerical intergration routine (http://www.gnu.org/software/gsl/). This deprecated version is retained in "gsl/anclikR_gsl.c". To compile that version add the flags -lgsl -lgslcblas: $ R CMD SHLIB -lgsl -lgslcblas anclikR_gsl.c anclik.c mvrandist.c You may need to supply -L <path to GSL> if not in the PATH variable. At present, it does not handle the GSL errors, so in this version if an error happens in the C code (e.g. pass it a vector of incorrect size), it will crash R. Hopefully I’ll improve this in the future. GPLv3, no warranty, etc... Created by Jeff Eaton on 2014-11-12 <[email protected]> Edited by Jeff Eaton on 2014-11-24 Edited by Jeff Eaton on 2016-05-29: Remove dependency on GSL Edited by Jeff Eaton on 2022-02-23: Move R package to top level, GSL version to `gsl/`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.