Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Inequality constraint with mata -optimize-

From   Stas Kolenikov <>
Subject   Re: st: Inequality constraint with mata -optimize-
Date   Sun, 29 May 2011 21:44:12 -0500

The log won't quite do the trick, as it does not allow the variance to
be zero. Square will; you can parameterize the variance as a square of
something. However, it would produce (at least) two problems. One is
that when the true value is at zero, the Jacobian is degenerate
(there's a row/column corresponding to that square, say variance =
b*b, of which the derivative is 2*b, and if b is zero, the whole
column is zero), which screws up both convergence and inference.
Another problem is that when your model is specified so badly that the
population "variance" is negative (it does happen in some models,
although I am not familiar with the model Dorothy mentioned). If this
happens, the MLE converges to zero producing the above problem, but
also you may not see the misspecification really occurring as you did
not allow zero values. So it's a two-edged sword; I would just
parameterize the model with variance as is, and see if you need to
worry about negative estimates (for which you still can have
asymptotically appropriate inference with -robust- standard errors).

On Sun, May 29, 2011 at 7:21 PM, Richard Williams
<> wrote:
> At 06:09 PM 5/29/2011, Dorothy Bridges wrote:
>> Thanks, Stas.  I am using ML to estimate a disequilibrium model, in
>> which the likelihood function is set up as in Maddala and Nelson,
>> "Maximum Likelihood Methods for Models of Markets in Disequilibrium,"
>> Econometrica, 1974.  I simply want to constrain two of the parameters
>> -- variances of the error terms in the demand and supply equations --
>> to be greater than or equal to zero.
> Often this is done by estimating the log of the parameter. See, for example,
> Stata's -hetprob- program.
> -------------------------------------------
> Richard Williams, Notre Dame Dept of Sociology
> OFFICE: (574)631-6668, (574)631-6463
> HOME:   (574)289-5227
> EMAIL:  Richard.A.Williams.5@ND.Edu
> WWW:
> *
> *   For searches and help try:
> *
> *
> *

Stas Kolenikov, also found at
Small print: I use this email account for mailing lists only.

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index