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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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