<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Test for change in proportions over time in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Test-for-change-in-proportions-over-time/m-p/755970#M36816</link>
    <description>&lt;P&gt;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.&lt;/P&gt;</description>
    <pubDate>Thu, 22 Jul 2021 15:01:09 GMT</pubDate>
    <dc:creator>StatDave</dc:creator>
    <dc:date>2021-07-22T15:01:09Z</dc:date>
    <item>
      <title>Test for change in proportions over time</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Test-for-change-in-proportions-over-time/m-p/755903#M36808</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;I have a group of patients being given a treatment. All have the same disease and recieve the same treatment.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These patients are assessed at 4 different time points using a test, this test returns a binary results (positive or negative).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ammarhm_0-1626949473304.jpeg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/61577iCE3F0426323C111E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ammarhm_0-1626949473304.jpeg" alt="ammarhm_0-1626949473304.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ammarhm_1-1626949473305.jpeg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/61578i6ED4AD3C06FC757A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ammarhm_1-1626949473305.jpeg" alt="ammarhm_1-1626949473305.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, in those who were non-responders, the&amp;nbsp; proportion returning a positive test increased to a lesser extent over time.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I want to do statistically is two different things:&lt;/P&gt;
&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would a mixed model fit better here? how would yo construct that?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is how the data is stored (1 denotes positive):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 455pt;" border="0" width="605px" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 16.0pt;"&gt;
&lt;TD width="99px" height="21" style="height: 16.0pt; width: 65pt;"&gt;Patient&lt;/TD&gt;
&lt;TD width="102px" class="xl65" style="width: 65pt;"&gt;&lt;A href="mailto:Test@time1" target="_blank" rel="noopener"&gt;Test_time1&lt;/A&gt;&lt;/TD&gt;
&lt;TD width="101px" class="xl65" style="width: 65pt;"&gt;&lt;A href="mailto:Test@time1" target="_blank" rel="noopener"&gt;Test_time2&lt;/A&gt;&lt;/TD&gt;
&lt;TD width="102px" class="xl65" style="width: 65pt;"&gt;&lt;A href="mailto:Test@time1" target="_blank" rel="noopener"&gt;Test_time3&lt;/A&gt;&lt;/TD&gt;
&lt;TD width="102px" class="xl65" style="width: 65pt;"&gt;&lt;A href="mailto:Test@time1" target="_blank" rel="noopener"&gt;Test_time4&lt;/A&gt;&lt;/TD&gt;
&lt;TD width="99px" style="width: 65pt;"&gt;Treatment response&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 16.0pt;"&gt;
&lt;TD width="99px" height="21" align="right" style="height: 16.0pt;"&gt;1&lt;/TD&gt;
&lt;TD width="102px" align="right"&gt;0&lt;/TD&gt;
&lt;TD width="101px" align="right"&gt;0&lt;/TD&gt;
&lt;TD width="102px" align="right"&gt;0&lt;/TD&gt;
&lt;TD width="102px" align="right"&gt;1&lt;/TD&gt;
&lt;TD width="99px" align="right"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 16.0pt;"&gt;
&lt;TD width="99px" height="21" align="right" style="height: 16.0pt;"&gt;2&lt;/TD&gt;
&lt;TD width="102px" align="right"&gt;0&lt;/TD&gt;
&lt;TD width="101px" align="right"&gt;0&lt;/TD&gt;
&lt;TD width="102px" align="right"&gt;1&lt;/TD&gt;
&lt;TD width="102px" align="right"&gt;1&lt;/TD&gt;
&lt;TD width="99px" align="right"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 16.0pt;"&gt;
&lt;TD width="99px" height="21" align="right" style="height: 16.0pt;"&gt;3&lt;/TD&gt;
&lt;TD width="102px" align="right"&gt;1&lt;/TD&gt;
&lt;TD width="101px" align="right"&gt;0&lt;/TD&gt;
&lt;TD width="102px" align="right"&gt;1&lt;/TD&gt;
&lt;TD width="102px" align="right"&gt;1&lt;/TD&gt;
&lt;TD width="99px" align="right"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or as long data:&lt;/P&gt;
&lt;TABLE width="396"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="87"&gt;Patient&lt;/TD&gt;
&lt;TD width="135"&gt;Response_group&lt;/TD&gt;
&lt;TD width="87"&gt;Test_Time&lt;/TD&gt;
&lt;TD width="87"&gt;Test_result&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;2&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;3&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;4&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2&lt;/TD&gt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;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;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;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the second question,&amp;nbsp;I am thinking an interaction term:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;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; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;Is this correct? any other alternatives or suggestion will be much appreciated&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;I really appreciate your time and help with this. I am really stuck with this.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 11:32:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Test-for-change-in-proportions-over-time/m-p/755903#M36808</guid>
      <dc:creator>ammarhm</dc:creator>
      <dc:date>2021-07-22T11:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: Test for change in proportions over time</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Test-for-change-in-proportions-over-time/m-p/755959#M36815</link>
      <description>&lt;P&gt;Both GLIMMIX approaches look reasonable, although I would consider adding an R-side term to model correlation over time.&amp;nbsp; Something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;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;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For the second question, code would look like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;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; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 14:37:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Test-for-change-in-proportions-over-time/m-p/755959#M36815</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2021-07-22T14:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: Test for change in proportions over time</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Test-for-change-in-proportions-over-time/m-p/755970#M36816</link>
      <description>&lt;P&gt;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.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 15:01:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Test-for-change-in-proportions-over-time/m-p/755970#M36816</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2021-07-22T15:01:09Z</dc:date>
    </item>
  </channel>
</rss>

