The PopulationSimulationR package is a powerful tool for simulating age and time-structured populations. It is designed primarily for epidemiological research, with a focus on estimating incidence, especially for chronic conditions like HIV. This package allows you to create and manipulate synthetic populations for various modeling and analysis purposes.
To install the package, you can use the devtools
package:
# Install devtools if you haven't already
install.packages("devtools")
# Install PopulationSimulationR from GitHub
devtools::install_github("laurettemhlanga/PopulationSimulation")
Here's a quick example of how to use the package:
# Load the PopulationSimulation package
library(PopulationSimulationR)
# Specify your rate functions and parameters
# (birth rate, PMTCT rate, incidence rate, etc.)
# Run a simulation
population_data <- birth_cohort_simulation(rate_functions = your_rate_functions, ...)
# Analyze and visualize the simulated population data
# (e.g., prevalence by age, time series analysis)
For detailed usage instructions and function documentation, please refer to the package vignettes. You can access the vignettes using the following command after loading the package:
# Load the PopulationSimulationR package
library(PopulationSimulation)
# Access package vignettes
browseVignettes("PopulationSimulation")
We welcome contributions from the community. If you encounter issues, have ideas for enhancements, or would like to contribute code, please check our Contributing Guidelines for more information.
This package is distributed under the MIT License.
We would like to acknowledge the contributions of the research community that have made this package possible. Thank you for your support and feedback.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.