Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.3%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: drsimonspencer
  • License: other
  • Language: R
  • Default Branch: main
  • Size: 8.06 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created almost 3 years ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md

AMIS for Infectious Diseases

R-CMD-check

Description

This package provides an implementation of the Adaptive Multiple Importance Sampling algorithm, as described in

Integrating geostatistical maps and infectious disease transmission models using adaptive multiple importance sampling. Renata Retkute, Panayiota Touloupou, María-Gloria Basáñez, T. Deirdre Hollingsworth and Simon E.F. Spencer (2021). Annals of Applied Statistics, 15 (4), 1980-1998. DOI https://doi.org/10.1214/21-AOAS1486

This repository contains the development version of the package.

Installation

Make sure you have the package devtools installed. Then

R devtools::install_github("drsimonspencer/AMISforInfectiousDiseases-dev")

Usage

amis is the main function of the package. It takes a geostatistical map, a transmission model and a prior distribution for parameters, and returns a list of objects that includes sampled parameters and their associated weights in each location at each time point.

R amis_output <- AMISforInfectiousDiseases::amis(prevalence_map, transmission_model, prior, amis_params)

  • prevalence_map: A matrix representing the geostatistical map, with one row per pixel (if there is one time point); or a list with matrices, each one representing the geostatistical map for a time point.
  • transmission_model: A function implementing the model. It can be anything, as long as it conforms to a specific interface. See defining a model function.
  • prior: A list containing the functions dprior and rprior (density and RNG, respectively).
  • amis_params: A list containing the parameters for the AMIS algorithm, such as:
    • n_samples: The number of sample parameters to draw at each iteration.
    • target_ess: The target effective sample size.
    • max_iters: The maximum number of iterations.
    • boundaries: Lower and upper boundaries for prevalences.
    • boundaries_param: Lower and upper boundaries for parameters.
    • log: Logical indicating whether to work with log weights.
    • delete_induced_prior: Logical indicating whether the induced prior density is to be deleted in the update of weights.
    • mixture_samples: The number of samples drawn from the weighted distribution to fit a new mixture to.
    • df: Degrees of freedom in the t-distributions, used yield a heavy tailed proposal.
    • delta, sigma, breaks: Options for density estimation used in the pseudo-likelihood and induced prior density.
  • seed: Optional seed for the random number generator.
  • output_dir: An optional string specifying the local directory where to save outputs after each iteration of the algorithm.
  • initial_amis_vals: Optional list of intermittent outputs from a previous run.

Defining a model function

The amis function expects its argument model_func to be a function with the following interface

observables <- model_func(seeds, params, n_tims)

  • params: A matrix of parameter values (double)
  • seeds: A vector of seeds (integer)
  • n_tims: Number of time points (integer)

Function model_func is expected to run the model for each pair (seed, params) and return the corresponding values for the observable (e.g. infection prevalence). params must be a matrix with ncols equal to the dimension of the parameter space and the output must be a matrix with ncols equal to the number of observed timepoints n_tims.

Owner

  • Name: Simon Spencer
  • Login: drsimonspencer
  • Kind: user
  • Company: University of Warwick

Bayesian statistician

GitHub Events

Total
  • Push event: 32
Last Year
  • Push event: 32

Packages

  • Total packages: 1
  • Total downloads:
    • cran 153 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 1
cran.r-project.org: AMISforInfectiousDiseases

Implement the AMIS Algorithm for Infectious Disease Models

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 153 Last month
Rankings
Dependent packages count: 27.4%
Dependent repos count: 33.8%
Average: 49.4%
Downloads: 86.9%
Maintainers (1)
Last synced: 10 months ago