[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: constrained estimation of panel data
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 <firstname.lastname@example.org> 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
. 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.
* For searches and help try: