Hello there!
I have measured temperament scores (0 for absence and 1 for presence of reactivity) in 40 animals (3 and 4 years old, distributed randomly) that is divided in two treatments: Treated group and control group.
I collected the temperament in day 1, 2, 3, 4 and 5 of experiment.
So... I would like to know which PROC I should use to analyse the difference (with P value) between these groups JUST for score 1 (presence oss reactivity) by day. Because I want to see if the control group is more reactive than treated group.
thank you.
Aska.
It sounds like you have a fairly simple panel dataset (that is repeated observations of the same subjects over multiple time periods), so I would suggest PROC PANEL. Here's a link to some info on it:
Good luck!
Thank you Ebowen.
Is this proc possible to use in binomial data? I heard that proc glimmix may help too, do you know about it?
OK, I misunderstood how you set up your data (posting your data or data structure helps!). If you're looking at binomial data, you're better off using something like PROC GLIMMIX with a logit link function. I'm not as familiar with this type of data, but I found this thread that might help:
Thank you for your fast answer.
My data is like this:
COW | GROUP | OP | BIRTH | CALVING | SAMPLE DATE | DAY | REACTIVITY |
775 | 1 | 5 | 29/02/2008 | 23/07/2016 | 24/07/2016 | 1 | 0 |
775 | 1 | 5 | 29/02/2008 | 23/07/2016 | 26/07/2016 | 2 | 0 |
775 | 1 | 5 | 29/02/2008 | 23/07/2016 | 28/07/2016 | 3 | 0 |
775 | 1 | 5 | 29/02/2008 | 23/07/2016 | 30/07/2016 | 4 | 0 |
775 | 1 | 5 | 29/02/2008 | 23/07/2016 | 01/08/2016 | 5 | 1 |
832 | 2 | 3 | 10/07/2008 | 12/04/2016 | 12/04/2016 | 1 | 0 |
832 | 2 | 3 | 10/07/2008 | 12/04/2016 | 14/04/2016 | 2 | 0 |
832 | 2 | 3 | 10/07/2008 | 12/04/2016 | 16/04/2016 | 3 | 0 |
832 | 2 | 3 | 10/07/2008 | 12/04/2016 | 18/04/2016 | 4 | 0 |
832 | 2 | 3 | 10/07/2008 | 12/04/2016 | 20/04/2016 | 5 | 1 |
1651 | 2 | 1 | 16/09/2011 | 21/05/2016 | 06/06/2016 | 1 | 1 |
1651 | 2 | 1 | 16/09/2011 | 21/05/2016 | 07/06/2016 | 2 | 1 |
1651 | 2 | 1 | 16/09/2011 | 21/05/2016 | 09/06/2016 | 3 | 1 |
1651 | 2 | 1 | 16/09/2011 | 21/05/2016 | 24/06/2016 | 4 | 1 |
1651 | 2 | 1 | 16/09/2011 | 21/05/2016 | 06/07/2016 | 5 | 1 |
917 | 1 | 4 | 02/11/2008 | 11/06/2016 | 12/06/2016 | 1 | 1 |
917 | 1 | 4 | 02/11/2008 | 11/06/2016 | 14/06/2016 | 2 | 1 |
917 | 1 | 4 | 02/11/2008 | 11/06/2016 | 16/06/2016 | 3 | 1 |
917 | 1 | 4 | 02/11/2008 | 11/06/2016 | 18/06/2016 | 4 | 1 |
917 | 1 | 4 | 02/11/2008 | 11/06/2016 | 24/06/2016 | 5 | 0 |
So, I wanna compare if group 2 (control) is worst than group 1 (treated) in reactivity (score 1) in each single day.
I want make my table like this:
REACTIVITY PERCENTAGE | P VALUE | ||
DAY | CONTROL GROUP | TREATED GROUP | |
1 | 60 | 40 | * |
2 | 50 | 20 | * |
3 | 30 | 3 | * |
4 | 10 | 0 | non significative |
5 | 5 | 0 | ** |
Thank you!!
Aska.
Hi, sorry I didn't see this until this morning. Tell me one thing about your data: Is each treatment considered an independent event, or are you measuring the cumulative effect of the treatment over time? The reason I ask, is that if I were using this data, I would treat this essentially as a probability model, like Logit or Probit, which asks how does the probability of Reactivity=1 change with being in the treatment group. But that requires independence across the time dimension.
Using PROC GLIMMIX would look something like this (I haven't tested this code, so you might have to play with it a bit):
PROC GLIMMIX DATA=yourdata;
CLASS cow day;
MODEL reactivity(event="1") = group / SOLUTION;
RANDOM intercept / subject=cow;
RANDOM intercept / subject=day;
RUN;
I also found this explanation of a binomial version of this at this link: https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_glimmix_a00...
proc glimmix data=yourdata;
CLASS cow;
model reactivity/n = group / solution; random intercept / subject=cow; run;
I'm not as familiar with this type of regression, so I don't know that I can help you much with the binomial version. In these types of models, the interpretation of the coefficients is somewhat tricky. SAS doesn't offer a built in post-processing procedure to derive average marginal effects from Logit models. That may not be important for your discipline, but it's what social scientists typically use to measure the effect of a variable on the probability of "success." Hope that helps!
Hi Ebowen, thank you for the explanation.
My treatment is a training with habituation.
Is kind of giving something good to the animals to have a good experience in that installation. That is the treatment.
The data were collected after 10 days of treatment.
We brought both groups (treated and control) to the installation again to measure the reactivity. There may have been the effect of habituation over time in this period for both groups. Because is possible to see that the reactivity is higher in the beginning and decrease in the following days.
Thank you for your help!!
Aska.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.