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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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