Statalist


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

Re: st: nl command with restriction


From   "Rodolfo Coelho Prates" <[email protected]>
To   [email protected]
Subject   Re: st: nl command with restriction
Date   Tue, 12 Feb 2008 10:08:07 -0200 (BRST)

Thanks Paul and Nick!

I tried implement yours sugestions, but I think my comprehention is not
correct.

I estimeted the Cobb-Doulas with three variables, like this:

program define nlces12
         version 8.0
         if "`1'" == "?" {
             global S_1 "a b c"
	     global a=.15
             global b=.4
             global c=.3
             global S_2 "Cobb-Douglas with additive error"
                exit
            }


	   	replace `1' = $a*((k^$b)*(l^$c)*(n^(1-$b-$c)))


       end

This routine works well, but has that problem.

If I understood, the suggestion is:



		replace `1' =
$a*((k^(exp($b)/(1+exp($b)+exp($c))))*(l^(exp($c)/(1+exp($b)+exp($c))))*(n^(1/(1+exp($b)+exp($c)))))





Thise are the estimations with brute force:

  Source |       SS       df       MS            Number of obs =       123
-------------+------------------------------         F(  2,   121) =   
102.83
       Model |  8.2419e+09     2  4.1209e+09         Prob > F      =   
0.0000
    Residual |  4.8489e+09   121  40073949.1         R-squared     =   
0.6296
-------------+------------------------------         Adj R-squared =   
0.6235
       Total |  1.3091e+10   123   106429266         Root MSE      = 
6330.399
                                                     Res. dev.     =  
2500.31
Cobb Douglas with aditive error
---------------------------------------------------------------------------
           y |   Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+-------------------------------------------------------------
           a | 2.594492  .3699407     7.01   0.000     1.862096    3.326887
           b | 17.12698  .3519304    48.67   0.000     16.43025    17.82372
           c | 16.97066      .        .       .            .           .
------------------------------------------------------------------------------

Works well, but the sum of coeficients are larger than one, but not
negatives. Do I need realize a transformation? Or did I made something
wrong?

Best Regards,

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/



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