qprop: Simulate from Multivariate Normal Density for Metropolis...

Description Usage Arguments Value References Examples

View source: R/mcmc_functions.R

Description

Provided for Random Walk Metropolis algorithm

Usage

1
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

1
2
3
s <- replicate(1000, qprop(0, 1))
summary(s)
hist(s, col='light blue')

hmclearn documentation built on Oct. 23, 2020, 8:04 p.m.