Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: nl command with restriction


From   "E. Paul Wileyto" <[email protected]>
To   [email protected]
Subject   Re: st: nl command with restriction
Date   Mon, 11 Feb 2008 07:36:19 -0500

It might be easiest to incorporate a transform into the equation you are estimating. -nl- will expect coefficients that range from minus to plus infinity. You could get everything you want by transforming as a multinomial logistic probability.

suppose you want to estimate A, B, and C which add to 1. -nl- variable b0.. ranges - to + inf.
replace the parameters in your equation with :

A=exp(b0)/(1+exp(b0)+exp(b1))
B=exp(b1)/(1+exp(b0)+exp(b1)
C=1/(1+exp(b0)+exp(b1))

Paul


Rodolfo Coelho Prates wrote:

Dear all!

I estimated a Cobb-Douglas function with additive error (nl command), the
coeficients are negative and the sum are larger than one, in some cases. I need that the coeficients are larger than zero and the sum of the
coeficients are equal to one. How can I estimate the function with
restriction in Stata?

Thanks,

Rodolfo

*
* 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/

--
E. Paul Wileyto, Ph.D.
Assistant Professor of Biostatistics
Tobacco Use Research Center
School of Medicine, U. of Pennsylvania
3535 Market Street, Suite 4100
Philadelphia, PA 19104-3309

215-746-7147
Fax: 215-746-7140
[email protected]
http://mail.med.upenn.edu/~epw/
*
* 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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index