[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Checking collinearity when using SVY Command

Subject   Re: st: Checking collinearity when using SVY Command
Date   Mon, 3 Aug 2009 16:23:48 -0400

Kristen , try this code.  Make sure to zap gremlins possibly added by
the Mail system:

*************************START CODE***********************************
sysuse auto,clear
svyset _n [pweight=rep78]

Define a predictor list for the right-hand-side of the svy: reg

local rhs weight trunk foreign
svy: reg mpg `rhs'

foreach v of varlist `rhs' {
local less : list rhs -v //Remove variable v from the rhs
quietly svy: reg `v' `less'
local vif = 1/(1-`e(r2)')
di "Variable: " "`v'"   "   Adj R-sq = " `e(r2)'  "   VIF = " `vif'
***********************END CODE ***********************************

On Mon, Aug 3, 2009 at 3:00 PM, Shellenberg, Kristen<> wrote:
> Hello all,
> I would like to check for collinearity in my models and in the past I have always used the "vif" command but I am currently using the SVY command to analyze my data and vif apparently doesn't work.  I know that I can ask Stata to calculate the tolerance (and therefore the VIF) after running a regression for each one of my predictors as the response variable but that seems like a lot of extra effort when you have a lot of predictors.
> Can anyone tell me if there is a way to do this in a more succinct fashion under SVY (i.e. more like the VIF command under normal regression)?
> Thank you,
> Kristen
Steven Samuels
18 Cantine's Island
Saugerties NY 12477

*   For searches and help try:

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