I applied Bayesian approach to a set of highly censored failure data using Metropolis-Hastings method and now I have a sample of parameter values from the marginal posterior distributions. The failure model used is the Weibull distribution. Can anyone please help me to fit point-wise confidence limits for the cdf using Bayesian approaches? or is there any method to compute Bayesian point-wise confidence limits to a cdf similar to maximum likelihood confidence limits.
I can use the simulated posterior values of the Weibull parameters and use a simulation method similar to bootstrap sampling to compute the confidence limits. Does that method give Bayesian confidence limits for the cdf?
The R-codes I used to generate the posterior samples are as follows.
require (MHadaptive)
require (SPREDA)
require (rootSolve)
bearing_cage <- rep (c (50, 150, 230, 250, 334, 350, 423, 450, 550, 650,
750, 850, 950, 990, 1009, 1050, 1150, 1250, 1350,
1450, 1510, 1550, 1650, 1850, 2050), times = c (288,
148, 1, 124, 1, 111, 1, 106, 99, 110, 114, 119, 127,
1, 1, 123, 93, 47, 41, 27, 1, 11, 6, 1, 2))
delta <- rep (c(0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0), times = c (288, 148, 1, 124, 1,
111, 1, 106, 99, 110, 114, 119, 127, 1, 1, 123, 93,
47, 41, 27, 1, 11, 6, 1, 2))
# Define the Bayesian model
bay_mod <- function (theta){
mu <- theta[1] #location
sigma <- theta[2] #scale
z <- (log (bearing_cage) - mu) / sigma
log_likelihood <- sum (log ((dsev(z)/(sigma*bearing_cage)))*delta) +
sum ((1 - delta)*log (1 - psev (z)))
prior <- joint_prior(theta)
return (log_likelihood + prior)
}
# Derive the joint prior for Weibull parameters
joint_prior <- function (theta){
mu <- theta[1] #location
sigma <- theta[2] #scale
joint <- (1 / log (5000/100))*(dnorm ((log(sigma) + 1.151)/.178)/(sigma*.178))
return (log (joint))
}
mcmc_bearingcage <- Metro_Hastings (bay_mod, pars = c (10, 0.5),
par_names = c ("mu", "sigma"))
mcmc_bearingcage <- Metro_Hastings (bay_mod, pars = c (10, 0.5), prop_sigma = mcmc_bearingcage$prop_sigma,
par_names = c ("mu", "sigma"))
mcmc_bearingcage <- mcmc_thin(mcmc_bearingcage)
plotMH (mcmc_bearingcage, correlogram = TRUE)
# Bayesian credible intervals for the Weibull parameters
bayesian_int <- BCI (mcmc_bearingcage, interval = c(0.025, 0.975))
Thanks in advance!!