BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Erik3
Calcite | Level 5

Good day

 

In my data set I have three grouping variables in total, age_group no_jabs and illness, and a dependent variable severity. 

I want to determine whether a grouping variable, jabs, has an effect on my continuous variable, severity. 

 

I first checked normality of severity with a histogram plot with kernel and normal overlay. CONCLUDED normality.

Thereafter I want to test homogeneity of my variances using Levene's test, code I used: 

 

proc GLM data = health; *Variance/Levene's test;
  CLASS age_group no_jabs comorb;
  MODEL severity = age_group|no_jabs|comorb;
  output out=ResData r=ResVar p=PredVar;
run;quit; 

 

and I looked at the Pr > F column in the model row of the output, which is: <.0001:  Does this mean I have homogeneity in my variances?

 

If so, how do I finally test the effect of the no_jabs variable on my severity variable?

 

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

I first checked normality of severity with a histogram plot with kernel and normal overlay. CONCLUDED normality.

 Completely unnecessary and not needed for PROC GLM. see https://blogs.sas.com/content/iml/2018/08/27/on-the-assumptions-and-misconceptions-of-linear-regress...

 

and I looked at the Pr > F column in the model row of the output, which is: <.0001:  Does this mean I have homogeneity in my variances?

 

Nothing in your code requests a homogeneity of variance test. So your output does not contain a homogeneity of variance test. To obtain a homogeneity of variance test, you would need to use the MEANS command with the HOVTEST option.

--
Paige Miller

View solution in original post

4 REPLIES 4
PaigeMiller
Diamond | Level 26

I first checked normality of severity with a histogram plot with kernel and normal overlay. CONCLUDED normality.

 Completely unnecessary and not needed for PROC GLM. see https://blogs.sas.com/content/iml/2018/08/27/on-the-assumptions-and-misconceptions-of-linear-regress...

 

and I looked at the Pr > F column in the model row of the output, which is: <.0001:  Does this mean I have homogeneity in my variances?

 

Nothing in your code requests a homogeneity of variance test. So your output does not contain a homogeneity of variance test. To obtain a homogeneity of variance test, you would need to use the MEANS command with the HOVTEST option.

--
Paige Miller
Erik3
Calcite | Level 5
Thank you PaigeMiller, I now use(effect of jabs on severity, use no_jabs as my GrpVar)

ods select hovftest;
proc GLM data = health;
CLASS no_jabs;
MODEL severity = no_jabs / SS3;
means no_jabs / hovtest;
run;quit;



instead of putting in ' age_group|no_jabs|comorb ' in my model statement. I got Levene's test output and assume I'm on a more correct path now.

If I now want to determine whether no_jabs has a significant effect on my severity I used:
proc GLM data = health;
CLASS no_jabs;
MODEL severity = no_jabs / SS3;
lsmeans no_jabs / adjust=tukey pdiff;
run;quit;

Does this seem OK?
PaigeMiller
Diamond | Level 26

First, you used a model with all main effects, all two-way interactions and the three-way interaction. Now you are using a model with just one variable. I'm not sure why you switched, but if you believe that there are interactions, or even other main effects, I would use the larger model to determine what is and is not statistically significant.

--
Paige Miller
Erik3
Calcite | Level 5
Ok, I'll make use of the larger model rather. I only want to see whether the one variable has an effect. But I understand your reasoning.
Thank you!!

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 4 replies
  • 693 views
  • 0 likes
  • 2 in conversation