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: Using Post-Estimation Results for further Calculations
From
Christopher Baum <[email protected]>
To
<[email protected]>
Subject
re: st: Using Post-Estimation Results for further Calculations
Date
Thu, 11 Nov 2010 08:33:01 -0500
<>
I wonder, whether I can use results of post-estimation calculations
without copy and paste for further things. Especially, when I run a
normal regression with the reg command and check for multicollinearity,
I use the vif command. However, is it possible to store the result of
vif, so that I can use it, when I need to?
After running a regression, do -estat vif- and -return list-:
. qui reg price mpg weight turn length
. estat vif
Variable | VIF 1/VIF
-------------+----------------------
weight | 10.86 0.092065
length | 10.83 0.092344
turn | 4.21 0.237598
mpg | 2.96 0.338118
-------------+----------------------
Mean VIF | 7.21
. ret li
scalars:
r(vif_4) = 2.957543134689331
r(vif_3) = 4.208797454833984
r(vif_2) = 10.82910823822021
r(vif_1) = 10.86192989349365
macros:
r(name_4) : "mpg"
r(name_3) : "turn"
r(name_2) : "length"
r(name_1) : "weight"
Everything (except the mean vif) is accessible, and you can calc that:
. scalar mean=0.25*(r(vif_1)+r(vif_2)+r(vif_3)+r(vif_4))
. di mean
7.2143447
Kit
Kit Baum | Boston College Economics & DIW Berlin | http://ideas.repec.org/e/pba1.html
An Introduction to Stata Programming | http://www.stata-press.com/books/isp.html
An Introduction to Modern Econometrics Using Stata | http://www.stata-press.com/books/imeus.html
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/