Paul Metcalf <Paul.Metcalfe@nera.com> 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 <smerryman@kc.rr.com> 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
vwiggins@stata.com
*
* 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/