In mathematics, 'rejection sampling' is a basic technique used to generate observations from a distribution. It is also commonly called 'the AcceptanceRejection method' or 'AcceptReject algorithm' and is a type of Monte Carlo method. 'AcceptanceRejection method' is based on the observation that to sample a random variable one can perform a uniformly random sampling of the 2D cartesian graph, and keep the samples in the region under the graph of its density function. Package 'AR' is able to generate/simulate random data from a probability density function by AcceptanceRejection method. Moreover, this package is a useful teaching resource for graphical presentation of AcceptanceRejection method. From the practical point of view, the user needs to calculate a constant in AcceptanceRejection method, which package 'AR' is able to compute this constant by optimization tools. Several numerical examples are provided to illustrate the graphical presentation for the AcceptanceRejection Method.
Package details 


Author  Abbas Parchami (Department of Statistics, Faculty of Mathematics and Computer, Shahid Bahonar University of Kerman, Kerman, Iran) 
Maintainer  Abbas Parchami <parchami@uk.ac.ir> 
License  LGPL (>= 3) 
Version  1.1 
Package repository  View on CRAN 
Installation 
Install the latest version of this package by entering the following in R:

Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.