<?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: Do stement in proc mi in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Do-stement-in-proc-mi/m-p/911529#M40788</link>
    <description>&lt;P&gt;I don't thing PROC MI allows DO loops.&lt;/P&gt;
&lt;P&gt;Are you saying you want generate multiple different MNAR statements?&lt;/P&gt;
&lt;P&gt;I have not idea if that is valid for PROC MI either so first &lt;STRONG&gt;try generating the multiple statements by hand and see if it actually works.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it does then use code generation to create the multiple statements.&lt;/P&gt;
&lt;P&gt;For example you could make a macro so that you can use the macro %DO statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro mnr ;
%local i;
%do i=0 to 60 ;
  mnar adjust(bmi / shift=%sysevalf(&amp;amp;i/10));
%end;
%mend mnr;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Which you could then call using %MNR; where you want the 61 MNR statements generated.&lt;/P&gt;</description>
    <pubDate>Sun, 14 Jan 2024 17:07:00 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2024-01-14T17:07:00Z</dc:date>
    <item>
      <title>Do stement in proc mi</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Do-stement-in-proc-mi/m-p/911527#M40787</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mi data=missing nimpute=2 seed=14823 out=outmi;
      class sex smoking;
        fcs reg(bmi=smoking **bleep**e time sex);
        fcs logistic (smoking=bmi **bleep**e time sex);
      
      	do i = 0 to 6 by 0.1 ;
         mnar adjust( bmi / shift=i);
      	end;
      mnar adjust (smoking/shift=2);
      &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV class="sasSource"&gt;74 do i = 0 to 6 by 0.1 ;&lt;/DIV&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV class="sasError"&gt;__&lt;/DIV&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV class="sasError"&gt;180&lt;/DIV&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV id="sasLogError1_1705248423250" class="sasError"&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/DIV&gt;
&lt;DIV class="sasError"&gt;How can I handle this please?&lt;/DIV&gt;
&lt;DIV class="sasError"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;BR /&gt;&lt;BR /&gt;
      var bmi smoking sex time **bleep**e;
   run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jan 2024 16:14:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Do-stement-in-proc-mi/m-p/911527#M40787</guid>
      <dc:creator>Gilles-Protais</dc:creator>
      <dc:date>2024-01-14T16:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: Do stement in proc mi</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Do-stement-in-proc-mi/m-p/911529#M40788</link>
      <description>&lt;P&gt;I don't thing PROC MI allows DO loops.&lt;/P&gt;
&lt;P&gt;Are you saying you want generate multiple different MNAR statements?&lt;/P&gt;
&lt;P&gt;I have not idea if that is valid for PROC MI either so first &lt;STRONG&gt;try generating the multiple statements by hand and see if it actually works.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it does then use code generation to create the multiple statements.&lt;/P&gt;
&lt;P&gt;For example you could make a macro so that you can use the macro %DO statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro mnr ;
%local i;
%do i=0 to 60 ;
  mnar adjust(bmi / shift=%sysevalf(&amp;amp;i/10));
%end;
%mend mnr;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Which you could then call using %MNR; where you want the 61 MNR statements generated.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jan 2024 17:07:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Do-stement-in-proc-mi/m-p/911529#M40788</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-01-14T17:07:00Z</dc:date>
    </item>
  </channel>
</rss>

