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)" <alan.h.feiveson@nasa.gov>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
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: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu]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
in 
-nl- in Stata.  I ran into the same problem some years ago with using -nl-
for 
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
boundary 
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
Web 
site, "How do I estimate a nonlinear model using ml?" 
http://www.stata.com/support/faqs/stat/nl_ml.html .  -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:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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