Exclude instruction

Questions and discussions on Time Series Analysis
challenges
Posts: 11
Joined: Thu Apr 14, 2011 12:29 pm

Exclude instruction

Unread post by challenges »

Dear Rats users,
I would like to estimate the following model:
y = beta0 + beta1*x1 + beta2*x2 + beta3*x3, imposing the restriction that beta1=beta2. Then, I wish to test whether beta2 and beta3 are equal to 0.

My code is as follows:
declare rect r(1,2)
ewise r(i,j)=j^(i-1)
encode r / gamma
# x1 x2
linreg(unravel) y
# constant gamma x3
exclude
# x2 x3

The problem is that it seems that Rats tests the hypothesis H0: beta1=beta2=beta3=0 (probably due to the restriction imposed on coefficients beta1 and beta2), while I would like to test H0: beta2=beta3=0.
Could you please tell me what would be the right way to proceed in order to exclude only x2 and x3?
Thank you in advance for your help.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Exclude instruction

Unread post by TomDoan »

See page RM-393 of the (version 8) reference manual. It's exactly what you 're trying to do.
restrict example.pdf
(110.16 KiB) Downloaded 960 times
challenges
Posts: 11
Joined: Thu Apr 14, 2011 12:29 pm

Re: Exclude instruction

Unread post by challenges »

Dear Tom,
Thank you a lot for your reply. The page RM-393 of my manual refers to the frequency instruction but I cannot figure out how to use it in my case.
Thank you for your help.
Last edited by challenges on Thu Jun 06, 2013 8:45 am, edited 1 time in total.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Exclude instruction

Unread post by TomDoan »

I'm not sure what manual you're looking at, but part of the description of RESTRICT has exactly your model. I attached the relevant page on the earlier post.
challenges
Posts: 11
Joined: Thu Apr 14, 2011 12:29 pm

Re: Exclude instruction

Unread post by challenges »

Dear Tom,

Thank you for your messages. The use of the restrict instruction:
restrict(create) 1
# 2 3
# 1.0 -1.0 0.0

doesn't change my output after the use of the exclude instruction:
exclude
# x2 x3

Indeed, while I would like to test with the exclude instruction the H0: beta2=beta3=0, Rats automatically tests the H0: beta1=beta2=beta3=0.
Is there any possibility to test the hypothesis beta2=beta3=0 (not beta1=beta2=beta3=0), despite the restriction imposed on coefficients beta1 and beta2 ?
Thank you for your help.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Exclude instruction

Unread post by TomDoan »

challenges wrote:Dear Tom,

Thank you for your messages. The use of the restrict instruction:
restrict(create) 1
# 2 3
# 1.0 -1.0 0.0

doesn't change my output after the use of the exclude instruction:
exclude
# x2 x3

Indeed, while I would like to test with the exclude instruction the H0: beta2=beta3=0, Rats automatically tests the H0: beta1=beta2=beta3=0.
Is there any possibility to test the hypothesis beta2=beta3=0 (not beta1=beta2=beta3=0), despite the restriction imposed on coefficients beta1 and beta2 ?
Thank you for your help.
All you need is:

linreg y
# constant x1 x2 x3
restrict(create) 1
# 2 3
# 1.0 -1.0 0.0

You don't need EXCLUDE, or ENCODE or UNRAVEL. The ENCODE/UNRAVEL code that you had before would get the restricted estimates correct (though obviously with more steps than use RESTRICT(CREATE)), but can't do the restriction since it never does the unrestricted estimates as a comparison. What EXCLUDE is doing there is testing that beta2=beta3=0 given that beta2=beta3 which isn't what you want.
Post Reply