BookmarkSubscribeRSS Feed
aska_ujita
Obsidian | Level 7

Hello there, 

 

I would like to know which test is better to use in my data.

 

I am testing two treatments (trained and not trained). And after I collected the behaviour and scored it in 0 (absence of reactivity) and 1 (presence of reactivity). The data were collected in days of lactation (1, 3, 5, 7 and 9 ).

 

So... I  would like to compare between treatments by day.

 

Example:

Day of lactation  --->  Percentage of reactivity by group  ---> Significance

Day 1   --->  30% (trained group)  80% (not trained group) ---> P value

Day 3   --->  20% (trained group)  60% (not trained group) ---> P value

Day 5   --->  10% (trained group)  45% (not trained group) ---> P value

Day 7   --->  0% (trained group)  30% (not trained group) ---> P value

Day 9   --->  0% (trained group)  20% (not trained group) ---> P value

Mean   --->  12% (trained group)  47% (not trained group) ---> P value

 

Thank you for the help.

2 REPLIES 2
StatDave
SAS Super FREQ

From your description, I'm guessing that you have subjects that are randomly assigned to the treatments and then are observed over time so that you do not have independent observations across the days. If correct, you could consider various longitudinal approaches including a random effects model (in PROC GLIMMIX), a Generalized Estimating Equations (GEE) model (in PROC GEE or GENMOD), or a stratified conditional logistic model (in PROC LOGISTIC). For example, a GEE model could be fit with code like the following which models the probability that REACTIVITY=1 and allows for the effect of treatment to vary by day. The SLICE statement provides tests of the treatment effect in each day. 

 

proc gee;
  class subjID treatment day;
  model reactivity(event="1") = treatment day treatment*day / dist=bin;
  repeated subject=subjID;
  slice treatment*day / sliceby=day;
  run;
aska_ujita
Obsidian | Level 7

Hello  StatDave_sas!

 

Thank you for your reply!

 

I tried your example, but I got errors because the final hessian.

 

My proc structure is this:


proc glimmix data=A;
class treatment day;
model reactivity=treatment day treatment*day / dist=binomial DDFM=KR;
random subject subjectID;
lsmeans treatment/ adjust=tukey lines;
by day;
run;

 

Is that correct?

 

Thank you very mych.

 

Aska.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 2 replies
  • 1107 views
  • 0 likes
  • 2 in conversation