Hi, I wanted to conduct an ANOVA to compare the mean difference between groups. Firstly, I used the below PROC GLM to check the equal variance assumption, and the result was significant, since the sample size per cell was not that big, I used the Obrien.
proc glm data=one;
class region;
model cost=region;
means region/hovtest=OBRIEN welch ;
run;
And the Welch test showed the result was significant, so, in order to account for the unequal variance, I used the below code to conduct the post-hoc comparison.
proc mixed;
class region;
model cost=region/ddfm=satterth;
repeated / group=region;
lsmeans region / pdiff;
run;
I checked the SAS website, https://support.sas.com/kb/22/526.html, it says that group=region in the repeated statement will allow SAS to estimate the variance separately, and ddfm=satterth will adjust the degree of freedom. However, the least square mean result showed that two groups were significant, but in the difference least square mean result, there is no significant result found. I tried to use different adjust=, but the result was the same.
I saw the note below, probably it is because the Hessian is not positive definite? Is there anything else that I should do to address this issue? Thank you so much!
NOTE: Convergence criteria met but final Hessian is not positive definite.
NOTE: Asymptotic variance matrix of covariance parameter estimates has been found to be singular and
a generalized inverse was used. Covariance parameters with zero variance do not contribute to
degrees of freedom computed by DDFM=SATTERTH.
Sorry, I didn't got the negative definite note that I posted above, the note that I got is as follows:
With DDFM=SATTERTHWAITE or DDFM=KENWADROGER or DDFM=KENWADROGER2, unadjusted p-values in tests
are based on the degrees of freedom specific to that comparison. P-values that are adjusted for
multiplicity, however, are by default based on the denominator degrees of freedom for the Type
3 test of the fixed effect. If you specify the ADJDFE=ROW option in the LSMEANS statement, the
adjusted p-values take into account the row-wise degrees of freedom.
That note is clear, no?
See here for the documentation ( from SAS/STAT User's Guide ) on ADJDFE=SOURCE | ROW :
BR,
Koen
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.