Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: constrained estimation of panel data


From   [email protected] (Vince Wiggins, StataCorp)
To   [email protected]
Subject   Re: st: constrained estimation of panel data
Date   Sun, 02 Feb 2003 15:58:22 -0600

Paul Metcalf <[email protected]> asks about applying a linear constraint
when estimating with -xtreg-,

> I am analysing a panel of households with monthly observations over
> 6 years and wish to estimate a demand equation with the constraint
> that one of the coefficients is equal to 0.141. I have been using
> xtreg (stata 7) to estimate an unconstrained version of the model
> but there does not seem to be an option to impose a constraint on
> the estimator.  Is there a way of doing this?

It would be nice if -xtreg- accepted constraints, but currently it doesn't.

Scott Merryman's <[email protected]> suggests using -linest- and that sounds
reasonable to me.  Because -xtreg- estimates a linear model, Paul could also
apply his constraint by transforming the dependent variable.  Assume that
Paul's 0.141 is the constrained coefficient for variable xyz and his dependent
variable is y.  He can build his constraint into a transformed dependent
variable,

      . gen double yc = y - 0.141 * xyz

then estimate his model with yc as the dependent variable and excluding
variable xyz from the variable list.

All of the remaining coefficient and standard error estimates will be the same
as those from a constrained estimation, but, because the dependent variable
has been transformed, the ancillary statistics, such as the R-squares, will
not.  This transformation will work for both random- and fixed- effects
regressions, because both are linear in the parameters.


-- Vince 
   [email protected]

*
*   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