PieceExpIntensity {PieceExpIntensity}R Documentation

Runs the PieceExpIntensity sampler and returns posterior results.

Description

Returns a list of posterior samples along with summaries for the most visited number of split points.

Usage

PieceExpIntensity(X, Y, B, Poi)

Arguments

X

Vector containing observed event times.

Y

Vector containing poisson count intensities.

B

Number of iterations to run the MCMC with half burned in.

Poi

Prior mean number of split points.

Value

A list of all posterior quantities and a summary of the most commonly visited model.

References

Chapple (2017). Modeling ISIL terror attacks and their intensities via flexible Bayesian piecewise models. Currently Under Review.

Examples

B=1000
n=100
X=rexp(n,1)
Y=X
Y[X<.5]=rpois(sum(X<.5),20)
Y[X>.5]=rpois(sum(X>.5),3)
Poi=10
PieceExpIntensity(X,Y,B,Poi)

[Package PieceExpIntensity version 1.0.4 Index]