<?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: MMRM and Pooled Cohort in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/MMRM-and-Pooled-Cohort/m-p/700906#M33815</link>
    <description>&lt;P&gt;We'll need some clarification.&amp;nbsp; It seems you have an ESTIMATE statement that gives you an answer to your Goal(2), so I suspect you want something more.&amp;nbsp; Is that a comparison of placebo vs. pooled treatments at each time point?&amp;nbsp; That would require knowing how many timepoints, but otherwise is a perfect case for using an LSMESTIMATE statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
    <pubDate>Mon, 23 Nov 2020 14:03:51 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2020-11-23T14:03:51Z</dc:date>
    <item>
      <title>MMRM and Pooled Cohort</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/MMRM-and-Pooled-Cohort/m-p/700722#M33804</link>
      <description>&lt;P&gt;Suppose have 3 Treatment Group, Placebo (1), Group A with Dose 10mg, Group B with Dose 20mg.&lt;/P&gt;&lt;P&gt;Study duration: Baseline (Day 1), Week 4, Week 8, Week 12.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Goal: 1) compare the change from baseline across visits among treatments separately&amp;nbsp;2) compare the change from baseline across different visits among (placebo) VS. (combined Group A &amp;amp; B)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When using PROC MIXED model, "lsmeans" can provide result of Goal (1), "estimate" can provide (2); however, I am not very sure how to use "estimate" or "lsmestimate" or "contrast" to get Goal (2)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt;proc mixed data= long;
  class treatment visit;
  model CHG =  Treatment*visit;
  repeated visit / subject=id type=UN ;
  estimate 'placebo vs pool' treatment 1 -0.5 -0.5; 
  lsmeans treatment*visit/ slice=visit; /*differences in exertype for each time point*/
