BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ACF1
Calcite | Level 5

Dear Community,

I have troubles in using PROC MIXED OR PROC GLIMMIXED. My experiment consist of 12 control and 12 diseased animals (group factor). Cultured cells from each animal are treated with 4 compounds (repeated measures factor) and the measure of a signal is replicated 5 times (repeated measures factor).

I would like to test for group effect and compound effect and possibly their interaction taking into account the nested repeated measures nature of the experiment.

 

I also have a similar experiment where the numeber of animals and the number is variable as regard the group, the compound end the replicates.

 

Thanks for your help

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

You can, but be sure to include the random statements as in the current model, especially the group=group*compound option to deal with the heterogeneity of variance issue.  I don't know why you would drop it, though. It is a known design factor, the F tests, lsmeans and lsmean difference p values for tests of group, compound and group by compound are no different, and you get some insight into which whole plot factors have the largest effect on the repeat to repeat variability.

 

SteveDenham

View solution in original post

7 REPLIES 7
SteveDenham
Jade | Level 19

If your response variable is continuous, you can fit a Kronecker product in the REPEATED statement of PROC MIXED.  See the short example here .

 

For GLIMMIX, multivariate repeated measures are not so simple.  See my reply in this thread https://communities.sas.com/t5/Statistical-Procedures/repeated-measures-in-glimmix/td-p/128310  or here https://communities.sas.com/t5/Statistical-Procedures/Doubly-repeated-measures-with-GLIMMIX/td-p/116...

 

The latter is an incomplete version of this fantastic blog by the Ontario Agriculture College's statistical support group:

https://oacstats.blog/2018/04/23/ridgetown-workshop-repeated-measures-adding-year-location/ 

 

This gives code for a doubly repeated measures analysis in GLIMMIX.

 

SteveDenham 

ACF1
Calcite | Level 5
Hi Steve,
thanks for your suggestion. Unfortunately it seems not working.
I tried this model:

PROC GLIMMIX DATA=mydata PLOTS=ALL ;
CLASS animal group compound repeat ;
MODEL signal = groupt|compound ;
RANDOM repeat / SUBJECT=animal ;
RANDOM compound / SUBJECT=animal*repeat TYPE=UN ;
LSMEANS group|compound / CL ;
RUN;

but it doesn't work, this is the log:

WARNING: MIVQUE0 estimate of profiled variance is linearly related to other
covariance parameters.
NOTE: Convergence criterion (FCONV=2.220446E-16) satisfied.
NOTE: At least one element of the gradient is greater than 1e-3.
NOTE: A linear combination of covariance parameters is confounded with the
residual variance.


SteveDenham
Jade | Level 19

Well, in some sense, things worked (convergence is good), but the thing to notice here is that you aren't fitting 'repeat' in the model.  Give this a try:

 

PROC GLIMMIX DATA=mydata PLOTS=ALL ;
CLASS animal group compound repeat ;
MODEL signal = group|compound|repeat ;
RANDOM intercept / SUBJECT=animal group=compound ;
RANDOM repeat / SUBJECT=animal residual TYPE=cs ;
LSMEANS group|compound / CL ;
RUN;

I still feel that this is missing something from the OAC reference, as you don't have a factor equivalent to their 'rep' variable, so I am not sure if the first RANDOM statement will do what is needed.. I might be missing what the experimental unit is in this case.  I think 'animal' is a block equivalent to 'rep' in the OAC, in which case you should have some variable ID'ing what was sampled from the animal.  The more I think about this, that would be 'compound' so you have confounding of compound with the experimental unit.  I definitely feel like I am missing a key element in the design.

 

SteveDenham

 

ACF1
Calcite | Level 5

