Search code examples
stata

stata: inequality constraint in xttobit


Is it possible to constrain parameters in Stata's xttobit to be non-negative? I read a paper where the authors said they did just that, and I am trying to work out how.

I know that you can constrain parameters to be strictly positive by exponentially transforming the variables (e.g. gen x1_e = exp(x1)) and then calling nlcom after estimation (e.g. nlcom exp(_b[x1:_y]) where y is the independent variable. (That may not be exactly right, but I am pretty sure the general idea is correct. Here is a similar question from Statlist re: nlsur).

But what would a non-negative constraint look like? I know that one way to proceed is by transforming the variables, for example squaring them. However, I tried this with the author's data and still found negative estimates from xttobit. Sorry if this is a trivial question, but it has me a little confused.

(Note: this was first posted on CV by mistake. Mea culpa.)

Update: It seems I misunderstand what transformation means. Suppose we want to estimate the following random effects model:

y_{it} = a + b*x_{it} + v_i + e_{it}

where v_i is the individual random effect for i and e_{it} is the idiosyncratic error.

From the first answer, would, say, an exponential transformation to constrain all coefficients to be positive look like:

y_{it} = exp(a) + exp(b)*x_{it} + v_i + e_{it}

?


Solution

  • I think your understanding of constraining parameters by transforming the associated variable is incorrect. You don't transform the variable, but rather you fit your model having reexpressed your model in terms of transformed parameters. For more details, see the FAQ at http://www.stata.com/support/faqs/statistics/regression-with-interval-constraints/, and be prepared to work harder on your problem than you might have expected to, since you will need to replace the use of xttobit with mlexp for the transformed parameterization of the tobit log-likelihood function.

    With regard to the difference between non-negative and strictly positive constraints, for continuous parameters all such constraints are effectively non-negative, because (for reasonable parameterization) a strictly positive constraint can be made arbitrarily close to zero.