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

Re: st: constrained parameter in maximum likelihood estimation

From   Hung-Jen Wang <>
To   Jun Xu <>
Subject   Re: st: constrained parameter in maximum likelihood estimation
Date   Thu, 25 Sep 2003 01:22:39 +0800

Thursday, September 25, 2003, 12:44:03 AM, Jun Xu wrote:

> Stata Listers:

> I have a programming question using ml command: how to contrain some 
> parameter to be estimated within certain range, for example, some 
> probabilities [0,1]. One way that I can think of is to do some logit 
> transformation like exp(p)/exp(1+exp(p)) and let ml freely estimates p.

Or similarly, 1/(1+exp(p)).

One way to get estimates of the untransformed parameters and their
standard errors is to write two ml models. The first one is to be
written with transformed parameters, such as the b = 1/(1+exp(p)) as
described above, and the other one written with un-transformed
parameters. You estimate the first model with the unconstrained p, and
then after getting the result, feed the estimates as initial values
into the 2nd model, with the initial of b (per the above example)
being 1/(1+exp(p^hat)).

Since you already have the model with transformed parameters, writing
another one should take no time.

Hope this helps.


*   For searches and help try:

© Copyright 1996–2022 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index