Giter Site home page Giter Site logo

anclik's Introduction

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/`

anclik's People

Contributors

jeffeaton avatar r-ash avatar

Watchers

 avatar  avatar

Forkers

aucarter r-ash

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.