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

Dear Everyone,

I need you help. Smiley Sad

This is a study where we have applided 4 treatmente, and we register data every 10 min during 10 hours. Each data is about animals activities (I mean behaviour activitis, there where 4 types of activities 1, 2, 3 or 4). Dependente variable is a categorical variable.

For Example.

Animal Treatment  Time Activity
1 0 1 1
1 0 2 1
1 0 3 1
1 0 4 1
1 0 5 1
1 0 6 1
1 0 7 4
1 0 8 4
1 0 9 1
1 0 10 1
1 0 11 1
1 0 12 4
1 0 13 4
1 0 14 3
2 0 1 1
2 0 2 1
2 0 3 1
2 0 4 1
2 0 5 1
2 0 6 1
2 0 7 4
2 0 8 4
2 0 9 1
2 0 10 4
2 0 11 4
2 0 12 4
2 0 13 1
3 0 1 1
3 0 2 1
3 0 3 1
3 0 4 1
3 0 5 1
3 0 6 1
3 0 7 4
3 0 8 4
3 0 9 4
3 0 10 3
3 0 11 1
3 0 12 4
3 0 13 1
3 0 14 4
3 0 15 4
3 0 16 4
3 0 17 1
3 0 6 4
3 0 19 4
3 0 20 1
3 0 21 4
3 0 22 4
3 0 23 4
3 0 24 4
3 0 25 4
3 0 26 4
3 0 27 4
4 0 1 1
4 0 2 1
4 0 3 1
4 0 4 1
4 0 5 1
4 0 6 1
4 0 7 3
4 0 8 1
4 0 9 1
4 0 10 4
4 0 11 3
4 0 12 4
5 0 1 1
5 0 2 1
5 0 3 1
5 0 4 1
5 0 5 1
5 0 6 1
5 0 7 1
5 0 8 1
5 0 9 1
5 0 10 1
5 0 11 4
5 0 12 1
5 0 13 1

 

I need to do an ANOVA with repeated measured. And also a Correspondence analisys with the treatments and the animals activities.

 

Can you help me please?

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

Repeated categorical measures are difficult to model, but could be done.  If there is no reason to expect any odd distributions, a general logit multinomial model could be fit. If the OP has access to SAS/STAT14.1, I would strongly recommend looking at Example 43.6 GEE for Nominal Multinomial Data in the PROC GEE documentation.  This example should get you started.  A true correspondence analysis does not consider repeated measures, and so I would hesitate to go that route.

 

You might start with the following untested code:

proc gee data=yourdata;
class animal treatment time activity;
model activity=treatment/dist=multinomial link=glogit;
repeated subject=animal / within=time;
lsmeans treatment/diff means oddsratio cl;
run;

Steve Denham

View solution in original post

8 REPLIES 8
Anita2016
Calcite | Level 5

Dear Reeza, the data is about categorical variables like differents activities, EAT, RUMIA, DRINK, OTHER. The info that I have is de frec of this activities long the time (10 hours).

I do not have a script that use a categorical dependent variable.

 

Did I explain me?

Reeza
Super User

Well then you can't do an ANOVA since that's for continuous variables. What's your question/hypothesis your trying to test?

Anita2016
Calcite | Level 5

It is an study with animals, we want to know it the treatment (Control, Treatment of 12, Treatment of 24, Treatment of 36), make changes in animal behaviour. We want to know if animales activities (eat, drink wather, rumia or others) change after the aplication od treatments.

The activities are evaluate counting the observations of the activities.

During a time period , it was measured every 10 minutes what activity takes the animal at that point. Therefore the study is a longitudinal repeated measures over time and the response variable is not continuous,  is qualitative because is a activitie count.

 

Reeza
Super User

Shouldn't treatment vary in your data then?

Ksharp
Super User

Check PROC GLM .There is an example about it.

 

Firstly Change your data structure like :

 

Treatment  Activity  Time1 Time2 ... Time14

  1               1           6 (count)       12            21

  1               2          6        12            21 

  1               3           6        12            21

  1               4           6        12            21

 

  2               1           6       12            21

  2               2          6        12            21 

  2               3           6        12            21

  2               4           6        12            21

 

 

 

proc glm;
class Treatment Activity;
model Time1-Time14 =
          Treatment Activity Treatment*Activity / nouni;
repeated Time 14 / summary printe;
run;
Ksharp
Super User

I think it agian , maybe you need MIXED model, since your have longititude data.But I have no enough knowledge about it. 

@SteveDenham maybe give you some other code .

 

 

SteveDenham
Jade | Level 19

Repeated categorical measures are difficult to model, but could be done.  If there is no reason to expect any odd distributions, a general logit multinomial model could be fit. If the OP has access to SAS/STAT14.1, I would strongly recommend looking at Example 43.6 GEE for Nominal Multinomial Data in the PROC GEE documentation.  This example should get you started.  A true correspondence analysis does not consider repeated measures, and so I would hesitate to go that route.

 

You might start with the following untested code:

proc gee data=yourdata;
class animal treatment time activity;
model activity=treatment/dist=multinomial link=glogit;
repeated subject=animal / within=time;
lsmeans treatment/diff means oddsratio cl;
run;

Steve Denham

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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