MWG: Metropolis within Gibbs algorithm for srplv

Description Usage Arguments Value

View source: R/MWG.R

Description

MWG obtains MCMC sample from posterior distribution via MWG algorithm for superposed renewal processes by means of latent variables.

Usage

1
MWG(guess, Data, distribution, burn, jump, prior1, prior2, n.size = 1000)

Arguments

guess

The vector of initial values for the parameters. The default is (1,1).

Data

Data in the srplv format as data_to_srplv.

distribution

The chose distribution: weibull, gamma, lnorm, llogis.

burn

Burn-in sample.

jump

Jump sample.

prior1

Hyperparameters for the prior distribution for parameter 1.

prior2

Hyperparameters for the prior distribution for parameter 2.

n.size

Number of MCMC sample. The default is 1000.

Value

A list with the following components:

post.values

The sample from the posterior distribution for each parameter (column) with size n.size.

acceptance

The acceptance rate.

time

The computational time.

matrix.cpo

Matrix with dimension n.sys by n.size containing Conditional Predictive Ordinate (CPO) values for n.sys systems and n.size posterior sample.


agathasr/srplv documentation built on May 17, 2020, 12:21 a.m.