## Not run:
# 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))))
# })
#
#
# samplerObj <-
# with(threeDimNormalFuncGenerator(-13579),
# {
# randomWalkMetropolis(nIters = 5000,
# startingVal = c(0, 0, 0),
# logTarDensFunc = logTarDensFunc,
# propNewFunc = propNewFunc,
# MHBlocks = list(c(1, 2), 3),
# verboseLevel = 1)
# })
# print(samplerObj)
# print(names(samplerObj))
# with(samplerObj,
# {
# print(detailedAcceptRatios)
# print(dim(draws))
# pairs(draws,
# pch = '.',
# ask = FALSE,
# main = as.expression(paste('# draws:', nIters)),
# labels = c(as.expression(substitute(x[xii], list(xii = 1))),
# as.expression(substitute(x[xii], list(xii = 2))),
# as.expression(substitute(x[xii], list(xii = 3)))))
# })
# ## End(Not run)
Run the code above in your browser using DataLab