BookmarkSubscribeRSS Feed
Ming
Calcite | Level 5

Hi,

I am trying to compare value from different time points to one specific time point for each individual.  For example, for each individual, measurements were made every 15s starting from 30s to 3min (i.e. 11 measurements).  I have 50 subjects in total.  I want to compare all the different time measurements to the measurement at time 2:30 (ie. the 9th time point).  If I perform a regular ANOVA with repeated measures with Tukey post-hoc, it will make adjustments for 55 comparisons (11x10/2) so everything will come out non-significant.  Below is the code that I used...

data long;

   input id sex$ @@;

      do timept = 1 to 13;

    input measurement @@;

output;

end;

proc mixed data=long;

   class timept;

   model measurement = timept;

   repeated timept / subject=id;

   lsmeans timept / adjust=tukey pdiff;

run;

However, what I wanted to compare are point 1 to 9, 2 to 9 3 to 9, .... 10 to 9, 11 to 9.  So that's a total of 10 comparisons, not 55 comparisons (for complete comparisons).  Is there a way to adjust for just 10 comparisons?

thanks for your help!

ming

6 REPLIES 6
PGStats
Opal | Level 21

Try

lsmeans timept / adjust=Tukey pdiff=control('9');

PG

PG
Ming
Calcite | Level 5

Hi,

I got this error message and the output was the same as without the "pdiff=control('9')".

WARNING: Tukey's adjustment only applies to all pairwise differences, so these are taken.

do I need to rearrange my data differently?

thanks.

ming

Ming
Calcite | Level 5

Hi,

If I take out the option adjust=tukey so...

lsmeans timept / diff=control('9');

then I get an output that's what I want.  However, I don't think this corrects for multiple comparison?

thanks.

ming

ballardw
Super User

I don't use proc mixed but if you want to completely ignore the other time frames exclude them from the analysis dataset for the procedure:

Proc mixed data=long (where= (timept <= 9))

might do what you're looking for.

PGStats
Opal | Level 21

Use

ADJUST=DUNNETT

see section Comparing All Treatments to a Control in SAS/STAT(R) 9.3 User's Guide

PG

PG
SteveDenham
Jade | Level 19

This is the best option for comparison to a single group.  However, if someone wants to adjust for a limited number of comparisons (rather than all pairwise) and the comparisons are not all to a single group mean, the LSMESTIMATE statement in PROC GLIMMIX and PROC PLM (after using the STORE command in MIXED) is ideal.

Steve Denham

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 1748 views
  • 0 likes
  • 4 in conversation