Description Usage Arguments Value Author(s) References See Also Examples
Plot a trace of the Log of Objective function values, burn-in for convergence evaluation purposes.
1 | PlotLogObj(info, from=0, to=length(info$Us))
|
info |
as returned from Runtwalk. |
from |
iteration number to start ploting (from=0 begings at initialization point). |
to |
last iteration to plot. |
NULL
J Andres Christen (CIMAT, Guanajuato, MEXICO).
Christen JA and Fox C (2010). A general purpose sampling algorithm for continuous distributions (the t-walk)., Bayesian Analysis, 5 (2), 263-282. URL: http://ba.stat.cmu.edu/journal/2010/vol05/issue02/christen.pdf
Runtwalk
for running the twalk.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
#### We first load the twalk package:
library(Rtwalk)
#### A ver simple inline example, 4 independent normals N(0,1):
###### dimension, num of it, -log of objective function besides a const, support,
info <- Runtwalk( dim=4, Tr=1000, Obj=function(x) { sum(x^2)/2 }, Supp=function(x) { TRUE },
x0=runif(4, min=20, max=21), xp0=runif(4, min=20, max=21))
#### and two (intentionally bad) initial points
### or plot the log of the objective
PlotLogObj(info)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.