amisforinfectiousdiseases-dev
https://github.com/drsimonspencer/amisforinfectiousdiseases-dev
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
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
Metadata Files
README.md
AMIS for Infectious Diseases
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
- Website: https://warwick.ac.uk/fac/sci/statistics/staff/academic-research/spencer/
- Repositories: 2
- Profile: https://github.com/drsimonspencer
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
- Homepage: https://github.com/drsimonspencer/AMISforInfectiousDiseases-dev
- Documentation: http://cran.r-project.org/web/packages/AMISforInfectiousDiseases/AMISforInfectiousDiseases.pdf
- License: MIT + file LICENSE
-
Latest release: 0.1.0
published over 1 year ago