Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

constraints in xtgls and xtpcse [was: st: QUESTION]


From   Maarten buis <[email protected]>
To   [email protected]
Subject   constraints in xtgls and xtpcse [was: st: QUESTION]
Date   Tue, 29 Apr 2008 21:19:49 +0100 (BST)

--- Samira Bakhshi <[email protected]> wrote:
> I want to use xtgls or xtpcse commands but I do not know how to
> impose constraint with these commands. 
> STATA does not allow ,const() option after xtgls command.

First of all, please use informative subject titles. Also Stata, is
written as Stata and not STATA (it is an invented word not an acronym)
All this you could and should have read in the Statalist FAQ, a
reference to which you can find at the bottom of every message on
statalist. 

You can always use the following trick to impose a linear constaint.
Consider this regression equation:

y = b0 + b1 x1 + b2 x2 + e

If you want to constrain b1 equal to b2, you can just as well write:

y = b0 + b1 x1 + b1 x2 + e
  = b0 + b1 (x1 + x2) + e

So, if you create a variable which is the sum of x1 and x2, and add
this variable to your model instead of x1 and x2, then the parameter of
this `sum variable' is the parameter when you constrain the effects of
x1 and x2 to be equal. 

Using the same logic you can also impose other linear constraints. 

-- Maarten



-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      __________________________________________________________
Sent from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index