Statalist


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

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


From   Kit Baum <baum@bc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: re: how to save VIF measure in a file
Date   Sat, 19 Apr 2008 18:12:12 -0400

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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index