Hi Experts,
a1 a2 a3.....a25 x1 x2 x3
Now I have 28 columns of variables as above. I want to run regressions with a1,a2......a25 to be my dependent variables respectively, and x1, x2,x3 to be my independent variables all the time. Is there any simple way to do that without repeating the regression 25 times? Thanks a lot!!
If you do this in PROC GLM, and use MANOVA commands, you can get an analysis that takes into account the correlations between the Y-variables (in other words, it provides more information than just running all those individual regressions). Example: https://documentation.sas.com/?docsetId=statug&docsetVersion=15.1&docsetTarget=statug_glm_examples06...
Approaches outlined here:
@Reeza wrote:
Approaches outlined here:
I'd have to say I think this approach is unnecessary.
In PROC GLM, you can have all of the 25 dependent variables on the left hand side of the MODEL statement, so one pass through PROC GLM gives you the 25 different regressions. It's not clear to me what is gained by the approach at that link.
If you do this in PROC GLM, and use MANOVA commands, you can get an analysis that takes into account the correlations between the Y-variables (in other words, it provides more information than just running all those individual regressions). Example: https://documentation.sas.com/?docsetId=statug&docsetVersion=15.1&docsetTarget=statug_glm_examples06...
Thanks! I don't need the correlations among all the dependent variables, just want to run the OLS regression for each dependent variable(a1.....a25). So could you give me a code sample to do this?
The link I provided in my first reply contains sample code.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.