Description Usage Arguments Author(s)
View source: R/RejectionSampling.R
Protocol for a simple rejection sampling algorithm. Given a set of priors to sample N parameters from the algoritm accepts new proposal proportional to a random fraction. The sequence of parameters are randomly reversed.
1  | 
dat | 
 dataset to be based to the likelihood function  | 
start | 
 a vector of starting values  | 
LL | 
 a likelihood function that accepts the parameters and data  | 
priors | 
 a function that randomly samples parameters from their prior distributions  | 
N | 
 total number of sampling rounds (one rounds goes through all parameters once).  | 
giveup | 
 after how many rounds of no new accepted values does the algorithm give up and assume convergence?  | 
Marco D. Visser
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.