Description Usage Arguments Details Value Author(s) Examples
Function to obtain affine-invariant ensemble samples
1 2 | getAIESamples(halfN, nosteps, lnprob, x0, a = 2, eps = 0.01, CPUs = 1,
dynlib = NULL, echo = FALSE, lgf = NULL)
|
halfN |
half the number of walkers in the ensemble |
nosteps |
the number of steps taken (chainlengths) |
lnprob |
the loglikelihood function |
x0 |
a vector of initial parameter values |
a |
alg tuning: todo |
eps |
alg tuning: todo |
CPUs |
number of CPUs to use (experimental; not working) |
dynlib |
if a compiled library is need to evaluate |
echo |
if |
lgf |
if present, the filename for a logfile to dump information into |
todo: provenance and more on arguments
list(chains=list(R1=R2,R2=R2),acc=acc,accv=accv,a=a, llike=list(LL1=LL1,LL2=LL2),lnprob=lnprob)
- returned in this form to allow continuation with continueAIESamples
. The chains R1
and R2
are matrices with columns for parameteres and rows for iterations.
Pete Dodd
1 2 3 4 5 6 7 8 9 10 11 | #Rosenrbock banana function
rosen <- function(x) -(1-x[1])^2 - 100*(x[2] - x[1]^2)^2
#50 walkers for 200 steps
S <- getAIESamples(50,200,arosen,runif(2))
plotAIEchains(S)
SP <- processAIESamples(S,burnin=50)
corplot(SP)
#continue for another 100 steps
S <- continueAIESamples(Y=S,nosteps=100)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.