PulseExploreJournal ClubDebatesTrendingResearchersJournals
Instagram
HomeExploreJournal ClubTrending
Synapse
⌘+K
Synapse
March 14, 2026The R Journal0 citationsOpen Access

AcceptReject: An R Package for Acceptance-Rejection Method

PMPedro Rafael Diniz MarinhoUniversidade Federal da ParaíbaVTVera L. D. TomazellaUniversidade Federal da Paraíba

Key Points

  • The aim is to introduce and detail the functionalities of the AcceptReject package for generating pseudo-random observations.
  • Describes the acceptance-rejection method for random variable generation.
  • Evaluates package performance through benchmarks in various scenarios.
  • Supports multicore parallelism on Unix-based systems for efficiency.
  • Demonstrates efficient generation of pseudo-random observations from both discrete and continuous distributions.
  • Maximizes acceptance probability for improved execution speed.
  • Compares generated observations with theoretical probability functions effectively.

Abstract

The AcceptReject package, available for the R programming language on the Comprehensive R Archive Network (CRAN), versioned and maintained on GitHub, offers a simple and efficient solution for generating pseudo-random observations of discrete or continuous random variables using the acceptance-rejection method. This method provides a viable alternative for generating pseudo-random observations in univariate distributions when the inverse of the cumulative distribution function is not in closed form or when suitable transformations involving random variables that we know how to generate are unknown, thereby facilitating the generation of observations for the variable of interest. The package is designed to be simple, intuitive, and efficient, allowing for the rapid generation of observations and supporting multicore parallelism on Unix-based operating systems. Some components are written using C++, and the package maximizes the acceptance probability of the generated observations, resulting in even more efficient execution. The package also allows users to explore the generated pseudo-random observations by comparing them with the theoretical probability mass function or probability density function and to inspect the underlying probability density functions that can be used in the method for generating observations of continuous random variables. This article explores the package in detail, discussing its functionalities, benefits, and practical applications, and provides various benchmarks in several scenarios.

Ask AI
Helpful
Bookmark
Share
View Full Paper

Cite This Study

Marinho et al. (2026) studied this question.

synapsesocial.com/papers/69b4fa6fb39f7826a300b25ahttps://doi.org/10.32614/rj-2025-037
Ask AI
Helpful
Bookmark
Share
View Full Paper

Also Consider

Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context:

  1. 1Simple rejection Monte Carlo algorithm and its application to multivariate statistical inference2024
  2. 2Using the rejection sampling for finding tests2025
  3. 3Versatile algorithm for economical simulating one-dimensional random variables with continuous, monotone densities over bounded, closed intervals2026
  4. 4dynConfiR: An R package for sequential sampling models of decision confidence2026
  5. 5Randomization Tests for Adaptively Collected Data2026 · 2 citations