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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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