powered by
rASS generates a sequence of random numbers by the adaptive slice sampling algorithm with stepping-out procedures.
rASS(n, x0 = 0, formula, w = 3)
Desired sample size;
Initial value;
Target density function p(x);
Length of the coverage interval.
Neal R M. Slice sampling - Rejoinder[J]. Annals of Statistics, 2003, 31(3):758-767.
# NOT RUN { # Example 1: Sampling from exponential distribution with bounded domain x<-rASS(100,-1,"1.114283*exp(-(4-x^2)^2)",3) plot(density(x)) # }
Run the code above in your browser using DataLab