posteriorMCMC.pb: MC MC posterior samplers for the the PB and the NL model.

Description Usage Arguments Details Value Note See Also Examples

View source: R/posteriorMCMC.pb.r

Description

The functions generate parameters samples approximating the posterior distribution in the PB model or the NL model.

Usage

1
2
3
  posteriorMCMC.nl(Nsim, dat, Hpar, MCpar, ...)

  posteriorMCMC.pb(Nsim, dat, Hpar, MCpar, ...)

Arguments

...

Additional arguments to be passed to posteriorMCMC instead of their default values (must not contain any of "prior", "likelihood", "proposal", "name.model" or "class").

Nsim

Total number of iterations to perform.

dat

An angular data set, e.g. constructed by cons.angular.dat: A matrix which rows are the Cartesian coordinates of points on the unit simplex (summing to one).

Hpar

A list containing Hyper-parameters to be passed to prior.

MCpar

A list containing MC MC tuning parameters to be passed to proposal.

Details

The two functions are wrappers simplifying the use of posteriorMCMC for the two models implemented in this package.

Value

an object with class attributes "postsample" and "PBNLpostsample": The posterior sample and some statistics as returned by function posteriorMCMC

Note

For the Leeds data set, and for simulated data sets with similar features, setting Nsim=50e+3 and Nbin=15e+3 is enough (possibly too much), with respect to the Heidelberger and Welch tests implemented in heidel.diag.

See Also

posteriorMCMC

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
data(Leeds)
data(pb.Hpar)
data(pb.MCpar)
data(nl.Hpar)
data(nl.MCpar)
pPB <- posteriorMCMC.pb(Nsim=5e+3, dat=Leeds, Hpar=pb.Hpar,
MCpar=pb.MCpar)

dim(pPB[1])
pPB[-(1:3)]

pNL <- posteriorMCMC.nl(Nsim=5e+3, dat=Leeds, Hpar=nl.Hpar,
MCpar=nl.MCpar)

dim(pNL[1])
pNL[-(1:3)]

## End(Not run)

lbelzile/BMAmevt documentation built on May 17, 2018, 12:16 p.m.