BookmarkSubscribeRSS Feed
SASAlice
Calcite | Level 5

Hi all,

I am currently analyzing a study where participants answered a questionnaire about how they perceived/graded two different stimuli (CS+ and CS-) after receiving either medication A, medication B or Placebo. I succeed to perform the non parametric anova using turkey adjust :

 

/* Ranks on Fear */
%macro rank_Fear(dataset);

proc rank data=&dataset out=&dataset;
var Fear;
ranks r_el_Fear;
run;

/* Non-parametric ANOVA on Fear ranks */
PROC MIXED DATA=&dataset METHOD=MIVQUE0 ANOVAF;
CLASS Subject CS Grp;
MODEL r_el_Fear=CS|Grp;
REPEATED/SUBJECT=Subject Group=Grp TYPE=UN;
lsmeans CS Grp CS*Grp/ adjust=tukey;
ods select ModelInfo Tests3 diffs lsmeans;
run;
%mend;

However since it is a medication study with a placebo I am thinking that it could make sense to use dunnett adj instead
PROC MIXED DATA=&dataset METHOD=MIVQUE0 ANOVAF;
CLASS Subject CS Grp_cat;
MODEL r_el_Fear=CS|Grp_cat;
REPEATED/SUBJECT=Subject Group=Grp_cat TYPE=UN;
lsmeans Grp_cat /PDIFF=CONTROL('Group 3'') adjust=dunnett;
ods select ModelInfo Tests3 diffs lsmeans;
run;
%mend;

Now I am a bit confused as I can't find a way to look at CS*Grp_cat interaction with dunnett adj, which would be really valuable for me. Is there a way to look at interaction using Dunnett in SAS?

Thank you for your time!

7 REPLIES 7
sbxkoenk
SAS Super FREQ

@SASAlice wrote:

Now I am a bit confused as I can't find a way to look at CS*Grp_cat interaction with dunnett adj, which would be really valuable for me. Is there a way to look at interaction using Dunnett in SAS?


Why can't you do something like?

lsmeans CS * Gtp_cat / stderr pdiff cl cov adjust=dunnett DIFF=CONTROL('abcxyz' 'Group 3');

What happens then?

 

BR, Koen

SASAlice
Calcite | Level 5

Thank you for your reply.

I tried and if I am not mistaken it seems that 'stderr' is not recognize

 

SASAlice_0-1700741465073.png

Would you have another suggestion?

sbxkoenk
SAS Super FREQ

Hello,

 

It seems 'stderr' is indeed a key-word that you cannot use as an option (after the forward slash) on the LSMEANS statement.


SAS/STAT 15.3 User's Guide
Shared Concepts and Topics
Syntax: LSMEANS Statement
https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/statug/statug_introcom_sect041.htm

 

Just get rid of 'stderr' and submit again.

 

BR, Koen

SteveDenham
Jade | Level 19

Beware using Dunnett's adjustment on rank based means. Dunnett's adjustment is fairly robust, but one thing that can really mess with it is a lot of ties. If your data is not heavily tied (less than 10% ties), you should be OK.

 

SteveDenham

SASAlice
Calcite | Level 5
Hi SteveDeham,
Thank you for the caution bout using Dunnett's adjustment on rank-based means, especially regarding the impact of ties. How would you consider making multiple group comparaison to a controle group then if more then 10% ties?
Alice
SteveDenham
Jade | Level 19

For comparison of multiple groups to a single control for a nonparametric analysis (Kruskal-Wallis), Dunn's test is often recommended. While also influenced by ties (as is any rank based analysis), it is not as affected as Dunnett's test. SAS does not currently offer Dunn's as a multiplicity adjustment, so you would probably have to search for it on the internet.

 

However, SAS does offer the method of Edwards and Berry (ADJUST=SIMULATE), which is truly distribution-free, and provides superior family-wise error control to any of the other methods available for the LSMEANS or LSMESTIMATE statement.

 

SteveDenham

SASAlice
Calcite | Level 5

Hi Koen,

I also tried that before but I was having an error message, however with your suggestion I tried again few ways and it seems that the main structure of the code works but the order of the variables need to be carefully chosen like following:
lsmeans Grp_cat*CS / adjust=dunnett diff=control('CSMinus' 'Group 3') cl ;

 

This didn't work (which may be why it took some time to figure out how to do):

lsmeans CS*Grp_cat / adjust=dunnett diff=control('CSMinus' 'Group 3') cl ;

Thank you!!

Alice

Ready to join fellow brilliant minds for the SAS Hackathon?

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

Register today!
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.

Discussion stats
  • 7 replies
  • 913 views
  • 2 likes
  • 3 in conversation