BookmarkSubscribeRSS Feed
coolmac
Calcite | Level 5

Trying to find the relationship between AGE (continuous) and GENDER (categorical) variables in my dataset using SAS (v9.4). I used the below code.

 

proc glm data = myfile;
class GENDER;
 model AGE = GENDER / solution;
run;

 

How to verify if the LINE assumptions of a linear regression model are met or violated in the above case (using SAS)?

L - Linear

I - Independent

N - Normality

E -Equal Variance

 

Please provide the SAS code to be able to do that.

1 REPLY 1
Reeza
Super User
With this case, your question simplifies to the assumptions of an ANOVA/T-test so you're mostly ok as long as your variances are similar.

You can use PROC NPAR1WAY to assess distributions.

To test for equal variances see this example:
https://documentation.sas.com/?docsetId=statug&docsetVersion=15.1&docsetTarget=statug_glm_examples10...

Note the PLOT=Diagnostics which will provide some diagnostic plots.

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

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

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