<?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: How to calculate the 95%CI, Means difference in MMRM (PROC MIXED) in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-the-95-CI-Means-difference-in-MMRM-PROC-MIXED/m-p/891554#M44187</link>
    <description>&lt;P&gt;With one subject per treatment group, you are going to have a difficult time estimating the things you want to estimate here. Data deficiencies will be a problem in fitting even the simplest of models.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you can get something to converge without errors or warnings, then if you want to compare the baseline to the average of the two treatment groups, use a CONTRAST or LSMESTIMATE statement to get that test.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Aug 2023 16:24:40 GMT</pubDate>
    <dc:creator>StatsMan</dc:creator>
    <dc:date>2023-08-29T16:24:40Z</dc:date>
    <item>
      <title>How to calculate the 95%CI, Means difference in MMRM (PROC MIXED)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-the-95-CI-Means-difference-in-MMRM-PROC-MIXED/m-p/891266#M44166</link>
      <description>&lt;P&gt;&amp;nbsp;I am new to this MMRM stats procedure; I need help figuring out certain things.&lt;/P&gt;
&lt;P&gt;In my data, I have the 3 subjects who took&amp;nbsp; 3 treatments and records over 3 visits (+ Baseline). I need the following statistics&lt;/P&gt;
&lt;P&gt;a. 95% CI for the Means for all the treatments&lt;/P&gt;
&lt;P&gt;b. Difference in Means ( between the Drugs and Control)&lt;/P&gt;
&lt;P&gt;C. The same stats are presented in&amp;nbsp; (a, b) for overall combined 'Drug treatments' that is 95% CI for&amp;nbsp; 'OVERALL' and difference in Means for 'Overall Vs. Control'. When I include the 'overall' treatment in the procedure, it generates no stats. So, I excluded it from my code to run.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not sure, I am using the right method&amp;nbsp; do I need to&amp;nbsp; run the 'Overall" treatment (999) separately or&amp;nbsp; is there any way I can do&amp;nbsp; 'Overall Vs Control" with in the same code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I output the lsmeans and diffs data sets from the 'PROC MIXED" procedure, but I am unsure how to pull the required information out since there are so many records I couldn't see what value represents which interactions. I appreciate your help.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data have;
	input sid$ visit$ visitnum test$ aval base chg pchg treatn treat$;
	datalines;
101 Baseline 0.5 blood 20 20 .  .    1 Control
101 Visit1   1   blood 30 20 10 50   1 Control
101 Visit2   2   blood 20 20 0  0    1 Control
101 Visit3   3   blood 43 25 18 41.8 2 Control
201 Baseline 0.5 blood 20 20 .  .    2 Drug_A
201 Visit1 	 1   blood 45 25 20 62.5 2 Drug_A
201 Visit2   2   blood 27 20 7  25.9 2 Drug_A
201 Visit3   3   blood 27 20 7  25.9 2 Drug_A
301 Baseline 0.5 blood 20 20 .  .    3 Drug_B
301 Visit1   1   blood 50 20 30 60   3 Drug_B
301 Visit2   2   blood 44 20 24 54.5 3 Drug_B
301 Visit3   3   blood 67 25 42 62.7 3 Drug_B

data have1;
set have (in=a) have(in=b where =(treatn ne 1));
 if b then do;
 	treatn =999;
	treat = 'Overall';
 end;
run;


/*ODS to create the data set containing all the means. */ 

proc sort data = have1; by test sid visitnum; run;

ods output LSMeans=LSmean1 diffs= mean_df;
proc mixed data=have1;
by test;
  where chg ne .  and treatn ne 999;
  class treatn visitnum sid;
  model chg =  treatn visitnum treatn*visitnum;
  repeated visitnum / subject=sid type=UN;
  lsmeans treatn*visitnum/pdiff cl;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Aug 2023 20:16:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-the-95-CI-Means-difference-in-MMRM-PROC-MIXED/m-p/891266#M44166</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2023-08-27T20:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the 95%CI, Means difference in MMRM (PROC MIXED)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-the-95-CI-Means-difference-in-MMRM-PROC-MIXED/m-p/891554#M44187</link>
      <description>&lt;P&gt;With one subject per treatment group, you are going to have a difficult time estimating the things you want to estimate here. Data deficiencies will be a problem in fitting even the simplest of models.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you can get something to converge without errors or warnings, then if you want to compare the baseline to the average of the two treatment groups, use a CONTRAST or LSMESTIMATE statement to get that test.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 16:24:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-the-95-CI-Means-difference-in-MMRM-PROC-MIXED/m-p/891554#M44187</guid>
      <dc:creator>StatsMan</dc:creator>
      <dc:date>2023-08-29T16:24:40Z</dc:date>
    </item>
  </channel>
</rss>

