<?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: Troubleshooting PROC MI differences when trying to replicate in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Troubleshooting-PROC-MI-differences-when-trying-to-replicate/m-p/962630#M48251</link>
    <description>&lt;P&gt;It looks like&amp;nbsp; the order of record has changed between these two datasets.&lt;/P&gt;
&lt;P&gt;Here is an example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data ds;
call streaminit(123);
do n=1 to 100;
 baseline=rand('normal');
 month1=rand('normal');
 month2=rand('normal');
 if n in (10:20 90 98:100) then call missing(baseline);
 if n in (1:4 9 28:30) then call missing(month1);
 if n in (40:50 80:85) then call missing(month2);
 output;
end;
run;

&lt;STRONG&gt;proc sort data=ds out=ds2;
by descending n;
run;&lt;/STRONG&gt;

proc mi data=ds seed=123 nimpute=100 out=out1;
var baseline month1 month2;
run;
proc mi data=ds2 seed=123 nimpute=100 out=out2;
var baseline month1 month2;
run;
proc sort data=out2 out=out22;
by _Imputation_ n;
run;&lt;/PRE&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;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1742953006787.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105632iFAB2A3B3CE1C3103/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1742953006787.png" alt="Ksharp_0-1742953006787.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Mar 2025 01:37:44 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2025-03-26T01:37:44Z</dc:date>
    <item>
      <title>Troubleshooting PROC MI differences when trying to replicate</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Troubleshooting-PROC-MI-differences-when-trying-to-replicate/m-p/962596#M48246</link>
      <description>&lt;P&gt;Hello everyone, I'm currently unable to share data but am running into an issue when I try to replicate results with two different datasets which should be identical when it comes to getting the same imputed values.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Here are the things I've confirmed to match:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The number of observations are the same&lt;/LI&gt;&lt;LI&gt;The values of the observations are the same&lt;/LI&gt;&lt;LI&gt;The same seed is being used in each PROC MI&lt;/LI&gt;&lt;LI&gt;The datasets are being sorted by the same variables prior to running the PROC MI&lt;/LI&gt;&lt;LI&gt;The number of nimpute are the same&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I've compared all of the "Missing Data Patterns" table to fully match with all values, but the imputed values differ.&lt;BR /&gt;Is there any other things to check/change to make sure that might change the values that are being imputed?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!!&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2025 14:38:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Troubleshooting-PROC-MI-differences-when-trying-to-replicate/m-p/962596#M48246</guid>
      <dc:creator>elg</dc:creator>
      <dc:date>2025-03-25T14:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: Troubleshooting PROC MI differences when trying to replicate</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Troubleshooting-PROC-MI-differences-when-trying-to-replicate/m-p/962606#M48247</link>
      <description>&lt;P&gt;It isn't clear what you mean when you say that the data sets are different, but the observations are the same.&amp;nbsp; Can you elaborate what exactly is different and what exactly is the same in the two cases? Also, could you post the two sets of codes you are using?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2025 16:10:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Troubleshooting-PROC-MI-differences-when-trying-to-replicate/m-p/962606#M48247</guid>
      <dc:creator>SAS_Rob</dc:creator>
      <dc:date>2025-03-25T16:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: Troubleshooting PROC MI differences when trying to replicate</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Troubleshooting-PROC-MI-differences-when-trying-to-replicate/m-p/962607#M48248</link>
      <description>&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Sorry for being vague, but they are independently derived datasets from two different people. One uses ADAM standards and another does not.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The code isn't elaborate but the example is like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;proc sort data=ds;&lt;/P&gt;&lt;P&gt;by trt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc mi data=ds seed=123 nimpute=100 output=out;&lt;BR /&gt;by trt;&lt;/P&gt;&lt;P&gt;var baseline week6 week12 week18 week24;&lt;/P&gt;&lt;P&gt;run;&lt;BR /&gt;&lt;BR /&gt;I did try changing variable names (example base vs baseline) and did not see a difference.&lt;BR /&gt;&lt;BR /&gt;The only differences are the imputed values which makes me think there may be something else being sorted or considered. I also narrowed the datasets down to only the variables mentioned above and don't see imputations being different either.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2025 16:36:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Troubleshooting-PROC-MI-differences-when-trying-to-replicate/m-p/962607#M48248</guid>
      <dc:creator>elg</dc:creator>
      <dc:date>2025-03-25T16:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: Troubleshooting PROC MI differences when trying to replicate</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Troubleshooting-PROC-MI-differences-when-trying-to-replicate/m-p/962608#M48249</link>
      <description>&lt;P&gt;To be clear then, the data sets are identical in all the variables--trt,baseline, week6, week12, week18, week24 and in the same order with missing values on the same observations?&lt;/P&gt;
&lt;P&gt;If you can add the SIMPLE option to the MI statement and post its output along with the Missing Data Patterns output, then that might be helpful.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2025 16:44:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Troubleshooting-PROC-MI-differences-when-trying-to-replicate/m-p/962608#M48249</guid>
      <dc:creator>SAS_Rob</dc:creator>
      <dc:date>2025-03-25T16:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: Troubleshooting PROC MI differences when trying to replicate</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Troubleshooting-PROC-MI-differences-when-trying-to-replicate/m-p/962615#M48250</link>
      <description>&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I really dug into this and I am able to replicate now. These were things I updated which I tried separately and didn't see differences, but found things to align when I did the following:&lt;BR /&gt;&lt;BR /&gt;* I created datasets that only contained the variables of interest along with a subject ID&lt;BR /&gt;* I sorted by all variables in the model (trt,baseline, week6, week12, week18, week24) along with a subject ID first&lt;BR /&gt;* There differences of decimal places to the 12th place, so I rounded to .000001 for all values.&lt;BR /&gt;* I renamed all variables to be exactly the same&lt;BR /&gt;&lt;BR /&gt;Would all of these have an effect on the MI values? I tried many of these steps previously and did not see a difference, I guess they all matter together.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2025 18:35:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Troubleshooting-PROC-MI-differences-when-trying-to-replicate/m-p/962615#M48250</guid>
      <dc:creator>elg</dc:creator>
      <dc:date>2025-03-25T18:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: Troubleshooting PROC MI differences when trying to replicate</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Troubleshooting-PROC-MI-differences-when-trying-to-replicate/m-p/962630#M48251</link>
      <description>&lt;P&gt;It looks like&amp;nbsp; the order of record has changed between these two datasets.&lt;/P&gt;
&lt;P&gt;Here is an example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data ds;
call streaminit(123);
do n=1 to 100;
 baseline=rand('normal');
 month1=rand('normal');
 month2=rand('normal');
 if n in (10:20 90 98:100) then call missing(baseline);
 if n in (1:4 9 28:30) then call missing(month1);
 if n in (40:50 80:85) then call missing(month2);
 output;
end;
run;

&lt;STRONG&gt;proc sort data=ds out=ds2;
by descending n;
run;&lt;/STRONG&gt;

proc mi data=ds seed=123 nimpute=100 out=out1;
var baseline month1 month2;
run;
proc mi data=ds2 seed=123 nimpute=100 out=out2;
var baseline month1 month2;
run;
proc sort data=out2 out=out22;
by _Imputation_ n;
run;&lt;/PRE&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;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1742953006787.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105632iFAB2A3B3CE1C3103/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1742953006787.png" alt="Ksharp_0-1742953006787.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Mar 2025 01:37:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Troubleshooting-PROC-MI-differences-when-trying-to-replicate/m-p/962630#M48251</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-03-26T01:37:44Z</dc:date>
    </item>
  </channel>
</rss>