Here my design and my data: 12 diseased (D) animals and 12 controls (ctrl) are assigned to receive all of 4 compounds (first repeated factor) and there is a signal measured 5 times for each coumpound on each animal (second repeated factor, but I'm not interested in this effect).

 

GroupCompoundAnimalRepeatSignal
D1D11299092
D1D12280073
D1D13239451
D1D14256468
D1D15285194
D1+2D11348124
D1+2D12336914
D1+2D13369524
D1+2D14307687
D1+2D15316932
D1+2+3D11358802
D1+2+3D12389635
D1+2+3D13397721
D1+2+3D14418724
D1+2+3D15420941
D1+3D11415534
D1+3D12371207
D1+3D13384587
D1+3D14428517
D1+3D15415308
D1D21451305
D1D22442801
D1D23481227
D1D24413664
D1D25430914
D1+2D21278262
D1+2D22286955
D1+2D23226982
D1+2D24258981
D1+2D25268785
D1+2+3D21236513
D1+2+3D22210532
D1+2+3D23156137
D1+2+3D24119717
D1+2+3D25151279
D1+3D21538222
D1+3D22529583
D1+3D23517925
D1+3D24532973
D1+3D25530916
D1D31496014
D1D32419344
D1D33468740
D1D34470809
D1D35484953
D1+2D31712583
D1+2D32634273
D1+2D33654884
D1+2D34664783
D1+2D35676842
D1+2+3D31456312
D1+2+3D32424410
D1+2+3D33440612
D1+2+3D34416622
D1+2+3D35438208
D1+3D31693942
D1+3D32691170
D1+3D33629976
D1+3D34698913
D1+3D35769643
D1D41427913
D1D42419932
D1D43397815
D1D44399724
D1D45399517
D1+2D41511499
D1+2D42460973
D1+2D43422244
D1+2D44559974
D1+2D45518275
D1+2+3D41448751
D1+2+3D42375320
D1+2+3D43417325
D1+2+3D44327513
D1+2+3D45327415
D1+3D41598966
D1+3D42593115
D1+3D43537046
D1+3D44588924
D1+3D45568589
D1D51452302
D1D52295407
D1D53443580
D1D54380202
D1D55342135
D1+2D51526964
D1+2D52513785
D1+2D53485871
D1+2D54493392
D1+2D55428953
D1+2+3D51290895
D1+2+3D52304773
D1+2+3D53233861
D1+2+3D54239263
D1+2+3D55204572
D1+3D51561195
D1+3D52563376
D1+3D53552295
D1+3D54542625
D1+3D55550423
D1D61151525
D1D62140694
D1D63151348
D1D64140498
D1D65132310
D1+2D61324575
D1+2D62323197
D1+2D63316585
D1+2D64284173
D1+2D65312782
D1+2+3D61123533
D1+2+3D62121773
D1+2+3D63121476
D1+2+3D64120766
D1+2+3D65121636
D1+3D61314985
D1+3D62309984
D1+3D63288682
D1+3D64295393
D1+3D65285891
D1D71231758
D1D72238973
D1D73252995
D1D74184888
D1D75203697
D1+2D71150338
D1+2D72143496
D1+2D73143558
D1+2D74140278
D1+2D75140189
D1+2+3D71237055
D1+2+3D72260468
D1+2+3D73247947
D1+2+3D74241240
D1+2+3D75217081
D1+3D71229403
D1+3D72216481
D1+3D73198361
D1+3D74207942
D1+3D75217733
D1D81528971
D1D82493396
D1D83498951
D1D84480924
D1D85497756
D1+2D81500988
D1+2D82352342
D1+2D83434887
D1+2D84402875
D1+2D85370769
D1+2+3D81418733
D1+2+3D82539952
D1+2+3D83482380
D1+2+3D84526684
D1+2+3D85504143
D1+3D81513150
D1+3D82571970
D1+3D83550684
D1+3D84511224
D1+3D85518795
D1D91254832
D1D92234697
D1D93211593
D1D94242894
D1D95225680
D1+2D9169043
D1+2D9275423
D1+2D9370081
D1+2D9470284
D1+2D9571052
D1+2+3D9149326
D1+2+3D9251262
D1+2+3D9343746
D1+2+3D9445299
D1+2+3D9546240
D1+3D91168523
D1+3D92172344
D1+3D93167297
D1+3D94169445
D1+3D95167032
D1D101152369
D1D102148473
D1D103136721
D1D104150212
D1D105145133
D1+2D101223495
D1+2D102256362
D1+2D103313593
D1+2D104226295
D1+2D105219989
D1+2+3D101338262
D1+2+3D102293914
D1+2+3D103247747
D1+2+3D104285989
D1+2+3D105269962
D1+3D101223514
D1+3D102192321
D1+3D103225333
D1+3D104221425
D1+3D105166638
D1D111258947
D1D112238768
D1D113210975
D1D114248985
D1D115231799
D1+2D111274832
D1+2D112282496
D1+2D113253349
D1+2D114249934
D1+2D115269321
D1+2+3D111649398
D1+2+3D112558776
D1+2+3D113572953
D1+2+3D114613874
D1+2+3D115649631
D1+3D111355945
D1+3D112387984
D1+3D113326617
D1+3D114328583
D1+3D115331750
D1D121325151
D1D122296417
D1D123250726
D1D124308349
D1D125248071
D1+2D121163460
D1+2D122148729
D1+2D123159533
D1+2D124139568
D1+2D125151676
D1+2+3D12179323
D1+2+3D12276269
D1+2+3D12378035
D1+2+3D12475395
D1+2+3D12578143
D1+3D121626971
D1+3D122553892
D1+3D123594874
D1+3D124570093
D1+3D125586996
ctrl1C1186962
ctrl1C1278238
ctrl1C1373522
ctrl1C1473355
ctrl1C1569748
ctrl1+2C1198594
ctrl1+2C12137487
ctrl1+2C13124254
ctrl1+2C14158471
ctrl1+2C1592564
ctrl1+2+3C1166288
ctrl1+2+3C1259785
ctrl1+2+3C1352898
ctrl1+2+3C1447599
ctrl1+2+3C1549859
ctrl1+3C1162148
ctrl1+3C1271232
ctrl1+3C1365424
ctrl1+3C1459534
ctrl1+3C1562532
ctrl1C2191041
ctrl1C2293555
ctrl1C2393478
ctrl1C2489325
ctrl1C2592847
ctrl1+2C2160630
ctrl1+2C2259552
ctrl1+2C2360105
ctrl1+2C2461149
ctrl1+2C2558308
ctrl1+2+3C2183505
ctrl1+2+3C2284301
ctrl1+2+3C2383447
ctrl1+2+3C2482376
ctrl1+2+3C2584744
ctrl1+3C2183488
ctrl1+3C2280861
ctrl1+3C2383690
ctrl1+3C2483577
ctrl1+3C2582614
ctrl1C31130417
ctrl1C32124647
ctrl1C33130866
ctrl1C34131894
ctrl1C35129993
ctrl1+2C31131093
ctrl1+2C32128174
ctrl1+2C33130239
ctrl1+2C34130141
ctrl1+2C35129516
ctrl1+2+3C31127552
ctrl1+2+3C32125519
ctrl1+2+3C33126711
ctrl1+2+3C34129848
ctrl1+2+3C35129213
ctrl1+3C31113537
ctrl1+3C32121609
ctrl1+3C33111941
ctrl1+3C34111000
ctrl1+3C35114276
ctrl1C4122301
ctrl1C4224102
ctrl1C4319101
ctrl1C4438211
ctrl1C4537794
ctrl1+2C4171477
ctrl1+2C4267638
ctrl1+2C4381357
ctrl1+2C4447137
ctrl1+2C4554535
ctrl1+2+3C4142178
ctrl1+2+3C4251847
ctrl1+2+3C4339032
ctrl1+2+3C4437201
ctrl1+2+3C4537153
ctrl1+3C4183592
ctrl1+3C4277168
ctrl1+3C4365752
ctrl1+3C4473187
ctrl1+3C4554966
ctrl1C5112983
ctrl1C52340907
ctrl1C53114244
ctrl1C54128359
ctrl1C5518443
ctrl1+2C5172999
ctrl1+2C5254537
ctrl1+2C5359254
ctrl1+2C5438272
ctrl1+2C5538254
ctrl1+2+3C5182657
ctrl1+2+3C5271214
ctrl1+2+3C5352381
ctrl1+2+3C5432244
ctrl1+2+3C5548865
ctrl1+3C5171562
ctrl1+3C5264598
ctrl1+3C5379327
ctrl1+3C5438258
ctrl1+3C5548368
ctrl1C6163305
ctrl1C6263293
ctrl1C6364925
ctrl1C6464381
ctrl1C6566729
ctrl1+2C6186144
ctrl1+2C6283301
ctrl1+2C6384701
ctrl1+2C6487144
ctrl1+2C6582177
ctrl1+2+3C6198863
ctrl1+2+3C6298377
ctrl1+2+3C63100403
ctrl1+2+3C64100291
ctrl1+2+3C65100793
ctrl1+3C6194011
ctrl1+3C6286967
ctrl1+3C6393922
ctrl1+3C6492021
ctrl1+3C6589911
ctrl1C71119105
ctrl1C72121940
ctrl1C73116700
ctrl1C74122114
ctrl1C75115009
ctrl1+2C71110396
ctrl1+2C72115510
ctrl1+2C73111504
ctrl1+2C74110784
ctrl1+2C75109219
ctrl1+2+3C71196448
ctrl1+2+3C72196720
ctrl1+2+3C73197428
ctrl1+2+3C74199719
ctrl1+2+3C75192063
ctrl1+3C71224785
ctrl1+3C72225851
ctrl1+3C73221603
ctrl1+3C74220562
ctrl1+3C75221109
ctrl1C8189047
ctrl1C8287179
ctrl1C8387487
ctrl1C8490849
ctrl1C8588516
ctrl1+2C81162359
ctrl1+2C82156512
ctrl1+2C83162665
ctrl1+2C84168540
ctrl1+2C85169213
ctrl1+2+3C8179459
ctrl1+2+3C8278650
ctrl1+2+3C8379524
ctrl1+2+3C8478989
ctrl1+2+3C8579703
ctrl1+3C81104540
ctrl1+3C8299693
ctrl1+3C83102779
ctrl1+3C84101869
ctrl1+3C85103001
ctrl1C9182848
ctrl1C9284812
ctrl1C9383114
ctrl1C9485284
ctrl1C9582324
ctrl1+2C9168911
ctrl1+2C9267781
ctrl1+2C9369592
ctrl1+2C9467487
ctrl1+2C9568789
ctrl1+2+3C9173284
ctrl1+2+3C9275162
ctrl1+2+3C9373766
ctrl1+2+3C9474591
ctrl1+2+3C9575591
ctrl1+3C9150998
ctrl1+3C9249504
ctrl1+3C9351023
ctrl1+3C9450558
ctrl1+3C9550159
ctrl1C10192934
ctrl1C10296397
ctrl1C103100353
ctrl1C10497318
ctrl1C10592684
ctrl1+2C101175796
ctrl1+2C102175960
ctrl1+2C103177130
ctrl1+2C104176969
ctrl1+2C105172057
ctrl1+2+3C101299139
ctrl1+2+3C102295258
ctrl1+2+3C103292623
ctrl1+2+3C104296571
ctrl1+2+3C105301145
ctrl1+3C101130747
ctrl1+3C102135256
ctrl1+3C103130535
ctrl1+3C104131637
ctrl1+3C105134188
ctrl1C11194395
ctrl1C11293207
ctrl1C11395727
ctrl1C11491878
ctrl1C11592932
ctrl1+2C11129672904
ctrl1+2C11241261021
ctrl1+2C11354014275
ctrl1+2C11425077474
ctrl1+2C11573583123
ctrl1+2+3C11181872
ctrl1+2+3C11282734
ctrl1+2+3C11384131
ctrl1+2+3C11484768
ctrl1+2+3C11583909
ctrl1+3C11143734
ctrl1+3C11246370
ctrl1+3C11343888
ctrl1+3C11444855
ctrl1+3C11543269
ctrl1C12185789
ctrl1C12284396
ctrl1C12390814
ctrl1C12487896
ctrl1C12586842
ctrl1+2C12134059
ctrl1+2C12234206
ctrl1+2C12334647
ctrl1+2C12434310
ctrl1+2C12535210
ctrl1+2+3C121145572
ctrl1+2+3C122143967
ctrl1+2+3C123138577
ctrl1+2+3C124144353
ctrl1+2+3C125142404
ctrl1+3C12183488
ctrl1+3C12280861
ctrl1+3C12383690
ctrl1+3C12483577
ctrl1+3C12582614
SteveDenham
Jade | Level 19

I tried a couple versions of this, but this code ran without error or warning, and gave the smallest AICC:

proc glimmix data=one;
class Group Compound Animal Repeat;
value=signal/1000;
model value = group|compound|repeat/ddfm=bw;
random intercept/subject=animal;
random repeat/residual subject=animal type=cs group=group*compound;
covtest homogeneity;
run;

 

 This split plot analysis with heterogeneous variances by group*compound is the best I came up with.  Comparisons of interest regarding group and compound can be obtained with an LSMEANS or LSMESTIMATE statement.

 

SteveDenham

 

ACF1
Calcite | Level 5

Thank you Steve, PROC GLIMMIX is very complicated and the model so! Is it possible to omit the "repeat" factor in the MODEL statement?

SteveDenham
Jade | Level 19

You can, but be sure to include the random statements as in the current model, especially the group=group*compound option to deal with the heterogeneity of variance issue.  I don't know why you would drop it, though. It is a known design factor, the F tests, lsmeans and lsmean difference p values for tests of group, compound and group by compound are no different, and you get some insight into which whole plot factors have the largest effect on the repeat to repeat variability.

 

SteveDenham

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1033 views
  • 1 like
  • 2 in conversation