Statalist The Stata Listserver


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

st: RE: RE: combinaison of parameters estimated


From   "Maarten Buis" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: combinaison of parameters estimated
Date   Fri, 7 Jul 2006 16:48:05 +0200

Val�rie:
Also, the post option of -nlcom- might be interesting to 
you, since you indicated that you want to create 
nonlinear combinations of nonlinear combinations. When 
specifying the option post, the results of -nlcom- will 
be stored as the results of an estimation command which 
means you can use -nlcom- again to calculate the 
nonlinear combination of the nonlinear combinations. 
see the example below:

HTH,
Maarten

*--------------begin example-------------
sysuse auto, clear
logit foreign price mpg
matrix list e(V)

nlcom (orprice: exp(_b[price])) /*
  */  (ormpg: exp(_b[mpg])), post

matrix list e(V)

nlcom _b[orprice]/_b[ormpg]
*--------------end example--------------

-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology 
Vrije Universiteit Amsterdam 
Boelelaan 1081 
1081 HV Amsterdam 
The Netherlands

visiting adress:
Buitenveldertselaan 3 (Metropolitan), room Z214 

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------

-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of Maarten Buis
Sent: vrijdag 7 juli 2006 16:20
To: [email protected]
Subject: st: RE: combinaison of parameters estimated

Val�rie:
Stata will also give you a variance covariance
matrix if you calculate the combinations of
parameters in one -nlcom- command, like the
example below. It will store it in r(V).

HTH,
Maarten

*-------begin example----------
sysuse auto, clear
logit foreign price mpg
nlcom (orprice: exp(_b[price])) /*
  */  (ormpg: exp(_b[mpg]))
matrix list r(V)
*---------end example------


-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting adress:
Buitenveldertselaan 3 (Metropolitan), room Z214

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------

-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of Val�rie Orozco
Sent: vrijdag 7 juli 2006 16:05
To: [email protected]
Subject: st: combinaison of parameters estimated

I have estimated parameters through a model. I want to create
combinaisons of some parameters (linear or not) in order to obtain some
elasticities (not obvious elasticities). I also want to have the p-value
to know the significance of the elasticities estimated.
I know that that in e(b) and e(V) the estimation is saved. I have seen
nlcom.ado created to do exactly what I want except that I estimate now
elasticity by elasticity and so I have the estimation and variance for
each but I don't have the variance covariance matrix. (which is usefull
if I want to create another elasticity based on an elasticity obtained
with nlcom).
Example :
I have this estimation :
------------------------------------------------------------------------------
             |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+----------------------------------------------------------------
alpha        |
          a1 |  -.1916139   .0964226    -1.99   0.047    -.3805986 
-.0026291
          a2 |  -.1859699   .0964303    -1.93   0.054    -.3749699  
.0030301
          a3 |   1.377584   .1928349     7.14   0.000     .9996344  
1.755533
-------------+----------------------------------------------------------------
beta         |
          b1 |   .1257394   .0475493     2.64   0.008     .0325445  
.2189343
          b2 |  -.0759531   .0503809    -1.51   0.132    -.1746978  
.0227916
          b3 |  -.0497863   .0201829    -2.47   0.014     -.089344 
-.0102286
-------------+----------------------------------------------------------------
gamma        |
         g11 |   .1880518   .0170921    11.00   0.000     .1545519  
.2215517
         g21 |  -.1859665   .0107357   -17.32   0.000     -.207008 
-.1649249
         g31 |  -.0020853   .0149813    -0.14   0.889    -.0314481  
.0272775
         g22 |   .2128607   .0113872    18.69   0.000     .1905422  
.2351792
         g32 |  -.0268942   .0039412    -6.82   0.000    -.0346189 
-.0191696
         g33 |   .0289795   .0162113     1.79   0.074     -.002794  
.0607531
-------------+----------------------------------------------------------------
saison       |
      period |   .0000808    .000052     1.55   0.120    -.0000211  
.0001826
      lnyear |   366.0636   188.8452     1.94   0.053    -4.066232  
736.1935
------------------------------------------------------------------------------


First, I want to create eh12 = g21 /a2 - :b2 * a1/a2  + a1* b2/a2) + 1
, with a1 and a2 scalars

I use the nlcom ado :
 nlcom (eh12 : _b[gamma:g21] /a2 - _b[beta:b2]  * (a1/a2)  + a1*
((_b[beta:b2]/a2) + 1 )) that gives :

        eh12:  _b[gamma:g21] /a2 - _b[beta:b2]  * (a1/a2)  + a1*
((_b[beta:b2]/a2) + 1 )

------------------------------------------------------------------------------
             |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+----------------------------------------------------------------
        eh12 |   .0454499   .0279505     1.63   0.104     -.009332  
.1002318
------------------------------------------------------------------------------

And I compute also eh22 and many others and then I want to estimate e99
= eh22 +1 - eh12/a1
Have I to program  all the  standard errors with my little hand or is
there a way to do faster ?

Thank you very much.

val�rie


--

***********************
Val�rie Orozco
INRA ESR Toulouse
ESR INRA - BP52627 - 31326 Castanet Tolosan Cedex
[email protected]
05-61-28-50-97
***********************




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

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