<?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: Help with exact matching in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Help-with-exact-matching/m-p/895905#M353970</link>
    <description>&lt;P&gt;Would you consider to use the propensity score matching?&lt;/P&gt;&lt;P&gt;According to your statement, I think that using proc psmatch might be helpful.&lt;/P&gt;&lt;P&gt;For example:&amp;nbsp;&lt;/P&gt;&lt;PRE class=""&gt;proc psmatch data=drugs region=cs;
   class Drug Gender;
   psmodel Drug(Treated='Drug_X')= Gender Age Bmi;
   match method=exact(k=5) exact=Gender stat=lps caliper=0.25;
   assess lps var=(Gender Age Bmi) / weight=none plots=(boxplot barchart);
   output out(obs=match)=Outgs lps=_Lps matchid=_MatchID;&lt;/PRE&gt;&lt;P&gt;In the match statement, you can assign method=exact, k=5 for your situation.&lt;/P&gt;</description>
    <pubDate>Tue, 26 Sep 2023 14:16:39 GMT</pubDate>
    <dc:creator>adam633_SAS</dc:creator>
    <dc:date>2023-09-26T14:16:39Z</dc:date>
    <item>
      <title>Help with exact matching</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-exact-matching/m-p/895886#M353953</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;I have a data set with 134 people in the treatment group and 17.000 people in the potential statistical control group.&lt;/P&gt;
&lt;P&gt;I want to do exact matching, where each person in the treatment group gets 5 exact matches from the control group.&lt;/P&gt;
&lt;P&gt;My problem is that I want to include the persons status in the month they began treatment in the matching, but the control group doesn't have a start month, because they didn't receive treatment. So I want each treated persons 5 matches to be assigned the same "start month", so I compare their statuses at the same time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem is that I only learn the control groups start month after they have been matches to a specific treated person. But I can't do the matching, unless I know at what month to look at the control group's status. So it's a bit of a conundrum.&lt;/P&gt;
&lt;P&gt;I'm thinking it must be some kind of macro where I look at each person in the treatment group one at a time, find all their matches (without the status), look at their status on the treated person's start month, and assign 5 matches who have the same status at the same time. And then do the same for de other 133 people, one at a time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anyone have experience with this and is able to help me?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks a lot! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 12:36:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-exact-matching/m-p/895886#M353953</guid>
      <dc:creator>niki0209</dc:creator>
      <dc:date>2023-09-26T12:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help with exact matching</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-exact-matching/m-p/895890#M353956</link>
      <description>&lt;P&gt;Please supply usable example data (in a DATA step with DATALINES/CARDS, as shown &lt;A href="https://communities.sas.com/t5/SAS-Programming/How-do-I-vertically-change-value-to-the-one-above/m-p/792517/highlight/true#M253934" target="_blank" rel="noopener"&gt;here&lt;/A&gt;) so we get an idea about your data structure and have something to test code against.&lt;/P&gt;
&lt;P&gt;Please include the expected result of the transformation.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 12:53:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-exact-matching/m-p/895890#M353956</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-09-26T12:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: Help with exact matching</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-exact-matching/m-p/895905#M353970</link>
      <description>&lt;P&gt;Would you consider to use the propensity score matching?&lt;/P&gt;&lt;P&gt;According to your statement, I think that using proc psmatch might be helpful.&lt;/P&gt;&lt;P&gt;For example:&amp;nbsp;&lt;/P&gt;&lt;PRE class=""&gt;proc psmatch data=drugs region=cs;
   class Drug Gender;
   psmodel Drug(Treated='Drug_X')= Gender Age Bmi;
   match method=exact(k=5) exact=Gender stat=lps caliper=0.25;
   assess lps var=(Gender Age Bmi) / weight=none plots=(boxplot barchart);
   output out(obs=match)=Outgs lps=_Lps matchid=_MatchID;&lt;/PRE&gt;&lt;P&gt;In the match statement, you can assign method=exact, k=5 for your situation.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 14:16:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-exact-matching/m-p/895905#M353970</guid>
      <dc:creator>adam633_SAS</dc:creator>
      <dc:date>2023-09-26T14:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help with exact matching</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-exact-matching/m-p/895906#M353971</link>
      <description>&lt;P&gt;The one time I had to do something like this, I started with the distribution of start month from the treatment group.&amp;nbsp; I used that distribution to randomly assign a start month to the control population.&amp;nbsp; Then I used the complete set of characteristics to find matches.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 14:21:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-exact-matching/m-p/895906#M353971</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2023-09-26T14:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help with exact matching</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-exact-matching/m-p/895921#M353978</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;The one time I had to do something like this, I started with the distribution of start month from the treatment group.&amp;nbsp; I used that distribution to randomly assign a start month to the control population.&amp;nbsp; Then I used the complete set of characteristics to find matches.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Depending on how persnickety your reviewer is likely to be, you may want to determine whether start month is at all correlated with other attributes of interest within the treatment group.&amp;nbsp; If so, then the random assignment of start month for control cases might need to take those attributes into account.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 16:22:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-exact-matching/m-p/895921#M353978</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2023-09-26T16:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: Help with exact matching</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-exact-matching/m-p/895923#M353979</link>
      <description>Since you're creating the control groups start month, if you use a greedy algorithm, where once a control is matched it isn't used again, then maybe there is no issue.</description>
      <pubDate>Tue, 26 Sep 2023 16:37:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-exact-matching/m-p/895923#M353979</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-09-26T16:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: Help with exact matching</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-exact-matching/m-p/895924#M353980</link>
      <description>&lt;P&gt;For me, handling correlated independents was part of a class that overwhelmed me and put me to sleep 50 years ago.&amp;nbsp; I leave it to the heavy-duty stats people to sort this one out .&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 16:45:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-exact-matching/m-p/895924#M353980</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2023-09-26T16:45:07Z</dc:date>
    </item>
  </channel>
</rss>

