Factor BT test

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

irulishka
Posts: 45
Joined: Fri Jun 03, 2011 9:38 am

Factor BT test

Postby irulishka » Tue Jun 28, 2011 3:57 am

Hello!!!
All formulas I used to define the LR statistics didn't gave me same results as tests. I used following fomulas:


LR=-2LN(la)=-2(ln(L(q(restr))-ln(L(q(unrest)))

All formulas are for regression with linear restrictions, but in the 'Factor breakpoint test' restrictions are not linear, but in an additional variable form . Please, advise me some books to read, with the right computation formula.
Thank you very much!

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13323
Joined: Tue Sep 16, 2008 5:38 pm

Re: Factor BT test

Postby EViews Gareth » Tue Jun 28, 2011 7:51 am

I don't understand your question (if, indeed, there is one?)
Follow us on Twitter @IHSEViews

irulishka
Posts: 45
Joined: Fri Jun 03, 2011 9:38 am

Re: Factor BT test

Postby irulishka » Tue Jun 28, 2011 10:41 pm

Well, I'll show you my problem with an example.

Here's a sample on which to build a regression and p1 add variable.

y x1 x2 x3 p1
25 11 1 2 0
30 15 3 5 0
35 13 2 8 0
43 2 8 3 0
36 8 5 9 0
85 20 7 4 0
25 11 1 2 0
30 15 3 5 0
35 13 2 8 0
43 2 8 3 1
36 8 5 9 1
85 20 7 4 1
25 11 1 2 1
30 15 3 5 1
35 13 2 8 1
43 2 8 3 1
36 8 5 9 1
85 20 7 4 1
25 11 1 2 1
30 15 3 5 1

In book EViewsHelp says that Log likelihood ratio statistic calculated by the formulas:
l=-T/2(1+log(2*pi)+log(e'e/T)
LR=-2(l(restr)-l(unrestr))
OR
In Ben Vogelvang - Econometrics.Theory and Applications with EViews says that

LR=-2Ln(lambda), lambda=L(teta)with restrictions / L(teta)without restrictions

in ex. l unrestr=-65,36157
l1restr=-29,85
l2restr=-35,27551
=> LR = -2 ((-29,85+-35,27551)-(-65,36157))=-0,47
but in Eviews I get 0.344791!!!

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13323
Joined: Tue Sep 16, 2008 5:38 pm

Re: Factor BT test

Postby EViews Gareth » Wed Jun 29, 2011 7:55 am

Hard to know where your calculations are coming from, but when I use that data, I get a restricted LR of -65.36157, and an unrestricted LR of -65.18918. Which does seem to give the LR test statistic of 0.344791
Follow us on Twitter @IHSEViews

irulishka
Posts: 45
Joined: Fri Jun 03, 2011 9:38 am

Re: Factor BT test

Postby irulishka » Wed Jun 29, 2011 10:29 pm

Ok. Сan you show me how you calculate an unrestricted LR of -65.18918? how to construct an unrestricted regeres
I can stand it is not correct.

i using regression ls y c x1 x2 x3 => Log Likelihood ratio = -65.36157 this is restricted
next
ls y c x1 x2 x3 p1 => Log Likelihood ratio = -65.36008
short regression ls y c x1 x2 x3 (9 observations)=> Log Likelihood ratio = -29,85
short regression ls y c x1 x2 x3 (11 observations)=> Log Likelihood ratio = -35,27551

Now you can see what I can not get unrestr Log likelihood as you :( Please, help me!!!!

irulishka
Posts: 45
Joined: Fri Jun 03, 2011 9:38 am

Re: Factor BT test

Postby irulishka » Thu Jun 30, 2011 1:25 am

or if restricted regression is y=c0+c1x1+c2x2+c3x3+e => unrestricted regression is ???

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13323
Joined: Tue Sep 16, 2008 5:38 pm

Re: Factor BT test

Postby EViews Gareth » Thu Jun 30, 2011 7:49 am

Code: Select all

equation eq1.ls y c x1 x2 x3

equation eq2.ls y c p1 x1 x1*p1 x2 x2*p1 x3 x3*p1

scalar lrstat = 2*(eq1.@logl-eq2.@logl)

show lrstat
Follow us on Twitter @IHSEViews

irulishka
Posts: 45
Joined: Fri Jun 03, 2011 9:38 am

Re: Factor BT test

Postby irulishka » Sun Jul 03, 2011 10:16 pm

A very big thank you!!!!!!! :D You helped me a lot! ;)

mckilem
Posts: 3
Joined: Sun Jul 03, 2011 11:34 pm

Re: Factor BT test

Postby mckilem » Sun Jul 03, 2011 11:49 pm

hello EViews Gareth

equation eq1.ls y c x1 x2 x3
equation eq2.ls y c p1 p2 x1 x1*p1 x1*p2 x2 x2*p2 x2*p1 x3 x3*p1 x3*p2

I use two limitations. tried to make unrest.regression, but have not received the required logl.
Can I see how to build unrestr.regression for this test if we have two limitations.?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13323
Joined: Tue Sep 16, 2008 5:38 pm

Re: Factor BT test

Postby EViews Gareth » Tue Jul 05, 2011 10:01 am

You need the dummy interactions too.

Code: Select all

create u 100
rndseed 1
series y=nrnd
series x1=nrnd
series x2=nrnd

series p1=nrnd>0
series p2=nrnd>0.4

equation eq1.ls y c x1 x2

equation eq2.ls y c p1 x1 x1*p1 x2 x2*p1 p2 p2*x1 p2*x2 p1*p2 p1*p2*x1 p1*p2*x2


scalar lrstat = -2*(eq1.@logl-eq2.@logl)
freeze(tab1) eq1.facbreak p1 p2

show tab1
show lrstat
Follow us on Twitter @IHSEViews


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 30 guests