Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: ereturn and sfcross


From   Federico Belotti <[email protected]>
To   [email protected]
Subject   Re: st: ereturn and sfcross
Date   Tue, 9 Jul 2013 14:21:42 +0200

My preferred approach is to use the the Programmer's utility for displaying 
ancillary parameters -_diparm-. For a detailed explanation of its syntax see 
-help _diparm-.
 
In your case, since the likelihood is parametrized with

sigma_u = exp(0.5 * Usigma)
sigma_v = exp(0.5 * Vsigma)

you can easily get what you're looking for (but in the -return- set of macros) using

webuse greene9
sfcross  lnv lnk lnl

initial:       Log likelihood = -37.029968
Iteration 0:   Log likelihood = -37.029968  (not concave)
Iteration 1:   Log likelihood = -18.020203  (not concave)
Iteration 2:   Log likelihood = -7.6054699  
Iteration 3:   Log likelihood =  1.9182958  
Iteration 4:   Log likelihood =  2.8027655  
Iteration 5:   Log likelihood =  2.8604121  
Iteration 6:   Log likelihood =  2.8604897  
Iteration 7:   Log likelihood =  2.8604897  

Stoc. frontier normal/exponential model              Number of obs =        25
                                                     Wald chi2(2)  =    845.68
                                                     Prob > chi2   =    0.0000

Log likelihood =     2.8605
------------------------------------------------------------------------------
         lnv |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
Frontier     |
         lnk |   .2624859   .0919988     2.85   0.004     .0821717    .4428002
         lnl |   .7703795   .1109569     6.94   0.000     .5529079    .9878511
       _cons |   2.069242   .2356159     8.78   0.000     1.607444    2.531041
-------------+----------------------------------------------------------------
Usigma       |
       _cons |  -4.002457   .9274575    -4.32   0.000    -5.820241   -2.184674
-------------+----------------------------------------------------------------
Vsigma       |
       _cons |  -3.527598   .4486176    -7.86   0.000    -4.406873   -2.648324
-------------+----------------------------------------------------------------
     sigma_u |   .1351691   .0626818     2.16   0.031     .0544692    .3354317
     sigma_v |   .1713925   .0384448     4.46   0.000     .1104231    .2660258
      lambda |   .7886525    .087684     8.99   0.000      .616795    .9605101
------------------------------------------------------------------------------

_diparm Usigma, func( exp(0.5*@) ) der( 0.5*exp(0.5*@) ) level(95) label(sigma_u) prob
     sigma_u |   .1351691   .0626818     2.16   0.031     .0544692    .3354317

return li

scalars:
                  r(p) =  .0310498704827077
                  r(z) =  2.156432996353714
                  r(i) =  0
                 r(ub) =  .3354316987258648
                 r(lb) =  .0544691789417937
                r(est) =  .1351691134122325
                 r(se) =  .062681805389172

macros:
               r(prob) : "prob"

_diparm Vsigma, func( exp(0.5*@) ) der( 0.5*exp(0.5*@) ) level(95) label(sigma_v) prob
     sigma_v |   .1713925   .0384448     4.46   0.000     .1104231    .2660258

return li

scalars:
                  r(p) =  8.26741242191e-06
                  r(z) =  4.458139422112636
                  r(i) =  0
                 r(ub) =  .2660258073343608
                 r(lb) =  .110423050288458
                r(est) =  .1713924767932063
                 r(se) =  .0384448444889564

macros:
               r(prob) : "prob"

_diparm Vsigma Usigma, level(95) func( sqrt(exp(@2-@1)))  der( -0.5*exp(0.5*@1) 0.5*exp(0.5*@2) ) label(lambda) prob 
      lambda |   .7886525    .087684     8.99   0.000      .616795    .9605101

return li

scalars:
                  r(p) =  2.37835973667e-19
                  r(z) =  8.99425674924732
                  r(i) =  0
                 r(ub) =  .9605100595097473
                 r(lb) =  .6167950351044211
                 r(se) =  .0876840153993916
                r(est) =  .7886525473070842

macros:
               r(prob) : "prob"

   

HTH,
Federico

On Jul 9, 2013, at 1:25 PM, Paulo Regis wrote:

