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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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