CPPpriorSample {BayHaz} | R Documentation |
A function to generate a random sample of hazard rates from a CPP prior distribution.
CPPpriorSample(ss = 1, hyp = CPPpriorElicit())
ss |
requested sample size |
hyp |
list of hyperparameters (as generated by CPPpriorElicit ) |
A random sample of ss
hazard rates is extracted from the CPP prior distribution identified by hyp
.
A list with four components:
hyp |
list of hyperparameters identifying the CPP prior distribution from which the sample was extracted (copy of the input argument) |
sgm |
matrix with ss rows (and hyp$F columns) containing the CPP jump-times |
xi0 |
matrix with ss rows (and just one column) containing the jump-sizes in the origin |
csi |
matrix with ss rows (and hyp$F columns) containing the CPP jump-sizes |
# set RNG seed (for example reproducibility only) set.seed(1234) # select a CPP prior distribution hypars<-CPPpriorElicit(r0 = 0.1, H = 1, T00 = 50, M00 = 2) # generate a sample of ten hazard rates prior<-CPPpriorSample(ss = 10, hyp = hypars)