BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ammarhm
Lapis Lazuli | Level 10

Hi everyone,

I know this is not a pure SAs question (rather a stats SAS question ) but i am really stuck here and appreciate if someone here could give me an advice.

I have a group of patients being given a treatment. All have the same disease and recieve the same treatment. 

These patients are assessed at 4 different time points using a test, this test returns a binary results (positive or negative). 

At the end of the study, the patients are classified as either responders to treatment or not based on clinical assessment (and not on the test). 

The following two charts represent the proportion of patients returning a positive or negative test at the different time points, there is a chart for treatment responders and a chart for non treatment responders. 

ammarhm_0-1626949473304.jpeg

 

ammarhm_1-1626949473305.jpeg

 

 

What you can clearly see is in patients who were ultimately classified as reconsiders, the proportion of those returning a positive test increased over time. 

However, in those who were non-responders, the  proportion returning a positive test increased to a lesser extent over time. 

 

What I want to do statistically is two different things:

1. Assess for whether the change in the proportion of test positivity over time is significant in either group, ie related to the following statement: The proportion of responders with positive test increased significantly over time. 

2. Assess whether there is a difference in the rate of change in test positivity between responders and non responders, to be able to come up with an answer to the following question: Is increase in test positivity over time statistically different between responders and non-responders?

 

Would a mixed model fit better here? how would yo construct that? 

This is how the data is stored (1 denotes positive):

 

Patient Test_time1 Test_time2 Test_time3 Test_time4 Treatment response
1 0 0 0 1 1
2 0 0 1 1 1
3 1 0 1 1 0

 

or as long data:

Patient Response_group Test_Time Test_result
1 1 1 0
1 1 2 0
1 1 3 0
1 1 4 1
2 0 1 0
2 0 2 0
2 0 3 1
2 0 4 1
3 1 1 1
3 1 2 0
3 1 3 1
3 1 4 1

 

 

My thoughts for the first question:  hierarchal logistic regression or proc freq with trend:

proc freq data=have;
tables test_time*test_result/trend;
run;

proc glimmix data=have;
class test_time test_result;
model test_result(event=1)=test_time/ dist=binary link=logit ddfm=bw solution;
random intercept / subject=patient solution;
run;

 

 

For the second question, I am thinking an interaction term:

proc glimmix data=have; 
class test_time test_result response_group;
model test_result(event=1)=test_time response_group test_time*response_group/ dist=binary link=logit ddfm=bw solution;
random intercept / subject=patient solution;
run; 

 

Is this correct? any other alternatives or suggestion will be much appreciated

I really appreciate your time and help with this. I am really stuck with this. 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

Both GLIMMIX approaches look reasonable, although I would consider adding an R-side term to model correlation over time.  Something like:

 

proc glimmix data=have;
class test_time test_result;
model test_result(event=1)=test_time/ dist=binary link=logit ddfm=bw solution;
random intercept / subject=patient solution;
random test_time/residual subject=patient type=ar(1) ilink;
run;

For the second question, code would look like:

 

proc glimmix data=have; 
class test_time test_result response_group;
model test_result(event=1)=test_time response_group test_time*response_group/ dist=binary link=logit ddfm=bw solution;
random intercept / subject=patient solution;
random test_time/residual subject=patient type=ar(1) ilink;
run; 

I realize that there are no true "residuals" for a binary variable, but this approach was shown to work well in the 2020 paper by Stroup and Claassen.

 

SteveDenham

 

 

 

View solution in original post

2 REPLIES 2
SteveDenham
Jade | Level 19

Both GLIMMIX approaches look reasonable, although I would consider adding an R-side term to model correlation over time.  Something like:

 

proc glimmix data=have;
class test_time test_result;
model test_result(event=1)=test_time/ dist=binary link=logit ddfm=bw solution;
random intercept / subject=patient solution;
random test_time/residual subject=patient type=ar(1) ilink;
run;

For the second question, code would look like:

 

proc glimmix data=have; 
class test_time test_result response_group;
model test_result(event=1)=test_time response_group test_time*response_group/ dist=binary link=logit ddfm=bw solution;
random intercept / subject=patient solution;
random test_time/residual subject=patient type=ar(1) ilink;
run; 

I realize that there are no true "residuals" for a binary variable, but this approach was shown to work well in the 2020 paper by Stroup and Claassen.

 

SteveDenham

 

 

 

StatDave
SAS Super FREQ

That seems like a reasonable approach, but if you want to make inferences at the population level rather than at the individual level, you might want to use PROC GEE and its REPEATED statement to fit similar GEE models. The GEE model is a population-averaged model. The GLIMMIX random effects model is a subject-specific model. I do wonder about the nature of your test and clinically-assessed group variables. If the test is also making some determination about response to treatment, similar to the clinical assessment, then I'm surprised that the question is not more about the agreement of the two. But perhaps you have already addressed the agreement question.

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
  • 2 replies
  • 1455 views
  • 2 likes
  • 3 in conversation