> Dear all,
> 
> I am using the new command -sfcross and I would like to know if
> someone with some experience with this command could tell me how to
> obtain some of the estimated parameters for further manipulation since
> it seems they are not available.
> 
> Below, you can see an example. I am interested in sigma_u,sigma_v and
> lambda. If you check "ereturn list" after the command, you can see
> their standard errors are not available. How can I obtain them? For
> example, I would like to have them available t  be used with -outreg
> or outreg2.
> 
> Kind Regards
> 
> Paulo
> 
> Example:
> 
> . webuse greene9
> 
> . sfcross  lnv lnk lnl
> 
> 
> initial:       Log likelihood = -37.029968
> Iteration 0:   Log likelihood = -37.029968  (not concave)
> Iteration 1:   Log likelihood = -18.020203  (not concave)
> Iteration 2:   Log likelihood = -7.6054699
> Iteration 3:   Log likelihood =  1.9182958
> Iteration 4:   Log likelihood =  2.8027655
> Iteration 5:   Log likelihood =  2.8604121
> Iteration 6:   Log likelihood =  2.8604897
> Iteration 7:   Log likelihood =  2.8604897
> 
> Stoc. frontier normal/exponential model              Number of obs =        25
> 
>                       Wald chi2(2)  =    845.68
>                                                     Prob > chi2   =    0.0000
> 
> Log likelihood =     2.8605
> ------------------------------------------------------------------------------
>         lnv |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
> -------------+----------------------------------------------------------------
> Frontier     |
>         lnk |   .2624859   .0919988     2.85   0.004     .0821717    .4428002
>         lnl |   .7703795   .1109569     6.94   0.000     .5529079    .9878511
>       _cons |   2.069242   .2356159     8.78   0.000     1.607444    2.531041
> -------------+----------------------------------------------------------------
> Usigma       |
>       _cons |  -4.002457   .9274575    -4.32   0.000    -5.820241   -2.184674
> -------------+----------------------------------------------------------------
> Vsigma       |
>       _cons |  -3.527598   .4486176    -7.86   0.000    -4.406873   -2.648324
> -------------+----------------------------------------------------------------
>     sigma_u |   .1351691   .0626818     2.16   0.031     .0544692    .3354317
>     sigma_v |   .1713925   .0384448     4.46   0.000     .1104231    .2660258
>      lambda |   .7886525    .087684     8.99   0.000      .616795    .9605101
> ------------------------------------------------------------------------------
> 
> . ereturn list
> 
> scalars:
>               e(rank) =  5
>                  e(N) =  25
>                 e(ic) =  7
>                  e(k) =  5
>               e(k_eq) =  3
>               e(k_dv) =  1
>          e(converged) =  1
>                 e(rc) =  0
>          e(k_autoCns) =  0
>                 e(ll) =  2.860489723076469
>         e(iterations) =  8
>               e(chi2) =  845.6810351779072
>                  e(p) =  2.3051356429e-184
>               e(df_m) =  2
>                  e(z) =  -.634477395928109
>                e(p_z) =  .2628846569875348
>            e(sigma_u) =  .1351691134122321
>            e(sigma_v) =  .1713924767932067
>             e(lambda) =  .7886525473070807
> 
> macros:
>            e(cmdline) : "sfcross lnv lnk lnl"
>         e(covariates) : "lnk lnl _cons"
>            e(cilevel) : "95"
>          e(marginsok) : "default xb"
>              e(title) : "Stoc. frontier normal/exponential model"
>           e(crittype) : "Log likelihood"
>               e(dist) : "exponential"
>           e(function) : "production"
>             e(depvar) : "lnv"
>                e(cmd) : "sfcross"
>            e(predict) : "sfcross_p"
>                e(opt) : "moptimize"
>               e(user) : "_cross_exp()"
>          e(ml_method) : "lf2"
>    e(singularHmethod) : "m-marquardt"
>          e(technique) : "nr"
>              e(which) : "max"
>         e(properties) : "b V"
> 
> matrices:
>                  e(b) :  1 x 5
>                  e(V) :  5 x 5
>               e(ilog) :  1 x 20
>           e(gradient) :  1 x 5
> 
> functions:
>             e(sample)
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/

-- 
Federico Belotti, PhD
Research Fellow
Centre for Economics and International Studies
University of Rome Tor Vergata
tel/fax: +39 06 7259 5627
e-mail: [email protected]
web: http://www.econometrics.it


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index