BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
UcheOkoro
Lapis Lazuli | Level 10

Please, I need help with a multivariate equivalent of an independent sample t test with unequal variance. 

The outcome is not normally distributed but has a very large sample size (central limit theorem) while the primary predictor is binary and the secondary predictor has 3 levels. The primary predictor has unequal variance. I was considering the factorial ANOVA but I it does not take into account unequal variance. Please, what statistical test can I use to evaluate this? 

 

Thank you in advance.

 

 

 proc glm data = Dataset2;
 class Acuity2 after_intervention;
 model ED_Completed_Length_of_Stay__Min= Acuity2 after_intervention/ss3;
 means after_intervention;
 WHERE Abdominal_pain3=1;
run; 

proc glimmix data =dataset2;
class after_intervention Acuity2;
model ED_Completed_Length_of_Stay__Min=after_intervention Acuity2;
covtest 'common variance' homogeneity;  /* This does a likelihood ratio test for homogeneity */
lsmeans after_intervention;
contrast '0 vs 1' after_intervention -1 1;
 WHERE Abdominal_pain3=1;
run;

 

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

In order to use the covtest homogeneity option efficiently in GLIMMIX, you will need to specify something in a RANDOM statement and use the GROUP=option. Consider this:

 

proc glimmix data =dataset2(WHERE=( Abdominal_pain3=1);
class after_intervention Acuity2;
model ED_Completed_Length_of_Stay__Min=after_intervention Acuity2;
random _residual_/group=after_intervention;
covtest 'common variance' homogeneity;  /* This does a likelihood ratio test for homogeneity */
lsmeans after_intervention;
contrast '0 vs 1' after_intervention -1 1;
 ;
run;

Now you may want to try various distributions for your dependent variable. If the data are truly non-normal, then it probably doesn't matter how large your dataset is. Fitting what you have now treats the residuals as normally distributed, so at least look at the plots of the studentized residuals.  For a lot of time to event/waiting time data like this, a gamma distribution fits better than a normal.

 

SteveDenham

 

View solution in original post

3 REPLIES 3
ballardw
Super User

Which variable are you testing for equal means? That's what a T-test is testing generally.

 

 

UcheOkoro
Lapis Lazuli | Level 10

Thank you for your response. I am testing the after_intervention which is binary for equal means.

 

Thank you.

SteveDenham
Jade | Level 19

In order to use the covtest homogeneity option efficiently in GLIMMIX, you will need to specify something in a RANDOM statement and use the GROUP=option. Consider this:

 

proc glimmix data =dataset2(WHERE=( Abdominal_pain3=1);
class after_intervention Acuity2;
model ED_Completed_Length_of_Stay__Min=after_intervention Acuity2;
random _residual_/group=after_intervention;
covtest 'common variance' homogeneity;  /* This does a likelihood ratio test for homogeneity */
lsmeans after_intervention;
contrast '0 vs 1' after_intervention -1 1;
 ;
run;

Now you may want to try various distributions for your dependent variable. If the data are truly non-normal, then it probably doesn't matter how large your dataset is. Fitting what you have now treats the residuals as normally distributed, so at least look at the plots of the studentized residuals.  For a lot of time to event/waiting time data like this, a gamma distribution fits better than a normal.

 

SteveDenham

 

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
  • 3 replies
  • 569 views
  • 0 likes
  • 3 in conversation