proposal.pb: PB model: proposal distribution

Description Usage Arguments Details Value Examples

Description

Density of the proposal distribution q(cur.par,prop.par) and random generator for MC MC algorithm in the PB model.

Usage

1
proposal.pb(type = c("r", "d"), cur.par, prop.par, MCpar, log = TRUE)

Arguments

type

One of the character strings "r", "d"

cur.par

Current state of the chain

prop.par

Candidate parameter

MCpar

A list made of a single element: MC MC parameter for the standard deviation of the log-normal proposition, on the log scale. See pb.MCpar for the default value

log

Logical. Only used when type =="d". Should the result be returned on the log-scale ?

Details

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)))

Value

Either the (log-)density of the proposal prop.par, given cur.par (if type == "d"), or a proposal parameter (a vector), if type =="r".

Examples

1
2
3
4
5
6
7
8
## 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)

lbelzile/BMAmevt documentation built on June 13, 2019, 12:43 p.m.