Bayesian analysis of generalized logBurr family with R
 Md Tanwir Akhtar^{1}Email author and
 Athar Ali Khan^{1}
https://doi.org/10.1186/219318013185
© Akhtar and Khan; licensee Springer. 2014
Received: 4 February 2014
Accepted: 23 March 2014
Published: 10 April 2014
Abstract
LogBurr distribution is a generalization of logistic and extreme value distributions, which are important reliability models. In this paper, Bayesian approach is used to model reliability data for logBurr model using analytic and simulation tools. Laplace approximation is implemented for approximating posterior densities of the parameters. Moreover, parallel simulation tools are also implemented using ‘LaplacesDemon’ package of R.
Keywords
Bayesian LogBurr Laplace approximation Simulation Laplace’s Demon Posterior densityIntroduction

To define a Bayesian model, that is, specification of likelihood and prior distribution.

To write down the R code for approximating posterior densities with Laplace approximation and simulation tools (R Core Team, 2013).

To illustrate numeric as well as graphic summaries of the posterior densities.
The log locationscale model
The standardized random variable z=(y−μ)/σ clearly has density and reliability functions f_{0}(z) and R_{0}(z) respectively, and Equation (1) with μ=0 and σ=1 is called the standard form of the distribution.
where α=exp(μ), β=1/σ and ${R}_{0}^{{}^{\prime}}={R}_{0}\left(\text{log}\right(x\left)\right)$ is a reliability function defined on (0,∞) (e.g., Lawless 2003).
The logBurr distribution can be obtained by generalizing a parametric locationscale family of distribution given by Equation (1), to let pdf, cdf, or reliability function include one or more parameters. This distribution is much useful because they include common two parameter lifetime distributions as special cases.
The generalized logBurr family
The halfCauchy prior distribution
The Laplace approximation
Many simple Bayesian analyses based on noninformative prior distribution give similar results to standard nonBayesian approaches, for example, the posterior tinterval for the normal mean with unknown variance. The extent to which a noninformative prior distribution can be justified as an objective assumption depends on the amount of information available in the data; in the simple cases as the sample size n increases, the influence of the prior distribution on posterior inference decreases. These ideas, sometime referred to as asymptotic approximation theory because they refer to properties that hold in the limit as n becomes large. Thus, a remarkable method of asymptotic approximation is the Laplace approximation which accurately approximates the unimodal posterior moments and marginal posterior densities in many cases. In this section we introduce a brief, informal description of Laplace approximation method.
where exp[ −n h(θ)]=L(θy)p(θ) (e.g., Tanner 1996).
Fitting of intercept model
Fitting with LaplaceApproxomation
First argument Model defines the model to be implemented, which contains specification of likelihood and prior. LaplaceApproximation passes two argument to the model function, parm and Data, and receives five arguments from the model function: LP (the logarithm of the unnormalized joined posterior density), Dev (the deviance), Monitor (the monitored variables), yhat (the variables for the posterior predictive checks), and parm, the vector of parameters, which may be constrained in the model function. The argument parm requires a vector of initial values equal in length to the number of parameters, and LaplaceApproximation will attempt to optimize these initial values for the parameters, where the optimized values are the posterior modes. The Data argument requires a listed data which must be include variable names and parameter names. The argument sir=TRUE stands for implementation of sampling importance resampling algorithm, which is a bootstrap procedure to draw independent sample with replacement from the posterior sample with unequal sampling probabilities. Contrary to sir of LearnBayes package, here proposal density is multivariate normal and not t.
Locomotive controls data
Let us introduce a failure times dataset taken from Lawless (2003), so that all the concepts and computations will be discussed around that data. The same data were discussed by Schmee and Nelson (1977). This data set contains the number of thousand miles at which different locomotive controls failed, in a life test involving 96 controls. The test was terminated after 135,000 miles, by which time 37 failures had occurred. The failure times for the 37 failed units are 22.5, 37.5, 46.0, 48.5, 51.5, 53.0, 54.5, 57.5, 66.5, 68.0, 69.5, 76.5, 77.0, 78.5, 80.0, 81.5, 82.0, 83.0, 84.0, 91.5, 93.5, 102.5, 107.0, 108.5, 112.5, 113.5, 116.0, 117.0, 118.5, 119.0, 120.0, 122.5, 123.0, 127.5, 131.0, 132.5, 134.0. In addition, there are 59 censoring times, all equal to 135.0.
Creation of data
In this case, there are two parameters beta and log.sigma which must be specified in vector parm.names. The logposterior LP and sigma are included as monitored variables in vector mon.names. The number of observations are specified by N. Censoring is also taken into account, where 0 stands for censored and 1 for uncensored values. Finally all these thing are combined in a listed form as MyData object at the end of the command.
Initial values
For initial values the function GIV (which stands for “Generate Initial Values”) may also be used to randomly generate initial values.
Model specification
The Model function contains two arguments, that is, parm and Data, where parm is for the set of parameters, and Data is the list of data. There are two parameters beta and sigma having priors beta.prior and sigma.prior, respectively. The object LL stands for loglikelihood and LP stands for logposterior. The function Model returns the object Modelout, which contains five objects in listed form that includes logposterior LP, deviance Dev, monitoring parameters Monitor, fitted values yhat and estimates of parameters parm.
Model fitting
Summarizing output
Summary of the analytic approximation using the function LaplaceApproximation. It may be noted that these summaries are based on asymptotic approximation, and hence Mode stands for posterior mode, SD stands for posterior standard deviation, and LB, UB are 2.5% and 97.5% quantiles, respectively
Logistic model (k =1)  

