• Nie Znaleziono Wyników

Bayesian estimation of a shift point in a two-phase regression model

N/A
N/A
Protected

Academic year: 2021

Share "Bayesian estimation of a shift point in a two-phase regression model"

Copied!
11
0
0

Pełen tekst

(1)

A C T A U N I V E R S I T A T I S L O D Z I E N S I S

F O LIA O EC O N O M IC A 141, 1997

Maria Jadamus-Hacura*

BA YESIA N EST IM A T IO N O F A SH IFT PO IN T IN A TW O-PH ASE R E G R E SSIO N M O D E L

Abstract. T he purpose o f this paper is to carry out the Bayesian analysis o f a two-phase regression model with an unknow n break point. Essentially, there are two problem s associated with a changing linear model. Firstly, one will w ant to be able to detect a break point, and secondly, assuming th at a change has occurred, to be able to estim ate it as well as other param eters o f the model. M uch o f the classical testing procedure for the param eter constancy (as the Chow test, C U SU M , C U SU M SQ , tests and their modifications, predictions tests for structural stability) indicate only th a t the regression coefficients shifted, w ithout specifying a break point.

In this study we adopt the Bayesian m ethodology o f investigating structural changes in regression models. The break point is identified as the largest posterior mass density, the peak o f the posterior discrete distribution o f a break point. It seems to w ork well with artificially generated data.

The Bayesian fram ew ork also seems to be prom ising for extending the analysis o f a single break to th a t o f m ultiple breaks.

Key words: two-phase-regression model, changing linear model, detection a break point, Bayesian estim ation, test for structural stability.

1. IN T R O D U C T IO N

The definition o f structural changes has not been given clearly in studies, but m ainly it has been considered as the problem o f non-constancy o f regression param eters over the sample period. In this paper we adopt this concept. It is obvious that the use o f sample where the regression coefficients are not constant, leads to biased testing results, because testing procedures are based on the full sample estimates. U nder the possibility of structural changes during the sample period, it is im portant to segment a full sam ple into sub samples, where the regression param eters are constant. This problem has been attacked in various ways.

(2)

O ur analysis is based on the Bayesian estim ation of a shift point presented by B r o m e l i n g and T s u r u m i (1987). The m arginal posterior density function of the shift point is used for testing the stability o f param eters in regression m odel and some numerical studies are performed.

2. MODEL AND THE POSTERIOR DISTRIBUTION OF THE SHIFT POINT

The m odel we shall consider is the two-phase regression model:

W i + «I i = l , 2...m

\ х$2

+ Ei i = m + 1, m + 2 , n

where:

