BookmarkSubscribeRSS Feed
htn1
Calcite | Level 5

Dear experts,

I have a data set with a series of Y variables (Y1 Y2 Y3 …) and a series of X variables (x1, x2, x3....) and I want to run many linear regression for each Y and each X, displaying all the parameter estimates and p-values and a spreadsheet. Can any one help me with this? Will be greatly appreciated.

Thanks

Harrison

1 REPLY 1
PaigeMiller
Diamond | Level 26

https://blogs.sas.com/content/iml/2017/02/13/run-1000-regressions.html

 

That document shows how to handle multiple X-variables, it is easily modified to also handle multiple Y variables.

 

As always, I point out that just because you CAN do this, it doesn't mean you SHOULD do this, and there are better statistical methods to handle multiple X and multiple Y than just brute force running all possible combinations. One such method is Partial Least Squares regression (PROC PLS).

--
Paige Miller

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

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 523 views
  • 0 likes
  • 2 in conversation