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;
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
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
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: