Learn R Programming

BMAmevt (version 1.0.5)

posteriorMCMC.nl: MCMC posterior samplers for the pairwise beta and the negative logistic models.

Description

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

Usage

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

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

Value

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

Arguments

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 MCMC tuning parameters to be passed to proposal.

...

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

Details

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

See Also

posteriorMCMC

Examples

Run this code
if (FALSE) {
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)]
}

Run the code above in your browser using DataLab