Can I use proc glm or linear regression comparison between to groups?
Typically this would only be done via PROC GLM and not REG. That is, if I understand the problem properly, where "to [sic] groups" indicates a classification variable is used as the independent (or predictor, or X) variable, such as groups like "male" and "female".
If your comparison between two groups involves a single variable, use proc glm. Regression is for looking at the relationship between different variables.
Examples:
Comparing the weights of men and women : proc glm
Looking at the relationship between weight and height : regression (proc reg)
In SAS, there are also many other procedures for addressing both these tasks.
Then I am looking for proc reg,
Thanks.
Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.
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.
Ready to level-up your skills? Choose your own adventure.