| proposal.pb | R Documentation |
Density of the proposal distribution q(cur.par,prop.par) and random generator for MCMC algorithm in the PB model.
proposal.pb(type = c("r", "d"), cur.par, prop.par, MCpar, log = TRUE)
type |
One of the character strings |
cur.par |
Current state of the chain |
prop.par |
Candidate parameter |
MCpar |
A list made of a single element: MCMC parameter for the standard deviation of the log-normal proposition, on the log scale. See |
log |
Logical. Only used when |
The components prop.par[i] of the proposal parameter are generated independently, from the lognormal distribution:
prop.par = rlnorm(length(cur.par), meanlog=log(cur.par),
sdlog=rep(MCpar$sdlog,length(cur.par)))
Either the (log-)density of the proposal prop.par, given cur.par (if type == "d"), or a proposal parameter (a vector), if type =="r".
## Not run: proposal.pb(type = "r",
cur.par = rep(1,4), MCpar=get("pb.MCpar"))
## End(Not run)
## Not run: proposal.pb(type = "d", cur.par = rep(1,4),
prop.par=rep(1.5,4), MCpar=get("pb.MCpar"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.