Statalist


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

st: RE: re: how to save VIF measure in a file


From   "Nuno" <liststata@gmail.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: re: how to save VIF measure in a file
Date   Sun, 20 Apr 2008 10:43:56 +0100

Thank you Kit! 

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Kit Baum
Sent: 19 April 2008 23:12
To: statalist@hsphsun2.harvard.edu
Subject: st: re: how to save VIF measure in a file


This should work for you:

> webuse grunfeld,clear
> mat vif = J(10,3,.)
> forv i=1/10 {
> 	qui reg invest mvalue kstock time if company == `i'
> 	vif	
> 	forv j=1/3 {
> 		mat vif[`i', `j'] = r(vif_`j')
> 	}
> }
> mat list vif
> // mat2txt from ssc
> mat2txt, mat(vif) saving(myvifs) format(%9.3f) replace type myvifs.txt



Kit Baum, Boston College Economics and DIW Berlin
http://ideas.repec.org/e/pba1.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/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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index