Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Generalized VIF (GVIF)

2,286 views
Skip to first unread message

Bruce Weaver

unread,
Jan 20, 2009, 5:34:22 PM1/20/09
to
Earlier today, someone told me about the "generalized variance
inflation factor" (GVIF), which is described in the following
publications:

Fox, J. and Monette, G. (1992) Generalized collinearity diagnostics.
JASA, 87, 178–183.

Fox, J. (1997) Applied Regression, Linear Models, and Related Methods.
Sage.

I find no mention of it when I search the archives of this group.
There is a package to compute it in R (http://hosho.ees.hokudai.ac.jp/
~kubo/Rdoc/library/car/html/vif.html). I'm just wondering if anyone
has written any code to compute it in SPSS.

Thanks,
Bruce

--
Bruce Weaver
bwe...@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/
"When all else fails, RTFM."

JKPeck

unread,
Jan 20, 2009, 8:09:27 PM1/20/09
to
On Jan 20, 3:34 pm, Bruce Weaver <bwea...@lakeheadu.ca> wrote:
> Earlier today, someone told me about the "generalized variance
> inflation factor" (GVIF), which is described in the following
> publications:
>
> Fox, J. and Monette, G. (1992) Generalized collinearity diagnostics.
> JASA, 87, 178–183.
>
> Fox, J. (1997) Applied Regression, Linear Models, and Related Methods.
> Sage.
>
> I find no mention of it when I search the archives of this group.
> There is a package to compute it in R (http://hosho.ees.hokudai.ac.jp/
> ~kubo/Rdoc/library/car/html/vif.html).  I'm just wondering if anyone
> has written any code to compute it in SPSS.
>
> Thanks,
> Bruce
>
> --
> Bruce Weaver
> bwea...@lakeheadu.cahttp://sites.google.com/a/lakeheadu.ca/bweaver/

> "When all else fails, RTFM."

My Japanese isn't nearly good enough to decipher that package, but
there is GVIF code in the R car package
using the vif function. That hasn't been nicely wrapped up in SPSS
AFAIK, but here's a usage example that
should get you started. It assumes that you have already installed
the R car package.

This code gets the active SPSS data, converts variables to R factors
as necessary, runs a linear model,
and then calculates and prints the GVIF information.

HTH,
Jon

get file="c:/spss17/samples/english/cars.sav".
begin program r.
library(car) # no relation to dataset!
dta = spssdata.GetDataFromSPSS()
dta$origin=factor(dta$origin)
dtalm = lm(mpg~origin+weight, data=dta)
print(summary(dtalm))
print("GVIF...")
print(vif(dtalm))
end program.

Bruce Weaver

unread,
Jan 20, 2009, 8:52:42 PM1/20/09
to
JKPeck wrote:
> On Jan 20, 3:34 pm, Bruce Weaver <bwea...@lakeheadu.ca> wrote:
>> Earlier today, someone told me about the "generalized variance
>> inflation factor" (GVIF), which is described in the following
>> publications:
>>
>> Fox, J. and Monette, G. (1992) Generalized collinearity diagnostics.
>> JASA, 87, 178–183.
>>
>> Fox, J. (1997) Applied Regression, Linear Models, and Related Methods.
>> Sage.
>>
>> I find no mention of it when I search the archives of this group.
>> There is a package to compute it in R (http://hosho.ees.hokudai.ac.jp/
>> ~kubo/Rdoc/library/car/html/vif.html). I'm just wondering if anyone
>> has written any code to compute it in SPSS.
>>
>> Thanks,
>> Bruce
>>
>> --
>> Bruce Weaver
>> bwea...@lakeheadu.cahttp://sites.google.com/a/lakeheadu.ca/bweaver/
>> "When all else fails, RTFM."
>
> My Japanese isn't nearly good enough to decipher that package, but

I see there was some line-wrap, so you probably didn't get the
page I intended. Let's try that again:

http://hosho.ees.hokudai.ac.jp/~kubo/Rdoc/library/car/html/vif.html


> there is GVIF code in the R car package
> using the vif function. That hasn't been nicely wrapped up in SPSS
> AFAIK, but here's a usage example that
> should get you started. It assumes that you have already installed
> the R car package.
>
> This code gets the active SPSS data, converts variables to R factors
> as necessary, runs a linear model,
> and then calculates and prints the GVIF information.
>
> HTH,
> Jon
>
> get file="c:/spss17/samples/english/cars.sav".
> begin program r.
> library(car) # no relation to dataset!
> dta = spssdata.GetDataFromSPSS()
> dta$origin=factor(dta$origin)
> dtalm = lm(mpg~origin+weight, data=dta)
> print(summary(dtalm))
> print("GVIF...")
> print(vif(dtalm))
> end program.

I'd forgotten about calling R from SPSS. What I'll have to think
about is whether it's easier to do that, or just work in R
directly when I want to do something like this.

Thanks Jon.

--
Bruce Weaver
bwe...@lakeheadu.ca

JKPeck

unread,
Jan 20, 2009, 9:09:13 PM1/20/09
to

I should also have pointed out, if you are interested in regression
diagnostics, the R-based
diagnostic plots dialog downloadable from Developer Central (pick the
R filter in Downloads).
It has a wealth of diagnostic plots and transformation statistics for
linear models.
This dialog was crreated by Prof Hans A Grüner of the Free University
of Berlin.

Regards,
Jon

JKPeck

unread,
Jan 20, 2009, 11:12:46 PM1/20/09
to

Ok. That's the same car module I used in the example program above.

The nice thing about the SPSS/R integration is that you can benefit
from the strengths of both, and you get all the output in one place.
There are now 10+ R packages integrated into SPSS, complete with
dialog box interfaces and SPSS-style syntax.

-Jon

0 new messages