BookmarkSubscribeRSS Feed
PHILHILL25
Calcite | Level 5

Hi all,

I am relatively new to using SAS and was interested to see if I could gain some help on an issue I have run in to. My data is analysing the influence of sex (male/female), maturity offset (pre,circa,post), sex and maturity interaction (sex*maturity) and age (continuous) on jump performance.

Jump performance (outcome variable) is analysed through peak power (continuous) and then technical competence (mastery/near mastery/poor).

For peak power outcome I have run;
proc mixed data=WORK.PHIL method=reml plots=(studentPanel) alpha=0.05 covtest;
class ID Sex Maturity;
model HJ_out_ln = Sex Age Sex*Maturity / noint cl alpha=0.05 alphap=0.05;
repeated / Subject=ID;
lsmeans Sex*Maturity / diff adjust=bon alpha=0.1 cl;
run;

I have come very unstuck on how to approach the technical competence outcome though (mastery/near mastery/poor), through reading across discussions it may appear GLIMMIX should be used, but I am struggling on how to approach coding.

I am wondering if I could use the same for both outcomes, or whether I need to use alternative approaches.

Any help would be greatly appreciated,

Many thanks,

Phil

4 REPLIES 4
SteveDenham
Jade | Level 19

Well, since competence is an ordinal variable, GLIMMIX and GENMOD come to mind.  Since I am more familiar with GLIMMIX, I'll give that a shot;

 

 

proc glimmix data=WORK.PHIL ;
class ID Sex Maturity;
model <competence variable> = Sex Age Sex*Maturity / noint cl alpha=0.05 dist=multinomial ;
random _residual_ / Subject=ID;
lsmeans Sex*Maturity / diff adjust=bon alpha=0.1 cl ilink;
run;

I have a couple of observations - one, you don't have Maturity as a main effect.  Is there a reason for that? Hopefully, you didn't remove it because it wasn't "significant". Two, you could get odds ratios from the lsmeans statement, but they all would be relative to the last Sex*Maturity category.  You might try this LSMEANS statement

 

lsmeans sex*maturity/slicediff (A B) ilink exp adjust=bon alpha=0.1 cl;

 

And three, the Bonferroni adjustment is notoriously conservative.  You may want to consider some of the other adjustment methods.

 

SteveDenham

PHILHILL25
Calcite | Level 5

Hi Steve,

 

Thank you so much for your help with this, it is so hugely appreciated as someone who is new to SAS. Just on the first observation, that was my mistake copying it across, and maturity is indeed included as a main effect. I attempted running the code but I had an error  'intercept cannot be suppressed in models for multinomial data', following this I removed 'noint' from the code, and re-run, but then I had the error 'Least-squares means are not available for the multinomial distribution'. I have tried my best to read across the discussion posts for solutions, before re-connecting with you, but I have so far come unstuck.

 

Any additional guidance you could offer to potentially over come these issues or point me in the right direction would be very much welcomed.

 

Thanks,

 

Phil

SteveDenham
Jade | Level 19

You are absolutely correct and I apologize.  Let's start over with the following:

proc glimmix data=WORK.PHIL ;
class ID Sex Maturity  ;
model <competence variable> = Sex Age Sex*Maturity / cl alpha=0.05 dist=multinomial oddsratio(diff=first) ;
random _residual_ / Subject=ID;

run;

The oddsratio option for the MODEL statement ought to give you some of what you are looking for: odds ratio for levels of Sex and odds ratio for age at the average value for age. If you include Maturity in the model as a main effect, you should also get odds ratios for levels of Maturity.  At least this has an outside chance of giving you something.

 

If Sex*Maturity is of interest, you will have to define a new variable (call it Sex_Maturity) that contains all the levels of Sex*Maturity, with appropriate 1's and 0's in the dataset WORK.PHIL.  You could then add Sex_Maturity to the CLASS statement and replace Sex*Maturity with Sex_Maturity in the MODEL statement.  You would then get odds ratios for each level of Sex_Maturity, with the first level as the reference.  

 

I hope this is a better answer (but won't be surprised at all if I missed something along the line).

 

SteveDenham

 

 

SteveDenham
Jade | Level 19
I forgot that you had said that Maturity is included in your MODEL statement, so replace "If you Include" with "As you include".

SteveDenham

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 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
  • 4 replies
  • 672 views
  • 0 likes
  • 2 in conversation