Bayesian analysis to detect change-point in two-phase Laplace model

The general form of the change-point problem is to determine the unknown location , based on an ordered sequence of observations such that, the two groups of observation and follow distinct models. In this paper the problem of changepoint detection of two-phase Laplace model is considered. Our object is to find the location of random variables where the parameters of their model are changed. The Bayesian method is used to estimate the parameters. Then by simulation studies, the implementation of proposed method will be discussed. For estimate the parameters of the model, and the procedure of the change-point detection the R2OpenBUGS Package in R is used. Finally, a few empirical applications are presented to illustrate the usefulness of the procedures.


INTRODUCTION
In this paper, Bayesian analysis to detect a change point in the observations that follow the Laplace distribution will be done.Laplace distribution is more appropriate than normal distribution for modeling heavy tailed data.Indeed, the coefficient of kurtosis for Laplace distribution is 3, considerably different from this value for the normal distribution which is zero.
Assuming Laplace distribution for the data, the main emphasis is to extract the posterior distribution of the change-point and other parameters.A sequence of random variables has a change-point in , if and where , where and have Laplace model and the change point, , is unknown.In relation with this issue of detection of change-point in a Bayesian framework, Chernoff and Zacks (1964) considered a Bayes test to determine the mean change in normal observations.Hinkley (1972) investigated the maximum likelihood (ML) estimates of a one change-point.Smith (1975) considered one change-point problem in terms of distributional changes using the Gibbs sampler as a Bayesian approach.Yao (1984) derived Bayes estimates in the presence of additive Gaussian noise and a signal that is a step function.For a Bayesian multiple changepoint problem, Barry and Hartigan (1993) used the product partition model.Stephens (1994) discussed the use of a sampling-based technique and the Gibbs sampler that included the binomial data model.Venter and Steel (1996)  In this paper, a Two-Phase Laplace (TPL) model with a change-point has been proposed, so that, model parameters is changes from apart of the data to another.The following parts of this paper are organized as follows: The change-point model is first described, followed by a presentation of Bayesian analysis.Thereafter, posterior distribution of parameters for TPL model are obtained along with a discussion of simulation studies.Empirical applications are next presented and the paper concluded.

CHANGE POINT FOR THE TPL MODEL
Here, a change-point model to TPL model is introduced.Suppose the sequence of random variables.Also assume, is the change-point.The TPL model with change-point at location of m is defined as The likelihood function, is: (2) Where and

BAYESIAN ANALYSIS
The ML methods as well as other classical approaches are based only on the empirical information provided by the data.However, when there is some technical knowledge about the parameters of the distribution, a Bayes procedure seems to be an attractive inferential method.Bayesian method is based on the posterior distribution, which is proportional to the product of the likelihood function and joint prior density, that is: In the expressions (4), ( 5), ( 6) and ( 7) we have and in the expression (8) we have Since the above posterior distributions have not closed form, the computational methods are used to estimate the parameters.

SIMULATION STUDIES
To implement the proposed method and to estimate the change point, the R2OpenBUGS Package in R is used.
For this purpose, we simulate 100 data from model (1) with a specified change point.Let has discrete uniform distribution on values and parameters are normally distributed with zero mean and variance of 0.1, we also assume has a prior density of , has a prior density of .Results for 5000 iterations and burnin 1000, are obtained.Raftery-Lewis convergence criterion in each simulation was calculated and based on this result, the appropriate thining rate was considered.The validity of simulation is investigated by using autocorrelation plot and Geweke's statistic is used to test convergence.We study the performance of the model with respect to different value of parameters.So we consider simulation results for three different scenarios.

Scenario A
In this scenario, model ( 1) with initial values , and , was simulated and is shown in Figure 1a.For fitting model, the appropriate thining rate is 1.The Bayesian calculation results in Table 1 shows that change point is accurately estimated and the estimation of other parameters can be obtained with good accuracy.Because estimated parameters are close to true parameters, this results shows satisfactory performance of the estimation procedure.The autocorrelation and trace plots are shown in Figure 1(b) and (c).Geweke's statistic is obtained 0.75 which shows convergence.

Scenario B
In this scenario, model (1) with initial values , and , and was simulated.Figure 2a show simulated plot.The Bayesian estimation parameters with the same prior densities in scenario A, is given in Table 2.The results in Table 2 show that the parameters are estimated with good accuracy.The autocorrelation and trace plots are shown in Figure 2(b) and (c).Geweke's statistic is 0.05 which shows convergence.

