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

st: RE: Re: Imposing Parameter Restriction

From   "FEIVESON, ALAN H. (AL) (JSC-SK) (NASA)" <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: Re: Imposing Parameter Restriction
Date   Fri, 6 Aug 2004 07:58:34 -0500

Hyeok Jeong  - You could simply reparameterize to allow infinite range in
both directions. To restrict a in (0,1) , use a logit transformation; in
other words let a = exp(A)/(1 + exp(A)) where A = logit(a) is unrestricted.
To restrict b < 1, use b = 1 - exp(B) where B is unrestricted. If your model
is realistic for the data you have, you shouldn't run into the sort of
boundary problems that Joseph was warning against.

Al Feiveson

-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Joseph Coveney
Sent: Thursday, August 05, 2004 8:35 PM
To: Statalist
Subject: st: Re: Imposing Parameter Restriction

Hyeok Jeong wrote:

I am trying to estimate a nonlinear model using "nl" and this is my first
time of doing it. Let's say the model is written as "y= f(l;a,b)," where a
and b are the parameters to be estimated. The model restricts the parameter
space such that "0 < a < 1" and "b <1".
Without imposing any restrictions, it turns out that estimates from "nl"
method violate these restrictions.

I am just guessing there should be some obvious ways of imposing
restrictions on parameter space, which I cannot find.
Could anyone help me on how I can put these restrictions on parameter space,
using "nl" (nonlinear least square) or using any nonlinear estimation method
in stata in general?


To my knowledge there is no simple way to impose parameter space boundaries
-nl- in Stata.  I ran into the same problem some years ago with using -nl-
pharmacokinetic parameter estimation, which have a positive parameter space.

One approach is to reparameterize the coefficient as ln(coefficient), which 
assures that the estimate will lie above zero.  But there is no easy
statement in -nl- to my knowledge.

If it's any consolation, in my experience years ago with specialized 
pharmacokinetics packages and with SAS's PROC NONLIN, which do allow simple 
boundary statements, the badly behaving estimates often slam up against the 
boundary in the first iteration or two and then sit there at the boundary 
throughout the remaining iterations until "convergence," unless a fortuitous

local saddlepoint was found in the sum squares.

You might wish to consider writing an -ml- implementation of your nonlinear 
regression.  It's actually not that difficult, and it provides a good 
alternative to least squares.  To see how, refer to the FAQ on StataCorp's
site, "How do I estimate a nonlinear model using ml?" .  -ml- will allow the 
-constraint- option, and it might be possible to define a set of constraints

that will hold the coefficients in the parameter space.

Joseph Coveney

*   For searches and help try:
*   For searches and help try:

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