BookmarkSubscribeRSS Feed
Ana2017
Fluorite | Level 6

Dear:

 

I followed your suggestion and I found significance differences between treatments in each activity. Using both ANOVA and MANOVA.

Eat: 0 . 0 0 0 1

Drink: 0. 0 3 9 7

Sleep: <0 . 0 0 0 1

Now, how can I find the differences between treatments? Because for example, for eat maybe there is a difference between treatment 4 and 2, but not between treatment 4 and 3.

 

Ana2017
Fluorite | Level 6

 

Dear:

I followed your suggestion and I found significance differences between treatments in each activity. Using both ANOVA and MANOVA.

P-values:

Eat: 0 . 0 0 0 1

Drink: 0. 0 3 9 7

Sleep: <0 . 0 0 0 1

Now, how can I find the differences between treatments? Because for example, for the activity EAT maybe there is a difference between treatment 4 and 2, but not between treatment 4 and 3.

 

StatDave
SAS Super FREQ

As sld mentioned, the response is multinomial - it is an unordered, categorical response. Further, you have repeated measures per animal over time. An appropriate model can be fit using PROC GEE using the DIST=MULT and LINK=GLOGIT options in the MODEL statement and including a REPEATED statement. It might look like this if you want Treatment as the only predictor. Assuming you want comparisons among the treatments, the LSMEANS statement provides that. 

 

 

proc gee;
class treatment animal;
model behavior = treatment / dist=mult link=glogit;
repeated subject=animal;
lsmeans treatment / diff;
run;
Ana2017
Fluorite | Level 6

Hi:

Do you meant this way? Changing in the place of behaviour, each activity one by one (eat, drink and sleep)?

 

proc gee;
class treatment animal;
model eat= treatment / dist=mult link=glogit;
repeated subject=animal;
lsmeans treatment / diff;
run;

 

proc gee;
class treatment animal;
model drink = treatment / dist=mult link=glogit;
repeated subject=animal;
lsmeans treatment / diff;
run;
proc gee;
class treatment animal;
model sleep = treatment / dist=mult link=glogit;
repeated subject=animal;
lsmeans treatment / diff;
run;

  I got this error.... please look...

 
ERROR: Only the Independent working correlation type is available for multinomial models.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDIMIENTO GEE used (Total process time):
 
 
Regards. 
StatDave
SAS Super FREQ

No, I mean you should use the Behaviour variable which has values Eat or Sleep or Drink and to run PROC GEE just once with Behaviour as the response variable as I showed.  The default should be the independence correlation structure, so I don't know why you got that error unless you specified the TYPE= (or CORR=) option in REPEATED with a value other than IND. To be sure, specify TYPE=IND in REPEATED:

 

repeated subject=animal / type=ind;

Ana2017
Fluorite | Level 6

StatDave:

I am afraid that I cannot use the variable Behaviour directly, because my data is as follows. A frequency of activities. 


DATA Behaviour;
INPUT Treatment Animal Eat Sleep Drink;
DATALINES;
1 1 52 4 5
1 2 19 2 2
1 3 20 4 2
1 4 21 23 2
1 5 23 78 1
2 6 23 11 1
2 7 22 78 2
2 8 24 1 1
2 9 23 1 1
2 80 22 1 0
3 11 90 2 0
3 12 25 1 1
3 13 19 2 20
3 14 20 2 10
3 15 21 1 15
4 16 24 87 20
4 17 23 0 10
4 18 24 0 18
4 19 23 14 19
4 20 24 12 263 
RUN;

So if I include just the word behaviour the system says:

 

ERROR: Variable BEHAVIOUR not found.

 😞

StatDave
SAS Super FREQ

I was referring to this form of the data that you mentioned earlier and which I assume you have:

 

Moment                 Animal             Treatment          Behaviour

0                            1                      1                        Eat

10'                         1                      1                        Sleep

20'                         1                      1                        Sleep

.                              .                       .                        .

.                              .                       .                        .

.                              .                       .                        .

(0 to 180´)            (1 to 20)       (1 to 4)                   (Eat, Sleep or Drink)

Ana2017
Fluorite | Level 6

ahhhh, OK! thanks for that. I just changed the table, reporting the global frequencies. 

Ana2017
Fluorite | Level 6
So the Proc gee is not suitable to be used with the new arrangement of the data that I have now?

proc gee;
class treatment animal;
model sleep = treatment / dist=mult link=glogit;
repeated subject=animal;
lsmeans treatment / diff;
run;
StatDave
SAS Super FREQ

You could use it for a binary response like that (though you would then specify DIST=BINOMIAL and LINK=LOGIT), but then you would presumably have to fit three separate models. That could complicate testing for Treatment differences. It's usually better to fit a single model when that is possible as it is here.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 24 replies
  • 2093 views
  • 3 likes
  • 5 in conversation