Scenario C
For further investigation, we estimate parameters for simulatd data by initial values and , and .Figure 3a shows simulated data plot.The results are shown in Table 3.Since estimated parameters are close    The values Q(0.025) and Q(0.975) show quantiles of order 0.025 and 0.975, respectively.The values Q(0.025) and Q(0.975) show quantiles of order 0.025 and 0.975, respectively.The values Q(0.025) and Q(0.975) show quantiles of order 0.025 and 0.975, respectively.
Results with the number of iteration 40000, and burnin 1000 are obtained.Raftery-Lewis convergence criterion in each simulation was calculated and based on it, the appropriate thining rate was 5 considered.The validity of convergence by using autocorrelation function (acf) plot and Geweke's statistic was investigated.The numerical results for ICPUI data are shown in Table 4. Geweke's statistics is obtained 0.46, that this amount is satisfactory and reflects the convergence of numerical results with good accuracy.Autocorrelation plot is shown in Figure 4(b).This plot confirms convergence.As shown in Table 4 and data plot (a), we see that the position of change point for the ICPUI data, is estimated 203.The Deviance information criterion (DIC) was 367.4.We also performed these analyses for the data, assuming normal distribution for the increments.The location of change-point estimated nearly as before, but the value of DIC obtained 387.5.This result show that Laplace distribution is more appropriate for analysis of these data.

CONCLUSION
In this study, we discussed the Bayesian estimation of change-point and other parameters in two-phase Laplace model.Our simulation studies showed that the Bayesian estimation of posterior mean of , and are obtained satisfactory with respect to the different paprameters for the model.
We also showed in Tables 1, 2 and 3 that the Bayesian estimation of change point and other parameters are closed to the true values of parameters.For checking sensitivity to hyperparameters, we done more simulations with different values of hyperpaprameters and we did not find sensitivity to choice of hyperparameters.In an application of the methodology to the ICPUI data, location of change-point and other parameters estimated and it is shown that assuming Laplace distribution is better than normal distribution.These results indicate that the proposed method is effective and may provide a useful tool for change analysis.The problem of multiple changepoint or selection of more informative priors on changepoint can be considered as future works.
identified multiple abrupt change-*Corresponding author.E-mail: amrollahjafari@gmail.com.Author(s) agree that this article remain permanently open access under the terms of the Creative Commons Attribution License 4.0 International License points in a sequence of observations via hypothesis testing.Chib (1998) formulated the multiple change-point model in terms of a latent discrete state variable according to the markov process with transition probabilities.Jani and Pandya (1999) developed Bayes estimation of shift point in left truncated exponential sequence.Hawkins (2001) developed an approach with maximum likelihood estimates of the change points and within-segment parameters in the exponential family.Ebrahimi and Ghosh (2001) considered Bayesian and frequentist methods in change-point problems.Pandya and Jani (2006) and Pandya and Jadav (2008) used the Bayesian method of the change-point for weibull and inverse Weibull distributions.Pandya and Jadav (2009) derived Bayes estimation of change-point in nonstandard mixture distribution of Inverse Weibull with unknown proportions.Pandya and Jadav (2010) derived bayes estimation of change point in mixture of left truncated exponential.Pandya (2013) derived Bayes estimation of AR(1) with change-point under asymmetric loss functons.Nasiri et al. (2014) derived Bayesian estimation of reliability function for a changing exponential family model under different loss functions.
Discrete uniform on set respectively, and have standard normal distribution.Prior densities are formulated as follows For simplicity, assume that and are independent.So, their joint prior density is Where Then, the joint posterior distribution function for and is given by If the denominator of the is shown THE PARAMETERS Marginal posterior distribution of the parameters after some algebraic calculations are:

Figure 1 .
Figure 1.(a) Simulated data, (b) autocorrelation plot and (c) trace plot for scenario A.

Figure 3 .
Figure 3. (a) Simulated data (b) autocorrelation plot and (c) trace plot for scenario C.
to the true parameters, This results indicates that the Bayesian estimation of parameters is satisfactory and Geweke'sstatistic amount is 1.72 which shows convergence.The autocorrelation and trace plots are shown in Figure 3(b) and Figure 3(c).REAL DATA ANALYSISHere, we use data of the index of consumer prices for goods and services in urban areas of Iran (ICPUI), which is published by the Central Bank of the Islamic Republic of Iran.We are interested in change-point of increments of ICPUI data (that is, we used ).To find the change point position and estimation of other parameters, we use model (1) for this data.The first plot on the left of Figure4ashows a graph of these data.The data size is .Previously, we assume has discrete uniform distribution on values and parameters are normally distributed with zero mean and variance of 0.1, we also assume has a prior density of , has a prior density of .

Table 1 .
Results of a Bayesian calculation for simulated data in scenarioA with .Standard error is shown by se.

Table 2 .
Results of a Bayesian calculation for simulated data in scenario B with .Standard error is shown by se.

Table 3 .
Results of a Bayesian calculation for simulated data in scenario C with .Standard error is shown by se.

Table 4 .
Results of a Bayesian calculation for ICPUI data with .Standard error is shown by se.