Learn R Programming

BaPreStoPro (version 0.1)

proposal: Sampling from lognormal proposal density

Description

Drawing one sample from the lognormal distribution with mean parOld and standard deviation propSd. Used in Metropolis Hastings algorithms.

Usage

proposal(parOld, propSd)

Arguments

parOld
the parameter from the last iteration step
propSd
proposal standard deviation

Examples

Run this code
plot(replicate(100, proposal(1, 0.1)), type = "l")

Run the code above in your browser using DataLab