Turn on suggestions

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

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- how to get pdmix800.sas for letter displays of pairwise mean comparis...

Options

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

🔒 This topic is **solved** and **locked**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 03-20-2013 01:30 PM
(10923 views)

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

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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).

12 REPLIES 12

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

Caroline

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

Steve Denham

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hello KTStarter,

I'm using Virtual box as well, and I'm trying to figure out how to use this PDMIX800 through this tool. Could you solve this question?

I need to transform my LINE results from Tukey test in LETTERS to distinguish different groups. My data is too big to do it manualy 😞

Waiting some help.

Carol.

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. **Registration is now open through August 30th**. Visit the SAS Hackathon homepage.

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.