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

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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