Provided for Random Walk Metropolis algorithm

qprop(theta1, nu)

Arguments

theta1

Vector of current quantiles

nu

Either a single numeric value for the covariance matrix, or a vector for the diagonal

Value

Returns a single numeric simulated value from a Normal distribution or vector of length theta1. length(mu) matrix with one sample in each row.

References

B. D. Ripley (1987) Stochastic Simulation. Wiley. Page 98

Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S. Fourth edition. Springer.

Examples

s <- replicate(1000, qprop(0, 1)) summary(s)
#> Min. 1st Qu. Median Mean 3rd Qu. Max. #> -3.28849 -0.67223 0.07392 0.04726 0.74391 4.02702
hist(s, col='light blue')