Parameter  Mode  SD  LB  UB 
Beta  5.08  0.09  4.90  5.26 
Log.sigma  0.96  0.15  1.25  0.66 
Weibull model (k =30)  
Parameter  Mode  SD  LB  UB 
Beta  5.21  0.09  5.03  5.39 
Log.sigma  0.85  0.15  1.16  0.54 
Summary matrices of the simulation due to sampling importance resampling algorithm using the function LaplaceApproximation , where Mean stands for posterior mean, SD for posterior standard deviation, MCSE for Monte Carlo standard error, ESS , for effective sample size, and LB , Median , UB are 2.5%, 50%, 97.5% quantiles, respectively
Logistic model (k =1)  

Parameter  Mean  SD  MCSE  ESS  LB  Median  UB 
Beta  5.09  0.09  0.00  1000  4.93  5.09  5.27 
Log.sigma  0.93  0.14  0.00  1000  1.22  0.93  0.65 
Deviance  149.04  1.81  0.06  1000  147.24  148.45  153.94 
LP  86.02  0.90  0.03  1000  88.47  85.72  85.12 
Sigma  0.40  0.06  0.00  1000  0.29  0.39  0.52 
Weibull model (k=30)  
Parameter  Mean  SD  MCSE  ESS  LB  Median  UB 
Beta  5.22  0.09  0.00  1000  5.06  5.21  5.40 
Log.sigma  0.82  0.15  0.00  1000  1.10  0.82  0.51 
Deviance  149.44  1.94  0.06  1000  147.52  148.87  154.61 
LP  86.22  0.97  0.03  1000  88.80  85.93  85.26 
Sigma  0.45  0.07  0.00  1000  0.33  0.44  0.60 
Fitting with LaplacesDemon
The arguments Model and Data specify the model to be implemented and list of data, which are need not to define here for the function LaplacesDemon as they are already defined for LaplaceApproximation. Initial.Values requires a vector of initial values equal in length to the number of parameter. The argument Covar= NULL indicates that variance vector or covariance matrix has not been specified, so the algorithm will begin with its own estimates. Next two arguments Iterations= 100000 and Status= 1000 indicates that the LaplacesDemon function will update 10000 times before completion and status is reported after every 1000 iterations. The thinning argument accepts integers between 1 and number of iterations, and indicates that every 100th iteration will be retained, while the others are discarded. Thinning is performed to reduced autocorrelation and the number of marginal posterior samples. Further, the Algorithm requires abbreviated name of the MCMC algorithm in quotes. In this case RWM is short for the RandomWalkMetropolis. Finally, Specs= Null is default argument, and accepts a list of specifications for the MCMC algorithm declared in the Algorithm argument.
Initial values
Model fitting
Summarizing output
Posterior summaries of simulation due to all samples using the function LaplacesDemon
Logistic model (k =1)  

Parameter  Mean  SD  MCSE  ESS  LB  Median  UB 
Beta  5.10  0.10  0.01  481.56  4.92  5.10  5.30 
Log.sigma  0.92  0.16  0.01  427.68  1.25  0.91  0.59 
Deviance  149.55  2.31  0.18  360.81  147.27  149.05  155.11 
LP  86.27  1.15  0.09  360.82  89.05  86.02  85.13 
Sigma  0.40  0.07  0.00  442.40  0.29  0.40  0.55 
Weibull model (k =30)  
Parameter  Mean  SD  MCSE  ESS  LB  Median  UB 
Beta  5.24  0.10  0.01  373.50  5.07  5.22  5.46 
Log.sigma  0.80  0.16  0.01  360.03  1.11  0.79  0.50 
Deviance  149.62  2.14  0.15  334.67  147.55  148.94  155.09 
LP  86.31  1.07  0.07  334.66  89.04  85.97  85.27 
Sigma  0.46  0.07  0.00  373.10  0.33  0.45  0.61 
Posterior summaries of simulation due to stationary samples using the function LaplacesDemon
Logistic model (k =1)  

