BPSevalHR {BayHaz}R Documentation

Function to Evaluate BPS Hazard Rates

Description

A function to evaluate a (prior or posterior) sample of first order autoregressive BPS hazard rates on a grid of time points.

Usage

BPSevalHR(time, sample)

Arguments

time vector of time points where the hazard rates in the sample should be evaluated
sample sample of BPS hazard rates (as generated by BPSpriorSample or BPSpostSample)

Value

A matrix with as many rows as hazard rates in the sample and as many columns as time points in the grid.

See Also

BPSplotHR

Examples

# set RNG seed (for example reproducibility only)
set.seed(1234)

# select a BPS prior distribution
hypars<-BPSpriorElicit(r0 = 0.1, H = 1, T00 = 50, ord = 4, G = 3, c = 0.9)
# generate a sample of ten hazard rates
prior<-BPSpriorSample(ss = 10, hyp = hypars)

# evaluate the ten hazard rates at year multiples
BPSevalHR(time = seq(0,50), sample = prior)

[Package BayHaz version 0.1-3 Index]