turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- SAS Procedures
- /
- Proc Glimmix: Type III test and LSMeans do not agr...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-16-2014 01:21 PM

I ran Proc Glimmix for a categorical fixed effect (4 levels of BMI categories). My type III test for BMI is significant. I also added LSMeans statement and computed CIs for odds ratios for comparing levels of BMI. One of the CI's do not include 1 indicating statistical significance.

I was wondering what may be causing this discrepancy!

Any ideas?

My sas code:

proc glimmix data=combo_final noclprint;

class bmi_catn (ref="2") site_id_fan admit_id;

model defib_out (event="1") = bmi_catn energy bmi_catn*energy/es oddsratio cl dist=binary link=logit chisq;

random _residual_/subject=site_id_fan type=cs ;

lsmeans bmi_catn/e oddsratio cl diff=control("2");

where bmi_catn ne . and prec_a ne .;

run;

my SAS output is attached in a pdf file.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-16-2014 02:58 PM

First, let me make a suggestion or two that would help the people who are trying to help you (in other words, making my life easier). If your question is about type III test for variable bmi_catn, then please refer to the variable in question as "bmi_catn" and not "BMI". Next, if your question is about type III test versus LSMeans and odds ratios, then limit the output to type III tests and LSMeans and odds ratios so we don't have to scroll through page after page of output unrelated to your question. Thanks!

Your type III test compares the different levels of bmi_catn to each other and decides that globally, there is a statistically significant difference with alpha = 0.05. Your least squares means and odds ratios are only comparing level 2 to the other levels, and not all levels to each other. Even if that were not the case, there can be a comparison where the odds ratio is not significant, but yet the Type III test is still significant, there is nothing contradictory about this.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-16-2014 04:03 PM

Thank you for your reply and suggestions.

I understand that the type III test is comparing "globaly" the levels of BMI_catn with each other and a significant result there means that there is at least one pair of levels of bmi_catn are not equal. I also understand that when I'm comparing the odds for levels of bmi_catn to level 2, that's not all the comparisons and one or more of these (in this case 3) comparisons can be non-significant. But I have done pairwise comparisons for all 6 different levels and in this case none were significant. And that's a contradiction.

I believe the difference is being caused by how SAS is parameterizing the model for type III test and for LS Means. I think in the case of type III global test, SAS is comparing the levels of bmi_catn at energy = 0. But for LS Means, sas is evaluating the levels of bmi_catn at the mean of energy.

by centering the variable energy, I got the two tests to agree: that is there are at least two levels of bmi_catn that have different odds for the outcome variable.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-16-2014 11:56 PM

There is a good book by Westfall et. al. about multiple tests and comparisons that talks about this issue about global tests and post hoc comparisons Multiple Comparisons and Multiple Tests Using the SAS System: Peter Westfall, Yosef Hochberg, Dror R...

This apparent contradiction is often noted for higher order interaction tests. How you interpret this depends on your specific research question. If your primary hypothesis is to test for differences across levels of BMI categories then you may use the lsmeans results.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-17-2014 02:51 PM

Your apparent paradox is NOT related to the parameterization (the "other" factor is at its expected value, not 0, but this is not the point anyway). The global test is not just concerned with pairwise contrasts, but all possible contrasts. With 4 levels to a factor, there are all kinds of factors, such as 1 vs. the mean of 2, 3,4; 1&2 vs 3&4, etc., etc. You will not necessarily find the reason for the global significance by looking a sample of the possible contrasts.

Also note, all test results can be wrong. You can get false positive or a false negative on any test.