Parameter  Mean  SD  MCSE  ESS  LB  Median  UB 
Beta  5.10  0.10  0.01  481.56  4.92  5.10  5.30 
Log.sigma  0.92  0.16  0.01  427.68  1.25  0.91  0.59 
Deviance  149.55  2.31  0.18  360.81  147.27  149.05  155.11 
LP  86.27  1.15  0.09  360.82  89.05  86.02  85.13 
Sigma  0.40  0.07  0.00  442.40  0.29  0.40  0.55 
Weibull model (k =30)  
Parameter  Mean  SD  MCSE  ESS  LB  Median  UB 
Beta  5.24  0.10  0.01  373.50  5.07  5.22  5.46 
Log.sigma  0.80  0.16  0.01  360.03  1.11  0.79  0.50 
Deviance  149.62  2.14  0.15  334.67  147.55  148.94  155.09 
LP  86.31  1.07  0.07  334.66  89.04  85.97  85.27 
Sigma  0.46  0.07  0.00  373.10  0.33  0.45  0.61 
Fitting of regression model
Fitting with LaplaceApproxomation
Electrical insulating fluid failure times data
Let us introduce a failure times data set of electrical insulating fluid for fitting of regression model, which is taken from Lawless (2003). The same data set is discussed in Nelson (1972). Nelson (1972) described the results of a life test experiment in which specimen of a type of electrical insulating fluid were subjected to a constant voltage stress. The length of time until each specimen failed, or “broke down” was observed. The data give results for seven groups of specimen, tested as voltage ranging from 26 to 38 kilovolts (kV).
Data creation
In this case of electrical insulating fluid data, all the three parameters including log.sigma are specified in a vector parm.names. The logposterior LP and sigma are included as monitored variables in vector mon.names. Total number of observations is specified by N, which is 76. Censoring is not included here. Thus, all these things are combined with object name MyData which returns the data in a list.
Initial values
Model specification
Model fitting
Summarizing output
Posterior summary of the analytic approximation using the function LaplaceApproximation , which is based an asymptotic approximation theory
Logistic model (k =1)  

Parameter  Mode  SD  LB  UB 
Beta[1]  62.90  6.11  50.69  75.12 
Beta[2]  17.35  1.74  20.84  13.87 
Log.sigma  0.16  0.10  0.35  0.04 
Weibull model (k =30)  
Parameter  Mode  SD  LB  UB 
Beta[1]  64.87  5.62  53.62  76.11 
Beta[2]  17.74  1.61  20.96  14.53 
Log.sigma  0.23  0.09  0.06  0.41 
Posterior summary matrices of the simulation due to sampling importance resampling algorithm using the same function
Logistic model (k =1)  

Parameter  Mean  SD  MCSE  ESS  LB  Median  UB 
Beta[1]  62.73  6.34  0.06  10000  50.08  62.84  75.23 
Beta[2]  17.30  1.81  0.02  10000  20.88  17.33  13.66 
Log.sigma  0.14  0.10  0.00  10000  0.32  0.14  0.06 
Deviance  283.20  2.46  0.02  10000  280.38  282.56  289.75 
LP  160.93  1.23  0.01  10000  164.20  160.61  159.52 
Sigma  0.88  0.09  0.00  10000  0.72  0.87  1.06 
Weibull model (k =30)  
Parameter  Mean  SD  MCSE  ESS  LB  Median  UB 
Beta[1]  65.18  5.86  0.06  10000  53.79  65.20  76.77 
Beta[2]  17.83  1.67  0.02  10000  21.16  17.83  14.58 
Log.sigma  0.25  0.09  0.00  10000  0.08  0.25  0.43 
Deviance  278.35  2.40  0.02  10000  275.57  277.72  284.52 
LP  158.50  1.20  0.01  10000  161.59  158.19  157.11 
Sigma  1.29  0.11  0.00  10000  1.09  1.29  1.54 
Fitting with LaplacesDemon
In this section, the function LaplcesDemon is used to analyze the same data, that is, electrical insulating fluid failure times data. This function maximizes the logarithm of unnormalized joint posterior density with MCMC algorithms, and provides samples of the marginal posterior distributions, deviance and other monitored variables.
Model fitting
Summarizing output
Posterior summaries of simulation due to all samples using the function LaplacesDemon
Logistic model (k =1)  