- y { (i = 1, 2,..., n) is the ith observation o f the dependent variable, - x, is the 1 x p vector of given observations o f independent variables, - ß u ß 2 are the p x 1 vectors of the regression coefficients considered to shift from the first regime to the second regime,

- m is the unknow n shift point,

- e, is the error term; it is assumed th at the e1 are norm ally and

independently distributed with zero m ean and com m on unknow n precision x ( E ( e ) = 0, E ( e ' s ) = T - 4 n).

I f m = n, no change has occurred, while if w e { l , 2 ,..., n — 1} exactly one change has occurred. N ote, that for т ф п we can rewrite the m odel (1) as follows: г а д п г х , « О п р л 1 у S ’» )} L o ( ) where: = - * f x 2 , X 2(m) = x m+1 x m + 2 , Yy(m) = ~ y { У 2 , Y2(m) = >m + r Ут + 2 - X" . Ут_ _Уп

On the other hand, for m = n the m odel is given by: Y = X ß l +E

(3)

As it. is well known, in the Bayesian approach all inferences about unknow n param eter vector 0 are based on the posterior probability density function (pdf) for param eter vector 0, given the sam ple inform ation У (p(0/y))- We would obtain this posterior pdf p(0/y) by com bining prior p d f (p(0)), which represents our initial beliefs about 0 and the likelihood function L(0jy) representing the sample inform ation.

In the analysis o f linear regression models usually two types o f the prior probability density functions have been used: a noninform ative prior, when an inform ative or a subjective prior is not available (see, for example K e y i n g , 1993) and an informative prior named “natural conjugate” prior, which is often useful in representing prior inform ation, relatively simple, and m athem atically tractable (see D e G r o o t , 1981).

In our m odel (1) param eter vector 0 = (m, ß lt ß 2, т). F o r our analysis we consider the following natural conjugate, the norm al-gam m a p df for 0:

(q(2n)~ plz\ K \ il2Tpl2e x p ( — x/2(ß t — ß i o ) ' h 11( ß 1 — ß 10)) • p(m, ß , , ß 2, т) = J ' Ь7Г(а)тв_1е х р ( - тЬ) dla m = n

• (1 —q) I ( n — l)(2n) ~ p IЛ 11 /2трехр (— x / 2 ( ß - ß 0)'A(ß - ß 0)) ■ [*Ьа/Г(а)х“~ * е х р (- xb) dla 1 < m ^ n — 1 (4) F o r m = п param eters ( ßit r) are assigned the norm al-gam m a density i.e. the conditional distribution for ß t is the p-dimensional normal pdf with m ean vector ß 10 and precision m atrix тА ц (Лп is a positive-definite m atrix of order p), while the m arginal distribution for т is the gamm a pdf with param eters a and b. F rom (4) it is visible that when 1 < m < n — 1, the conditional distribution for ß 0 = (//j, ß 2) is 2p-dimensional norm al pdf with m ean vector Po — ( ßio, ß w ) and positive-definite precision m atrix A o f order 2p, where:

ГЛ11Л 12’1 L ^2lA 22j

Furtherm ore, the m arginal prior density function o f m is: , . _ j q dla m = n

^ {(1 — q)/(n — 1) dla 1 ^ m < n — 1 ^

N ote, that for m = n, the m odel is stable and q represents the probability o f this event. W hen we are not sure that the m odel is stable, q = 0.5 seems to be appropriate prior choice.

O ur m ain interest is to find the m arginal posterior density function of w and to com pare it with the m arginal prior density function o f m given by (5).

(4)

U q t Y ) = i ( 2 r c r n/V /2e x p ( - r/2 (Y — X ß J ( Y - X ß J ) dla m = n l(2?c)_ "/2t"/2exp (— r/2 ( Y— X ( m ) ß ) ' ( Y - X ( m ) ß ) ) dla 1 < m < n

where: (6)

L 0

* 2(m )J

Then, com bining (4) and (6) we obtain the joint posterior p d f for 0. This function is a basis for m aking inferences about ß u ß 2, x and m. Integrating the joint posterior p d f with respect to ß and t, the posterior distribution o f the shift point is obtained as:

í í |A n |0,5Z3(n)-(»+2»)/2 | r X + A u | - 0<s dla m = n

p ( m / Y ) o J (1 - q)/(n — 1)|A|°*sD(m)~<"+2fl)/21X' (m)X(m) + A |“ ° 'S (?) where:

D(n) = b + 0 , 5 [ Y ' Y + ß iO' \ u ß lo - ß * ' ( X ' X + A u )^* ]

D(m) = b + 0,5{[Y— X(m)ß*(m)]'Y+ [ß0 - ß*(m)]'Aß0} for 1 < m ^ n - 1 and

ß ? = [ X ' X + A n ] - i [An ß 10 + X ' Y ] ; ß*(m) = [X'(m)X(m) + A]_1[A/Í0 + X'(m) Y].

The com parison of the posterior probability density function o f m with the prior probability density function (5) let us deduce about the m odel param eters stability as well as specify the shift po in t m*. W hen the posterior probability o f no change p(m = ri)/Y is less th a n the p rio r probability of no change equal q, the m odel is unstable; in the opposite case the hypothesis about the m odel stability should be accepted.

3. A NUMERICAL STUDY

F o r illustrative purposes, we perform some num erical studies in this section. The posterior distribution of the shift point m was obtained with the d ata generated by the following model:

Г3х, + е„ i = l , 2 ,..., m

|( 3 + А)х; + £„ i = m + 1, m + 2...20 ^ where:

- x, (i = 1, 2 ,..., 20) are generated from the uniform distribution over <1, 20),

(5)

- £i~iV(0, 1),

- for А Ф 0 a structural change occurs at point m = m*.

In the numerical studies we p ut m* = 5, 10, 15 and A = 0.1, 0.2, 0.4 and 0.5 i.e. the angle between regression lines is respectively equal 0.01 rad, 0.02 rad, 0.03 rad and 0.04 rad.

The prior distribution for this example is such th at q = 0.5, m is independent o f ß and r, ß given т is four dimensional norm al pdf with m ean vector ß 0 = (3, 0, 3, 0) i.e. the m odel is stable, and precision m atrix is r / 4 (A = and A u = Л 22 = J 2, A 12 = Л 21 = 0) and the m arginal distribution of t is the gamm a pdf with param eters a = 2, b = 1.

T a b l e 1 M arginal posterior distribution of m when m* = 5

m \A 0.1 0.2 0.4 0.5 1 0.120

o.ooi

0.000

o.ooo

2 0.038 0.002

o.ooo

0.000

3

0.022

о.ооз

o.ooo

o.ooo

4

o.ioo

0

.391

0.062

o.oio

5 0.044 0.162 0.318 0.431 6 0.043 0.201

0.400

0.435

7 0.053 0.238 0.220 0.124

8

0.009 0.000 0.000 0.000 9 0.019 0.000 0.000 0.000

10 0.011

o.ooo

o.ooo

o.ooo

11 0.006 0.000 0.000 0.000

12 0.006

o.ooo

o.ooo

o.ooo

13 0.006 0.000 0.000

o.ooo

14 0.002

o.ooo

0.000

o.ooo

15 0.001

o.ooo

0.000

o.ooo

16 0.002 0.000

o.ooo

o.ooo

17 0.005 0.000 0.000

o.ooo

18 0.005

o.ooo

0.000

o.ooo

19 0.006 0.000 0.000

o.ooo

. ...20 0

.502

o.ooi

o.ooo

0.000

(6)

The objective is to test the null hypothesis of no change by using the m arginal posterior density function (7).

The posterior distributions o f m are shown in Tab. 1-3 and in Fig. 1-3. From these tables and figures we can see the following facts:

- only in two cases: for A = 0.1, and m* = 5 and m* = 15 the posterior probability o f no change (p(m = 20)/Y) is larger than q = 0.5. In other cases this posterior probability is close to zero, which indicates the m odel instability.

- we can estimate the shift point m* as the m ode o f the m arginal posterior density function of m;

T a b l e 2 M arginal posterior distribution o f m when m* = 10

m \A

0.1

0.2

0.4

0.5

1

0.002

0.000 0.000 0.000

2

o.ooi

0.000 0.000 0.000

3

o.ooo

o.ooo

0.000

o.ooo

4

o.ooi

0.000 0.000

o.ooo

5

o.ooo

0.000 0.000 0.000

6

o.ooo

o.ooo

0.000 0.000

7

o.ooi

0.000 0.000

o.ooo

8

o.ooi

0.000

o.ooo

o.ooo

9

0.166

0.046

o.ooo

o.ooo

10

0.330 0.716 0.979 0.995 11

0.161

0.118

0.011

0.003

12

0.134

0.103

0.010

0.002

13

0.093

0.017

0.000 0.000

14

o.ooi

0.000 0.000 0.000

15

o.ooo

o.ooo

0.000 0.000

16

o.ooo

0.000 0.000

o.ooo

17

0.001 0.000

o.ooo

0.000

18

0.001 0.000 0.000 0.000

19

0.001

0.000

0.000 0.000

20

0.106 o.ooo 0.000 o.ooo

(7)

if A increases, the probability P(m = m*)/Y, is larger.

- in general a shift in the centre of the d ata is easier to detect (see T ab. 2), the problem arises only if the break point is at the beginning or the end and the value of A is relatively small.

T a b l e 3

M arginal posterior distribution o f m when m* = 15

/и\Д 0.1 0.2 0.4 0.5

1 0.013

o.ooo

o.ooo

o.ooo

2 0.004

o.ooo

o.ooo

o.ooo

3 0.002

o.ooo

o.ooo

o.ooo

4 0.002

o.ooo

0.000

o.ooo

5 0.002

o.ooo

o.ooo

o.ooo

6 0.002

o.ooo

o.ooo

o.ooo

7 0.002

o.ooo

o.ooo

0.000

8 0.002

o.ooo

o.ooo

o.ooo

9 0.025

o.oio

o.ooo

o.ooo

10 0.028 0.016

o.ooo

o.ooo

11 0.021 0.011

o.ooo

o.ooo

12 0.019 0.012

o.ooo

o.ooo

13 0.037 0.047

o.ooo

o.ooo

14 0.028

0.785

0.168 0.007 15 0.005 0.064

0.830

0.993

16

о.ооз

0.007

o.ooi

0.000 17 0.007

o.ooo

0.000 0.000 18 0.007 0.000 0.000 0.000 19 0.009

o.ooi

0.000 0.000

20

0.782

0.045

o.ooo

o.ooo

(8)

Lŕi o\

0,6

0,5

-■ Д = 0,1; □ Д = 0,2; □ Д = 0 ,4; Ш. Д Fig. 1. M a rginal posterior distribution o f m

— I--- h--- 1-— r ---- h--- P — 14 15 16 17 18 19 20 = 0,5 M ari a Ja d a m u s-H a c u ra

(9)

1 - |- 0,9 - - 0,8 -- 0,7 - - 0,6 - - 0,5 - - 0,4 - - 0,3 - - 0,2 - - 0,1 --6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 m * = 10 I A = 0,1; □ Д = 0,2; □ A = 0,4; Ш A = 0,5 Fig. 2. M arginal posterior distribution o f m

B ay es ia n estim atio n of a sh ift p oint in a tw o-p has e re g re ss io n m o d e l

(10)

Lň oo

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

m * = 15

■ A = 0,1; □ Д = 0,2; □ A = 0,4; Ш. Д = 0,5 Fig. 3. M arginal posterior distribution o f m

M ar ia J a d a m u s-H a c u ra .

(11)

4. C O N C L U D IN G R EM A R K S

In this paper, we have derived the posterior distribution o f the shift point for a two-phase regression model. It was shown how to detect structural change and to estimate the change point o f the model. We m ay see that the posterior distribution of m gives a clear indication ab o u t the tru e value o f the shift point. This m ethod seems to w ork well with artificially generated data, but the form of the priors o f 0 is the crucial assum ption for obtaining the results presented in this paper. Therefore, m ore w ork is required to form ulate, understand, and use a broader range o f prior p d f ’s to represent our prior inform ation.

R EFE R E N C E S

A n d r e w s D . W. K . (1990): Tests fo r parameter instability and structural change with unknown change point, „Cowles F oundation Discussion P aper” , Y ale University, N o 943. B r o e m e i n g L . D. , T s u r u m i H. (1987): Econometrics and structural change, M arcel

D ekker, New York.

D e G r o o t M . H. (1981): Optymalne decyzje statystyczne, PW N, W arszawa.

K e y i n g Y e (1993): Reference priors when the stopping rule depends on the parameter o f interest, „Journal o f the Am erican Statistical A ssociation” , Vol. 88, N o 421.

Ż e l i n e r A. (1971): An introduction to Bayesian Inference in Econometrics, J. Wiley, New York.

M aria Jadamus-Hacura

BAYESOW SKA ESTY M A C JA P U N K T U Z M IA N Y W M O D E L U R E G R ESJI D W U FA ZO W E J

Celem pracy jest analiza bayesowska modelu regresji dwufazowej z nieznanym punktem zmiany strukturalnej to jest punktem , w którym zmienna objaśniana zaczyna być kształtow ana przez inną relację liniową zmiennych objaśniających. W szczególności rozw ażane są dwa zagadnienia związane ze zmieniającym się modelem liniowym. Jedno to p ro b lem wykrywania punktu zmiany, drugie to problem estymacji lego punktu i innych param etrów modelu przy założeniu, że zmienna nastąpiła.

W iększość klasycznych procedur testowych służących d o weryfikacji hipotezy o stabilności m odelu regresji liniowej (tj. test Chow ’a, C U SU M , C U SU M SQ i ich modyfikacje) wskazuje tylko, że współczynniki regresji zmieniają się bez specyfikacji punktu zmiany.

W pracy tej zastosow ano m etodę bayesowską badania strukturalnych zmian w m odelach regresji. Przy estymacji bayesowskiej tychże modeli przyjęto klasyczne założenia o gam- m a-norm alnym rozkładzie a priori szacowanych param etrów .

Cytaty

Powiązane dokumenty

– Secure Docking Module – in order to provide security for agents that dock on to a trusted agent network, the SECRICOM project proposes the usage of Secure layer based on

Kognitywistyka: Wstęp do matematyki Funkcja prawdopodobieństwa, 19.11.2018 Zadanie 1.. Rzucamy

Drugi z samochodów jecha ze redni pr dko ci wi ksz o 20 km/h od redniej pr dko ci pierwszego samochodu, a czas przejazdu pierwszego samochodu by o 72 minuty d szy od

b) całkowanie równań ruchu punktu nieswobodnego (wahadło matematyczne – rozwiązanie pełne). II Mechanika układu punktów materialnych II.1 Równania Newtona. II.2 Środek

[r]

variables, whereas in a frequentist approach is assumed to be a constant The distribution of before observing the data is called prior distribution and is denoted by..

Czy istnieje taki ostrosłup czworokątny oraz taka płaszczyzna przecina- jąca wszystkie jego krawędzie boczne, że pole uzyskanego przekroju jest więk- sze od pola podstawy

2. Trzech studentów przygotowywało się niezależnie do egzaminu z rachunku prawdopodobieństwa. Rzucamy n razy kostką do gry. Obliczyć prawdopodobieństwo tego, że: a) szóstka