<?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 Matching with Replacement - support region does not exist in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Matching-with-Replacement-support-region-does-not-exist/m-p/832548#M329074</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I wrote the code for&amp;nbsp;Matching with Replacement as in the following&amp;nbsp; Example 98.6 from the&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/titlepage.htm" target="_blank" rel="noopener"&gt;SAS User's Guide:&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;proc psmatch data=School region=allobs(psmin=0.05);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&amp;nbsp;&amp;nbsp; class Music Gender;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&amp;nbsp;&amp;nbsp; psmodel Music(Treated='Yes')= Gender Absence;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&amp;nbsp;&amp;nbsp; match method=replace(k=1) distance=ps exact=Gender caliper=.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nmatchmost=6;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&amp;nbsp;&amp;nbsp; assess ps var=(Gender Absence);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&amp;nbsp;&amp;nbsp; output out(obs=match)=outex6 matchid=_MatchID;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;run;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;and I get the error message:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;ERROR: The support region does not exist.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try to change the region to&amp;nbsp;psmin=0.01 or&amp;nbsp;psmin=0.001 but I keep getting the same error message.&lt;/P&gt;&lt;P&gt;Could anyone please advise what I'm doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Lior&lt;/P&gt;</description>
    <pubDate>Fri, 09 Sep 2022 17:42:31 GMT</pubDate>
    <dc:creator>lioradam</dc:creator>
    <dc:date>2022-09-09T17:42:31Z</dc:date>
    <item>
      <title>Matching with Replacement - support region does not exist</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Matching-with-Replacement-support-region-does-not-exist/m-p/832548#M329074</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I wrote the code for&amp;nbsp;Matching with Replacement as in the following&amp;nbsp; Example 98.6 from the&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/titlepage.htm" target="_blank" rel="noopener"&gt;SAS User's Guide:&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;proc psmatch data=School region=allobs(psmin=0.05);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&amp;nbsp;&amp;nbsp; class Music Gender;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&amp;nbsp;&amp;nbsp; psmodel Music(Treated='Yes')= Gender Absence;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&amp;nbsp;&amp;nbsp; match method=replace(k=1) distance=ps exact=Gender caliper=.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nmatchmost=6;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&amp;nbsp;&amp;nbsp; assess ps var=(Gender Absence);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&amp;nbsp;&amp;nbsp; output out(obs=match)=outex6 matchid=_MatchID;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;run;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;and I get the error message:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;ERROR: The support region does not exist.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try to change the region to&amp;nbsp;psmin=0.01 or&amp;nbsp;psmin=0.001 but I keep getting the same error message.&lt;/P&gt;&lt;P&gt;Could anyone please advise what I'm doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Lior&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 17:42:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Matching-with-Replacement-support-region-does-not-exist/m-p/832548#M329074</guid>
      <dc:creator>lioradam</dc:creator>
      <dc:date>2022-09-09T17:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: Matching with Replacement - support region does not exist</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Matching-with-Replacement-support-region-does-not-exist/m-p/832573#M329081</link>
      <description>&lt;P&gt;It ran fine when I created the school dataset using the code referenced in the example.&amp;nbsp; see here&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_code_psmchex4.htm" target="_self"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_code_psmchex4.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 19:47:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Matching-with-Replacement-support-region-does-not-exist/m-p/832573#M329081</guid>
      <dc:creator>ghosh</dc:creator>
      <dc:date>2022-09-09T19:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: Matching with Replacement - support region does not exist</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Matching-with-Replacement-support-region-does-not-exist/m-p/832604#M329103</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In my data, it didn't work...&lt;/P&gt;&lt;P&gt;I thought that if I reduce the "&lt;SPAN&gt;psmin"&amp;nbsp; to be close to zero, I should avoid this error message, but it didn't work...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;when I use a different type of matching: "&lt;/SPAN&gt;Greedy Nearest Neighbor Matching" it works fine. so I believe there is no problem with my data, but maybe I don't understand how code works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Lior&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Sep 2022 05:48:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Matching-with-Replacement-support-region-does-not-exist/m-p/832604#M329103</guid>
      <dc:creator>lioradam</dc:creator>
      <dc:date>2022-09-10T05:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: Matching with Replacement - support region does not exist</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Matching-with-Replacement-support-region-does-not-exist/m-p/832657#M329132</link>
      <description>&lt;P&gt;I ran your code after creating the school dataset from the example and did not get any errors&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
&lt;/CODE&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ghosh_0-1662825726201.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75115i21A83824F009A0B6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ghosh_0-1662825726201.png" alt="ghosh_0-1662825726201.png" /&gt;&lt;/span&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data School;
   Music= 'Yes';
   do j=1 to 60;
      if (ranuni(1312) &amp;gt; 0.4) then Gender='Female';
      else                         Gender='Male';

      Absence = ranexp(99);
      if (Absence &amp;lt; 0.5) then GPA= 4 + rannor(99)/3.5;
      else                    GPA= 4 - abs(rannor(99)/3.5);

      if (Gender='Female') then GPA= GPA + 0.02;

      id1= ranuni(99);
      id2= ranuni(99);
      output;
   end;

   Music= 'No';
   do j=1 to 100;

      Absence= ranexp(99);
      if (ranuni(99) &amp;gt; 0.45) then Gender='Female';
      else                        Gender='Male';
      if (Absence &amp;lt; 0.5) then GPA= 4 + rannor(99)/4.2;
      else                    GPA= 4 - abs(rannor(99)/4.2);

      id1= ranuni(99);
      id2= ranuni(99);
      output;
   end;

   do j=1 to 40;
      Absence= 2 + ranexp(99);
      if (ranuni(99) &amp;gt; 0.5) then Gender='Female';
      else                       Gender='Male';

      GPA= 3.4 - abs(rannor(99)/4.2);

      id1= ranuni(99);
      id2= ranuni(99);
      output;
   end;
run;

proc sort data=school;
   by id1;
run;

data school;
   set school;
   StudentID= _n_;
   Absence= int(Absence*100+0.5) / 100;
   GPA= int(GPA*100+0.5) / 100;
run;

proc sort data=school;
   by id2;
run;

proc print data=School(obs=10);
   var StudentID Music Gender Absence;
run;

proc psmatch data=School region=allobs(psmin=0.05);
   class Music Gender;
   psmodel Music(Treated='Yes')= Gender Absence;
   match method=replace(k=1) distance=ps exact=Gender caliper=.
         nmatchmost=6;
   assess ps var=(Gender Absence);
   output out(obs=match)=outex6 matchid=_MatchID;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Sep 2022 16:04:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Matching-with-Replacement-support-region-does-not-exist/m-p/832657#M329132</guid>
      <dc:creator>ghosh</dc:creator>
      <dc:date>2022-09-10T16:04:42Z</dc:date>
    </item>
  </channel>
</rss>