Parameter  Mean  SD  MCSE  ESS  LB  Median  UB 
Beta[1]  64.45  5.90  0.32  32.69  51.07  66.30  74.19 
Beta[2]  17.80  1.68  0.09  32.38  20.56  18.32  14.00 
Log.sigma  0.14  0.09  0.00  506.99  0.31  0.14  0.05 
Deviance  283.17  2.45  0.11  518.19  280.37  282.62  288.83 
LP  160.91  1.23  0.06  518.19  163.74  160.64  159.51 
Sigma  0.87  0.08  0.00  508.50  0.73  0.87  1.05 
Weibull model (k =30)  
Parameter  Mean  SD  MCSE  ESS  LB  Median  UB 
Beta[1]  65.60  5.40  0.14  556.65  54.55  66.22  75.84 
Beta[2]  17.95  1.54  0.04  557.46  20.87  18.13  14.77 
Log.sigma  0.25  0.09  0.00  1652.97  0.08  0.25  0.44 
Deviance  278.33  2.35  0.06  2000.00  275.61  277.75  284.22 
LP  158.50  1.17  0.03  2000.00  161.44  158.20  157.13 
Sigma  1.29  0.12  0.00  1656.80  1.08  1.29  1.55 
Posterior summaries of simulation due to stationary samples using the same function
Logistic model (k =1)  

Parameter  Mean  SD  MCSE  ESS  LB  Median  UB 
Beta[1]  62.98  6.34  0.29  420.00  50.54  62.82  75.45 
Beta[2]  17.38  1.81  0.08  420.00  20.88  17.35  13.85 
Log.sigma  0.13  0.09  0.00  420.00  0.31  0.13  0.05 
Deviance  283.20  2.59  0.14  364.17  280.33  282.65  289.18 
LP  160.93  1.30  0.06  364.16  163.92  160.65  159.49 
Sigma  0.88  0.08  0.00  420.00  0.73  0.87  1.05 
Weibull model (k =30)  
Parameter  Mean  SD  MCSE  ESS  LB  Median  UB 
Beta[1]  65.24  5.56  0.13  1586.43  54.29  65.26  76.01 
Beta[2]  17.85  1.59  0.04  1586.97  20.93  17.86  14.70 
Log.sigma  0.25  0.09  0.00  1430.58  0.08  0.25  0.44 
Deviance  278.37  2.37  0.06  1800.00  275.60  277.78  284.39 
LP  158.52  1.18  0.03  1800.00  161.52  158.22  157.13 
Sigma  1.29  0.12  0.00  1427.11  1.08  1.29  1.55 
Discussion and conclusions
In this article, Bayesian approach is applied to model the real reliability data. The generalized logBurr distribution is used as a Bayesian model to fit the data, and for the analysis. Two important techniques, that is, asymptotic approximation and simulation method are implemented using the functions of ‘LaplacesDemon’ package of R. This package facilitates highdimensional Bayesian inference, posing as its own intellect that is capable of impressive analysis, which is written entirely in R environment and has a remarkable provision for user defined probability model. The main body of the manuscript contains the complete description of R code both for intercept and regression models of logBurr distribution. The function LaplaceApproximation approximates the results asymptotically and simulation is made by the function LaplacesDemon. Results of these two methods are very close to each other for different values of shape parameter k of logBurr distribution. The excellency of these approximations seem clear in the plots of posterior densities. It is evident from the summaries of results that the Bayesian approach based on weakly informative priors is simpler to implement than the classical approach. The wealth of information provided in these numeric and graphic summaries are not possible in classical framework (e.g., Lawless 2003). Thus, it is very difficult to analyze these types of data by classical method, whereas it is quite simple in Bayesian paradigm using tools like R.
Declarations
Acknowledgements
The first author would like to thank University Grants Commission (UGC), New Delhi, for financial assistance.
Authors’ Affiliations
References
 Gelman A, Hill J: Data analysis using regression and multilevel/hierarchical models. New York: Cambridge University Press; 2007.Google Scholar
 Lawless JF: Statistical models and methods for lifetime data. New York: John Wiley & Sons; 2003.Google Scholar
 Mosteller F, Wallace DL: Inference and disputed authorship: the federalist. Reading: AdditionWesley; 1964.Google Scholar
 Nelson WB: Graphical analysis of accelerated life test data with the inverse power law model. IEEE Trans Reliab 1972, R21: 211.View ArticleGoogle Scholar
 R Core Team: R: A Language and Environment for Statistical Computing. 2013.http://www.Rproject.org/ R Foundation for Statistical Computing, Vienna, Austria. URL .Google Scholar
 Schmee J, Nelson W: Estimates and approximate confidence limits for (log) normal life distributions from singly censored samples by maximum likelihood. : ; 1977. General Electric C. R. & D. TIS Report 76CRD250. Schenectady, New YorkGoogle Scholar
 Statisticat LLC: LaplacesDemon: complete environment for Bayesian inference. 2013.http://www.bayesianinference.com/software R package version 13.03.04, .Google Scholar
 Tanner MA: Tools for statistical inference. New York: SpringerVerlag; 1996.View ArticleGoogle Scholar
 Tierney L, Kadane JB: Accurate approximations for posterior moments and marginal densities. J Am Stat Assoc 1986, 81: 8286. 10.1080/01621459.1986.10478240View ArticleGoogle Scholar
Copyright
This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly credited.