Dear Ben:
Once again, I sincerely appreciate your help. I followed your suggestions and it works perfectly. (I saved your program as an ado file).
I can simply mention one little detail (but so minor): on the constant line, in the vif column, a figure is disclosed. It is not a VIF but the repetition of the amount of the b coefficient.
Best regards
Herv�
***********************************************************
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
[email protected]
http://campus.hec.fr/profs/stolowy/perso/home.htm
>>> [email protected] 04/11/05 10:56 PM >>>
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: [email protected]
> [mailto:[email protected]] On Behalf Of
> Herve STOLOWY
> Sent: Sunday, April 10, 2005 7:08 PM
> To: [email protected]
> 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
> [email protected]
> 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/
*
* 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/