peppm {peppm} | R Documentation |
Piecewise Exponential Product Partition Model
Description
Piecewise Exponential Product Partition Model
Usage
peppm(
time,
status,
a_rates = 1,
b_rates = 1,
cohesion = 1,
a_beta = 1,
b_beta = 1,
nburnin = 10000,
npost = 20000,
nlag = 10
)
Arguments
time |
vector of observed failure times. |
status |
vector of failure indicators |
a_rates |
shape parameter of the gamma distribution (prior for failure rates). |
b_rates |
scale parameter of the gamma distribution (prior for failure rates). |
cohesion |
type of prior cohesion (1 to 4). |
a_beta |
shape1 parameter of the beta distribution (prior for p - cohesion 4). |
b_beta |
shape2 parameter of the beta distribution (prior for p - cohesion 4). |
nburnin |
number of iterations to be discarded. |
npost |
desired posterior sample size |
nlag |
number of jumps to eliminate autocorrelation of the chain. |
Value
Posterior sample of the number of intervals, failure rates, the auxiliary vector U, and the logarithm of the prior predictive distribution (log data factor).
Examples
# Small chain used here due to time constraints.
data(telecom)
# Prior cohesion 1:
fit1 <- with(telecom, peppm(time, status, cohesion=1, nburnin = 0, nlag = 1, npost = 100))
# Prior cohesion 2:
fit2 <- with(telecom, peppm(time, status, cohesion=2, nburnin = 0, nlag = 1, npost = 100))
# Prior cohesion 3:
fit3 <- with(telecom, peppm(time, status, cohesion=3, nburnin = 0, nlag = 1, npost = 100))
# Prior cohesion 4:
fit4 <- with(telecom, peppm(time, status, cohesion=4, nburnin = 0, nlag = 1, npost = 100))
[Package peppm version 0.0.1 Index]