<?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 Impute any value in a given range: add exceptions in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Impute-any-value-in-a-given-range-add-exceptions/m-p/515392#M2911</link>
    <description>&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm running a program to impute some variables and for each variable I have a macro that is used by the core imputation program to define the range of values that are going to be attributed in the imputation procedure, like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro bound_secondary_profession;
&amp;nbsp; &amp;nbsp; LB=1;
&amp;nbsp; &amp;nbsp; UB=9;
%mend;&amp;nbsp;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The problem is that the imputed value of this particular variable must be different from the imputed value of the primary_profession variable and I must specify this restriction within this macro. So far I managed to come up with a solution for extreme values:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro bound_secondary_profession;
&amp;nbsp; &amp;nbsp; LB=1;
&amp;nbsp; &amp;nbsp; UB=9;
&amp;nbsp; &amp;nbsp; IF primary_profession=1 then LB=2;
&amp;nbsp; &amp;nbsp; IF primary_profession=9 then UB=8;
%mend;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But what if primary_profession is equal, let's say 2? How can I impose that the number 2 cannot be chosen, using LB and UB?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is more of a logic challenge rather than a SAS programming challenge, but I've been struggling with this issue for quite some time and I still can't find a way out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your support.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Nov 2018 16:13:00 GMT</pubDate>
    <dc:creator>Luis_Martins</dc:creator>
    <dc:date>2018-11-22T16:13:00Z</dc:date>
    <item>
      <title>Impute any value in a given range: add exceptions</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Impute-any-value-in-a-given-range-add-exceptions/m-p/515392#M2911</link>
      <description>&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm running a program to impute some variables and for each variable I have a macro that is used by the core imputation program to define the range of values that are going to be attributed in the imputation procedure, like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro bound_secondary_profession;
&amp;nbsp; &amp;nbsp; LB=1;
&amp;nbsp; &amp;nbsp; UB=9;
%mend;&amp;nbsp;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The problem is that the imputed value of this particular variable must be different from the imputed value of the primary_profession variable and I must specify this restriction within this macro. So far I managed to come up with a solution for extreme values:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro bound_secondary_profession;
&amp;nbsp; &amp;nbsp; LB=1;
&amp;nbsp; &amp;nbsp; UB=9;
&amp;nbsp; &amp;nbsp; IF primary_profession=1 then LB=2;
&amp;nbsp; &amp;nbsp; IF primary_profession=9 then UB=8;
%mend;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But what if primary_profession is equal, let's say 2? How can I impose that the number 2 cannot be chosen, using LB and UB?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is more of a logic challenge rather than a SAS programming challenge, but I've been struggling with this issue for quite some time and I still can't find a way out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your support.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Nov 2018 16:13:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Impute-any-value-in-a-given-range-add-exceptions/m-p/515392#M2911</guid>
      <dc:creator>Luis_Martins</dc:creator>
      <dc:date>2018-11-22T16:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: Impute any value in a given range: add exceptions</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Impute-any-value-in-a-given-range-add-exceptions/m-p/515396#M2913</link>
      <description>&lt;P&gt;It depends on how you're implementing it in the next portion. If you're using temporary arrays, you can just modify the array if needed or hardcode a condition in.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/242281"&gt;@Luis_Martins&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Greetings,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm running a program to impute some variables and for each variable I have a macro that is used by the core imputation program to define the range of values that are going to be attributed in the imputation procedure, like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro bound_secondary_profession;
&amp;nbsp; &amp;nbsp; LB=1;
&amp;nbsp; &amp;nbsp; UB=9;
%mend;&amp;nbsp;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The problem is that the imputed value of this particular variable must be different from the imputed value of the primary_profession variable and I must specify this restriction within this macro. So far I managed to come up with a solution for extreme values:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro bound_secondary_profession;
&amp;nbsp; &amp;nbsp; LB=1;
&amp;nbsp; &amp;nbsp; UB=9;
&amp;nbsp; &amp;nbsp; IF primary_profession=1 then LB=2;
&amp;nbsp; &amp;nbsp; IF primary_profession=9 then UB=8;
%mend;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But what if primary_profession is equal, let's say 2? How can I impose that the number 2 cannot be chosen, using LB and UB?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is more of a logic challenge rather than a SAS programming challenge, but I've been struggling with this issue for quite some time and I still can't find a way out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much for your support.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Nov 2018 16:19:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Impute-any-value-in-a-given-range-add-exceptions/m-p/515396#M2913</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-11-22T16:19:57Z</dc:date>
    </item>
  </channel>
</rss>

