samplerObj <-
with(CigarShapedFuncGenerator1(-13579),
randomWalkMetropolis(nIters = 5000,
startingVal = c(0, 0),
logTarDensFunc = logTarDensFunc,
propNewFunc = propNewFunc,
verboseLevel = 1))
print(samplerObj)
print(names(samplerObj))
with(samplerObj,
{
print(detailedAcceptRatios)
print(dim(draws))
plot(draws,
xlim = c(-3, 5),
ylim = c(-3, 4),
pch = '.',
ask = FALSE,
main = as.expression(paste('# draws:', nIters)),
xlab = as.expression(substitute(x[xii], list(xii = 1))),
ylab = as.expression(substitute(x[xii], list(xii = 2))))
})Run the code above in your browser using DataLab