Hi there!
How can I access %MULT macro in SAS OnDemand for Academics? I want to run a repeated-measures linear mixed model and compare the least squares means. However, I am aware that I can do that with multcomp package in R, but have never used it before. Anyone who knows how to, please kindly share the R code as well. I want to run the following code in SAS:
/* Call %MULT macro for group x Time means */
proc glimmix data=Lentil_groups ;
class factorA Time rep;
model Yield= factorA|Time / ddfm=kr;
/* Random effects to account for */
random intercept /subject=rep type=ar(1) residual;
lsmeans factorA*Time/pdiff;
%mult(trt=Time, by=factorA);
run;
But it looks like %mult macro is not available in my SAS onDemand program. What are the possible options that I have (to install it or use other alternatives)?
Thank you.
Hi @Lyson,
I see that you mean the %MULT macro mentioned in the 2017 post "Re: how to get pdmix800.sas for letter displays of pairwise mean comparisons in proc mixed?" (where it says "... %MULT macro sugested [sic!] by Piepho (2012) ...", which adds valuable search terms to the macro name), and it looks like you can download the source code from https://www.researchgate.net/publication/355381715_mult_macro_for_SAS. Submit the two macro definitions (%MULT and %MULT_INNER) in your SAS session and then use the %MULT macro as intended. (It requires SAS/IML, but I believe that this is available in SAS OnDemand for Academics.)
Where did you hear about this %MULT() macro? Ask whoever told you about it to provide the macro definition so that you can define it before you want to use it.
Hi Tom,
Are you saying that I am asking something that does not exist or you have never come across it as well? See this article below that I am reading and assist if you can:
Piepho, H.P. (2012). A SAS macro for generating letter displays of pairwise mean comparisons. Communications in Biometry and Crop Science 7(1), 4-13.
Did you read the article you cited?
They provided a link:
The macro %MULT is available at
https://www.uni-hohenheim.de/bioinformatik/beratung/toolsmacros/sasmacros/mult.sas
that no longer works.
Perhaps you can contact the author?
Or see if you can search that university website and see if they still publish it under and different location.
Hin Tom,
You seem to be harsh on me. I thought you would explain to me what I need to do. Maybe I am missing out something here. Asking where I got the %MULT macro thing and later on accusing me of not having read the article that I directed you to was a bit harsh on someone innocently asking for help. My question was whether there is an option to load this procedure on SAS OnDemand program editor as advised by the author: "To use it, the macro must be made available either by loading it into the program editor window and then submitting the code, .....". As a SAS expert, I expected you to at least provide some advice. I did not know that there might be some issues on this matter. Maybe I am misinterpretting your questioning. My apologies. Anyway, thanks for the advice.
To use a macro that is not supplied by SAS in their autocall macro library you first need to define the macro by running the code that starts with the %MACRO statement and ends with the %MEND statement. Once the MULT macro is compiled then you can use the syntax %MULT to call the macro.
Hi Tom
Thanks for the advice. I finally Got hold of the author (Piepho) and got his algorithm that I must submit first before accessing the %mult macro functions. I am sorted now. Thank you.
Hi @Lyson,
I see that you mean the %MULT macro mentioned in the 2017 post "Re: how to get pdmix800.sas for letter displays of pairwise mean comparisons in proc mixed?" (where it says "... %MULT macro sugested [sic!] by Piepho (2012) ...", which adds valuable search terms to the macro name), and it looks like you can download the source code from https://www.researchgate.net/publication/355381715_mult_macro_for_SAS. Submit the two macro definitions (%MULT and %MULT_INNER) in your SAS session and then use the %MULT macro as intended. (It requires SAS/IML, but I believe that this is available in SAS OnDemand for Academics.)
Hi Freelance,
Wonderful, I will try to follow your advice in the meantime and see If I will win.
Thank you so much.
Thanks for the advice. I finally Got hold of the author (Piepho) and got his algorithm that I must submit first before accessing the %mult macro functions. I am sorted now. Thank you.
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.