# independence sampler example with pi = Exp(1), q = Exp(k) k = 1 M = 10^5; B = M/10; h = function(x) { x } numacc = 0; xlist = rep(0,M); X = 2*runif(1); # somewhat-overdispersed starting distribution for (i in 1:M) { Y = rexp(1,k); A = exp((k-1)*(Y-X)); U = runif(1); if (U