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

st: RE: Estout and VIF


From   "Jann, Ben" <ben.jann@soz.gess.ethz.ch>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Estout and VIF
Date   Mon, 11 Apr 2005 22:56:03 +0200

The following program may be used with -estadd- to add VIF to the estimates:

program define _estadd_vif, eclass
  syntax [ , prefix(name) * ]
  tempname results
  matrix `results' = e(b)
  qui vif
  local i 0
  local name "`r(name_`++i')'"
  while "`name'"!="" {
    local j = colnumb(`results',"`name'")
    if `j'<. {
      matrix `results'[1,`j'] = r(vif_`i') 
    }
    local name "`r(name_`++i')'"
  }
  ereturn matrix `prefix'vif = `results'
end

Either "do" the program code above or save it as "_estadd_vif.ado" somewhere in the adopath. The vif function will then be available to -estadd-: 

 estadd [...] ,  stats(vif)

(note that this will probably only work with estimates produced by -regress-)

ben



> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu 
> [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of 
> Herve STOLOWY
> Sent: Sunday, April 10, 2005 7:08 PM
> To: statalist@hsphsun2.harvard.edu
> Subject: st: Estout and VIF
> 
> 
> Dear All:
> 
> I run a basic linear regression and immediately after execute 
> the command -vif- (downloadable from ssc). (This latter 
> command gives the same results as if I use -collin varlist if 
> e(sample)-).
> 
> I use -estout- (downloadable from ssc) to obtain my 
> regression results. I get two columns: b and p-value. I would 
> like to know if I can get a third column with the vif. 
> 
> I read the -estout- and -estadd- help files and did not find 
> a mention of the vif. (I also checked that the vif is not 
> included in the ereturns).
> 
> Best regards
> 
> Hervé Stolowy
> 
> ***********************************************************
> Professeur/Professor
> Coordinateur du Département/Head of Department
> HEC Paris
> Département Comptabilité Contrôle de gestion / Dept of 
> Accounting and Management Control
> 1, rue de la Liberation
> 78351 - Jouy-en-Josas
> France
> Tel: +33 1 39 67 94 42 - Fax: +33 1 39 67 70 86
> stolowy@hec.fr
> http://campus.hec.fr/profs/stolowy/perso/home.htm
> 
> *
> *   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