BookmarkSubscribeRSS Feed
podarum
Quartz | Level 8

Hi,  I'm trying to check for collinearity (using VIF), so to do variable selection using proc reg.  I need to check more than one x-var at a time, but I'm not geting any results.. but if I do one at a time it works.

WORKS:

proc reg data=Data;

model Price = Var1 / vif tol;

run;

quit; endrsubmit;

DOESN'T WORK:

proc reg data=Data;

model Price = Var1 Var2 Var3 / vif tol;

run;

quit;

2 REPLIES 2
FriedEgg
SAS Employee

What exactly is the issue you are having with obtaining results?

signon task1 sascmd='C:\Program Files\SAS\SASFoundation\9.2\sas.exe';

%syslput wpath=%sysfunc(pathname(work));

rsubmit task1;

libname out "&wpath";

proc sql;

create view cars as

select *

   from sashelp.cars

  order by type;

quit;

ods output ParameterEstimates=out.pe(keep=Type Variable VarianceInflation where=(Variable ne 'Intercept'));

proc reg data=cars;

model msrp=EngineSize Cylinders Horsepower MPG_City MPG_Highway /vif tol;

by type;

quit;

run;

endrsubmit;

signoff;

Give this a try and see if you can see the output from vif

podarum
Quartz | Level 8

For some reason when I include a variable it doesn't work, but removing it, totally works... don't understand why.. it's highly correlated with y

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 2014 views
  • 0 likes
  • 2 in conversation