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

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

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

--- Samira Bakhshi <> 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

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

Sent from Yahoo! Mail.
A Smarter Email
*   For searches and help try:

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