Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Access to results after using -adjust-


From   "Svend Juul" <[email protected]>
To   <[email protected]>
Subject   Re: st: Access to results after using -adjust-
Date   Sun, 30 Oct 2005 10:04:45 +0100

>From   Allan Garland <[email protected]>
To   [email protected]
Subject   st: Access to results after using -adjust-
Date   Sun, 30 Oct 2005 00:06:21 -0400
--------------------------------------------------------------------------------

Allan wrote:
I'm using -adjust- after -regress- and I want to write a little do-file
to use the resulting output (the xb and stdp values, in particular) in
a custom calculation. But after looking in the manuals, I don't see that
-adjust- saves the values of what it calculates into the e-results or
r-results. I know I could go and access the coefficient matrix directly
after -regress- and do the calculation of the adjusted values myself,
but I'm hoping to let -adjust- do the heavy lifting and then just take
it's results and go on my merry way.
--------------------------------------------

-lincom- may do what you want:

. regress price weight foreign

       Source |       SS       df       MS              Number of obs =      74
-------------+------------------------------           F(  2,    71) =   35.35
        Model |   316859273     2   158429637           Prob > F      =  0.0000
     Residual |   318206123    71  4481776.38           R-squared     =  0.4989
-------------+------------------------------           Adj R-squared =  0.4848
        Total |   635065396    73  8699525.97           Root MSE      =    2117
------------------------------------------------------------------------------
        price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       weight |   3.320737   .3958784     8.39   0.000     2.531378    4.110096
      foreign |   3637.001    668.583     5.44   0.000     2303.885    4970.118
        _cons |  -4942.844   1345.591    -3.67   0.000    -7625.876   -2259.812
------------------------------------------------------------------------------

. lincom 3000*weight + foreign + _cons

  ( 1)  3000 weight + foreign + _cons = 0
------------------------------------------------------------------------------
        price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          (1) |   8656.368   526.3638    16.45   0.000     7606.828    9705.907
------------------------------------------------------------------------------

. return list
scalars:
                 r(df) =  71
                 r(se) =  526.3638103418361
           r(estimate) =  8656.367654537487

Hope this helps,

Svend
________________________________________________________

Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6
DK-8000 Aarhus C,  Denmark
Phone, work:  +45 8942 6090
Phone, home:  +45 8693 7796
Fax:          +45 8613 1580
E-mail:       [email protected]
_________________________________________________________

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