BookmarkSubscribeRSS Feed
Elisa97
Fluorite | Level 6

Hi everyone,

 

data tab1;
	input gr $ experiment var1;
	datalines;
A 1 0.58
A 2 0.74
A 3 1.17
B 1 0.73
B 2 0.75
B 3 1.52
C 1 1.09
C 2 1.06
C 3 1.60
;
run;

proc npar1way data=tab1 wilcoxon dscf;
    class gr;
    var var1;
run;

 

I have 3 subjects (A, B and C). For each subject, i repeat an experient 3 times. So I have 3 quantitave measurements for each subject.

 

Looking at the data, I realize that in each experiment (1, 2 and 3), A < B < C. But for each experiment I don't have the same "order of magnitude" for my quantitative variable, because of manipulation errors.

 

I wanted to do a kruskall-wallis because of the small sample, to test my quantitative variable between my 3 groups. But I don't know how to take into account the fact that there is inter-experimental variability because one and only one CLASS variable must be specified ?

 

And is the kruslll-wallis test the best solution ?

 

Thank you. 

 

1 REPLY 1
SteveDenham
Jade | Level 19

I feel like I had pretty good luck with the following code:

 

proc glimmix data=tab1 noprofile;
class gr experiment;
model var1 = gr experiment/ddfm=contain;
random experiment/residual  type=ar(1) subject=gr;
lsmeans gr experiment/diff=control; run;

You cannot fit this as a full factorial model as it is completely saturated.

 

Another approach would be to fit a GEE model. I used PROC GEE (SAS/STAT 15.2) to have access to the Type3 option for testing the model effects.

 

proc gee data=tab1;
class gr experiment;
model var1 = gr experiment/type3 ;
repeated subject=gr /type=un;
lsmeans gr experiment/diff=control;
run;

The results are different, but reflect the different approaches of the two procedures. In GLIMMIX, the lsmeans and tests are conditional (subject specific) while for GEE they are marginal (population averaged). Both are appropriate, but the choice depends on your research question.

 

SteveDenham 

sas-innovate-white.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Early bird rate extended! Save $200 when you sign up by March 31.

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
  • 1 reply
  • 478 views
  • 2 likes
  • 2 in conversation