BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,

I am new to this forum, had hard time figuring out how this could be done in SAS.

The code I am trying to run, regression analysis looks something like this:

Proc reg data = work.temp;
Model &Pred_var = &independent_var / stb tol vif Collin;
By segment;
Run;

I want to run a regression model such that it produces VIF values for each of the by Groups and checks the value of VIF.

Based on the value of VIF I should be able to Print if the regression model has collinearity(VIF > =5) or not(VIF <5).

And if there is collinearity then I should be able to give a rough idea of which variables might be correlated.

Your suggestions would be highly appreciated.

Thank you,

L.
2 REPLIES 2
Paige
Quartz | Level 8
You would have to write some macro code to pick out which by groups have VIF>=5 and then print only those. You can capture the VIF output into a SAS data set using ODS OUTPUT statements.

To get some idea of which variables might be correlated, I would use Principal Components Analysis on the independent variables.
deleted_user
Not applicable
Thank you so much for the reply .. ODS output works well !!

Next step I'll be proceeding with the variables that are correlated ...

again thanks,

L

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
  • 726 views
  • 0 likes
  • 2 in conversation