run;&lt;/STRONG&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Nov 2020 02:08:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/MMRM-and-Pooled-Cohort/m-p/700722#M33804</guid>
      <dc:creator>yw2757</dc:creator>
      <dc:date>2020-11-22T02:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: MMRM and Pooled Cohort</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/MMRM-and-Pooled-Cohort/m-p/700906#M33815</link>
      <description>&lt;P&gt;We'll need some clarification.&amp;nbsp; It seems you have an ESTIMATE statement that gives you an answer to your Goal(2), so I suspect you want something more.&amp;nbsp; Is that a comparison of placebo vs. pooled treatments at each time point?&amp;nbsp; That would require knowing how many timepoints, but otherwise is a perfect case for using an LSMESTIMATE statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 14:03:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/MMRM-and-Pooled-Cohort/m-p/700906#M33815</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-11-23T14:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: MMRM and Pooled Cohort</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/MMRM-and-Pooled-Cohort/m-p/700921#M33819</link>
      <description>&lt;P&gt;Adding the /e option to your LSMEANS statement is always a good idea when you are unsure of the hypothesis you are testing with your ESTIMATE (or CONTRAST) statement. The hypothesis tested by LSMEANS is a test of a linear combination of the paramter estimates in the model, achieved by the vector multiplication of two vectors L*B. B is the vector of the paramter estimates (which you can see by adding the /s option to the MODEL statement). L is the vector of coefficients as specified on the ESTIMATE statement (seen by adding that /e option).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This&amp;nbsp;&amp;nbsp;&lt;A href="https://support.sas.com/kb/24/447.html" target="_blank"&gt;https://support.sas.com/kb/24/447.html&lt;/A&gt;&amp;nbsp;gives lots of examples of writing contrasts and estimates.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many estimates are more easily constructed if you take a linear combination of the LSMEANS, instead of the model parameters. As&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15363"&gt;@SteveDenham&lt;/a&gt;&amp;nbsp;pointed out, that can be achieved through the LSMESTIMATE statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 14:49:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/MMRM-and-Pooled-Cohort/m-p/700921#M33819</guid>
      <dc:creator>StatsMan</dc:creator>
      <dc:date>2020-11-23T14:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: MMRM and Pooled Cohort</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/MMRM-and-Pooled-Cohort/m-p/701050#M33825</link>
      <description>&lt;P&gt;"&lt;SPAN&gt;&amp;nbsp;Is that a comparison of placebo vs. pooled treatments at each time point?&lt;/SPAN&gt;" is the questions I wish to ask how to use "lsmestimate"&lt;/P&gt;&lt;P&gt;Confused how to set the coefficients&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 20:51:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/MMRM-and-Pooled-Cohort/m-p/701050#M33825</guid>
      <dc:creator>yw2757</dc:creator>
      <dc:date>2020-11-23T20:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: MMRM and Pooled Cohort</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/MMRM-and-Pooled-Cohort/m-p/701208#M33830</link>
      <description>&lt;P&gt;In the absence of real data, simulated data can come in handy. The code below simulates data that looks like the situation you have and runs a mixed model similar to yours.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data test;&lt;BR /&gt;call streaminit(56340);&lt;BR /&gt;do id=1 to 100;&lt;BR /&gt;trt=ceil(rand("uniform")*3);&lt;BR /&gt;base=rand("uniform");&lt;BR /&gt;do time=1 to 3;&lt;BR /&gt;y=trt*time*rand("uniform")-base;&lt;BR /&gt;output;&lt;BR /&gt;end; end;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;proc mixed data=test;&lt;BR /&gt;class trt time;&lt;BR /&gt;model y=trt time trt*time;&lt;BR /&gt;repeated time / subject=id type=un;&lt;BR /&gt;lsmeans trt*time / slice=time;&lt;BR /&gt;lsmestimate trt*time 1 -.5 -.5 / e;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The LSMESTIMATE statement above is our first attempt at comparing the result of the placebo (treatment 1) to the pooled result of the two active treatments (treatments 2 and 3) at time point 1. The /e option will help us see if we got the coefficients right:&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="StatsMan_0-1606221810681.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51961iFA22EDF87CACA609/image-size/medium?v=v2&amp;amp;px=400" role="button" title="StatsMan_0-1606221810681.png" alt="StatsMan_0-1606221810681.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Looking at the results of the /e option, it appears that we did not set up the coefficients correctly. The comparison here is within the first level of treatment, comparing the result at time 1 to the pooled result at times 2 and 3. That is not what we had in mind. Let's change the coefficients on the LSMESTIMATE statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;proc mixed data=test;&lt;BR /&gt;class trt time;&lt;BR /&gt;model y=trt time trt*time;&lt;BR /&gt;repeated time / subject=id type=un;&lt;BR /&gt;lsmeans trt*time / slice=time;&lt;BR /&gt;lsmestimate trt*time 1 0 0 -.5 0 0 -.5 0 0 / e;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now the /e option shows which paramters we are combining:&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="StatsMan_1-1606222057330.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51962iDCE8FEF1034BF2F2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="StatsMan_1-1606222057330.png" alt="StatsMan_1-1606222057330.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Now we can see that we have a 1 next to the lsmean for trt 1 and time 1, and -.5 next to the lsmeans for trt 2, time 1 and trt 3, time 1. These coefficients line up with the comparison we want, comparing trt 1 to the pooled result of trt 2 and 3 at time point 1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can verify the result algebraically too. If you look at the output of the LSMEANS table:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="StatsMan_2-1606222284694.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51963iE2AB1C4E7D3B377B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="StatsMan_2-1606222284694.png" alt="StatsMan_2-1606222284694.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;We wish to compare the lsmean for trt 1 at time 1 to the pooled result of trt 2 and trt 3 at time 1. That would be .04008 - (.7140+1.3651)/2 = -.9995, the result we get from the LSMESTIMATE statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 12:54:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/MMRM-and-Pooled-Cohort/m-p/701208#M33830</guid>
      <dc:creator>StatsMan</dc:creator>
      <dc:date>2020-11-24T12:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: MMRM and Pooled Cohort</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/MMRM-and-Pooled-Cohort/m-p/701212#M33831</link>
      <description>&lt;P&gt;This is really helpful and exactly I am looking for.&lt;/P&gt;&lt;P&gt;Really appreciate!&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 13:21:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/MMRM-and-Pooled-Cohort/m-p/701212#M33831</guid>
      <dc:creator>yw2757</dc:creator>
      <dc:date>2020-11-24T13:21:08Z</dc:date>
    </item>
  </channel>
</rss>

