Page 1 of 1
Exclude instruction
Posted: Wed Jun 05, 2013 6:29 am
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.
Re: Exclude instruction
Posted: Wed Jun 05, 2013 9:44 am
by TomDoan
See page RM-393 of the (version

reference manual. It's exactly what you 're trying to do.
Re: Exclude instruction
Posted: Thu Jun 06, 2013 3:13 am
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.
Re: Exclude instruction
Posted: Thu Jun 06, 2013 8:14 am
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.
Re: Exclude instruction
Posted: Mon Jun 10, 2013 5:06 am
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.
Re: Exclude instruction
Posted: Mon Jun 10, 2013 7:16 am
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.