BookmarkSubscribeRSS Feed
aska_ujita
Obsidian | Level 7

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.

6 REPLIES 6
ebowen
Quartz | Level 8

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:

 

http://support.sas.com/documentation/cdl/en/etsug/63939/HTML/default/viewer.htm#etsug_panel_sect006....

 

Good luck!

aska_ujita
Obsidian | Level 7

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?

ebowen
Quartz | Level 8

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:

https://communities.sas.com/t5/Statistical-Procedures/Binomial-regression-model-with-genmod/td-p/172...

 

aska_ujita
Obsidian | Level 7

Thank you for your fast answer.

My data is like this:

 

COWGROUPOPBIRTHCALVINGSAMPLE DATEDAYREACTIVITY
7751529/02/200823/07/201624/07/201610
7751529/02/200823/07/201626/07/201620
7751529/02/200823/07/201628/07/201630
7751529/02/200823/07/201630/07/201640
7751529/02/200823/07/201601/08/201651
8322310/07/200812/04/201612/04/201610
8322310/07/200812/04/201614/04/201620
8322310/07/200812/04/201616/04/201630
8322310/07/200812/04/201618/04/201640
8322310/07/200812/04/201620/04/201651
16512116/09/201121/05/201606/06/201611
16512116/09/201121/05/201607/06/201621
16512116/09/201121/05/201609/06/201631
16512116/09/201121/05/201624/06/201641
16512116/09/201121/05/201606/07/201651
9171402/11/200811/06/201612/06/201611
9171402/11/200811/06/201614/06/201621
9171402/11/200811/06/201616/06/201631
9171402/11/200811/06/201618/06/201641
9171402/11/200811/06/201624/06/201650

 

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 PERCENTAGEP VALUE
DAYCONTROL GROUPTREATED GROUP
16040*
25020*
3303*
4100non significative
550**


Thank you!!

Aska.

ebowen
Quartz | Level 8

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!

aska_ujita
Obsidian | Level 7

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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Mastering the WHERE Clause in PROC SQL

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.

Discussion stats
  • 6 replies
  • 808 views
  • 0 likes
  • 2 in conversation