rs: rejection sampling

Description Usage Arguments Author(s)

View source: R/RejectionSampling.R

Description

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.

Usage

1
rs(dat, start, LL, priors, N, giveup = 100)

Arguments

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?

Author(s)

Marco D. Visser


MarcoDVisser/MCMCR documentation built on May 7, 2019, 2:49 p.m.