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
- /
- Analytics
- /
- Stat Procs
- /
- how to get pdmix800.sas for letter displays of pa...

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

03-20-2013 01:30 PM

Hi!

How can I get this macro in order to generate letter displays of pairwise mean comparisons in proc mixed? Where can I downloaded?

Thanks!!

Caroline

Accepted Solutions

Solution

03-20-2013
03:55 PM

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

03-20-2013 03:55 PM

You don't need the macro anymore. Just use GLIMMIX (normal distribution is the default).

Example:

LSMEANS trt / diff lines;

or

LSMEANS A*B / diff lines;

The LINES option gives the letter display. You probably want to adjust for multiplicity if you have many treatment (factor levels). I like the simulate adjustment:

LSMEANS trt / diff lines adjust=simulate;

There are other adjustment options. If you have a factorial and you want to just do the mean comparisons within slices of the "other" factor, then you will need to use the new SLICE statement.

You can't do this directly with MIXED. But if you have SAS 9.3 or later (maybe 9.22), there is a way to store the results from MIXED and use them in the new PLM procedure for post-model fitting processing (such as means comparisons).

All Replies

Solution

03-20-2013
03:55 PM

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

03-20-2013 03:55 PM

You don't need the macro anymore. Just use GLIMMIX (normal distribution is the default).

Example:

LSMEANS trt / diff lines;

or

LSMEANS A*B / diff lines;

The LINES option gives the letter display. You probably want to adjust for multiplicity if you have many treatment (factor levels). I like the simulate adjustment:

LSMEANS trt / diff lines adjust=simulate;

There are other adjustment options. If you have a factorial and you want to just do the mean comparisons within slices of the "other" factor, then you will need to use the new SLICE statement.

You can't do this directly with MIXED. But if you have SAS 9.3 or later (maybe 9.22), there is a way to store the results from MIXED and use them in the new PLM procedure for post-model fitting processing (such as means comparisons).

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

03-20-2013 05:14 PM

Thank you very much for your help!

When using glimmix I will certainly use this option, but when using proc mixed, which code should I use to store the results and analysing the pairwise comparisons with proc PLM?

Thank you!

Caroline

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

03-20-2013 05:14 PM

Just a follow up to my previous email. If you have two factors, for instance, you can use:

proc glimmix data=sim;

class block A B;

model y = A|B;

random block;

lsmeans A*B / lines;

slice A*B / sliceby=B lines; *--get comparisons of A for each B level;

run;

The LSMEANS A*B statement is doing all possible mean comparisons for the interaction of A and B (which likely includes many comparisons that are not of interest). THe LINES options is giving the letter display. If you have 6 levels of A and 3 of B, the A*B table has 18 means for comparisons. Note that the SLICE statement is testing for the A effect at each level of B. There will be an F test for A at B=1, another F test for A at B=2, and so on. The LINES option on SLICE is giving you the multiple mean comparisons for all the A levels at B=1, then at B=2, and so on.

If you really must use MIXED, then the following will be needed:

proc mixed data=sim;

class block A B;

model y = A|B;

random block;

lsmeans A*B;

store sasuser.MCP1;

run;

proc PLM restore=sasuser.MCP1;

lsmeans A*B / lines;

slice A*B / sliceby=B lines; *--get comparisons of A for each B level;

run;

I used the new item store (STORE ....) in MIXED, and then followed this with the PLM procedure to do the letter (line) display of means and the slices of B. You can't do either directly in MIXED. For your information, the stored sasuser.MCP1 file is now permanently on your computer, which means you could in a future go right to the PLM step and not use MIXED at all (unless the data or model changes).

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

03-20-2013 05:32 PM

Thanks a lot the codes!!

Is it mandatory to store your model in sasuser or you can also store it somewhere else?

Thank you!

Caroline

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

03-20-2013 05:50 PM

I am sure you have many choices for location of the so-called item store. Check the documentation. Here is a nice article on the many uses of PLM.

http://support.sas.com/resources/papers/proceedings10/258-2010.pdf

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

03-20-2013 06:14 PM

Thanks a lot for your help! I will read this document.

Caroline

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

10-17-2016 04:25 AM

Hi there,

I often use SAS Macro PDMIX800 for mean comparison/grouping along with SAS Proc Mixed. I used this 'Proc Glimmix' to do the same. However, I am confused for one thing. When I compared both of results, I found that Glimmix result is similar to Proc Mixed assuming equal variance. However, the addition of "repeated statement' for modeling the variance in the case of the unequal variance in Proc Mixed gives a different result. I tried to add the same repeated statement in Proc Glimmix but could not. So, I am wondering if this result of mean separation from Proc Glimmix in a case of a dataset with unequal variance is acceptable or there is any other way to model the variance to obtain same results from PDMIX800 and Proc Gliimmix.

Bikash

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

11-01-2016 03:23 PM

GLIMMIX implements repeated measurements differently than MIXED, by adding a RESIDUAL option to the RANDOM statement.

Steve Denham

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

12-22-2016 11:59 PM

Hi Steve,

Thank you very much for your response. So, If Glimmix performs the measurement differently than Proc Mix, is that both of the results are valid/true as per their own way of computation?

Bikash

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

12-01-2016 04:14 PM

How would this work for SAS Studio when it's used through a Virtual box installation and using prox mixed?