<?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: Match Sample without replacement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Match-Sample-without-replacement/m-p/687062#M208566</link>
    <description>&lt;P&gt;The significant difference is not surprising, since you are minimysing the square of differences. If the treatment group is significantly greater or lower than the control group, you will find the same trend in matched pairs.&lt;/P&gt;</description>
    <pubDate>Sun, 27 Sep 2020 20:10:32 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2020-09-27T20:10:32Z</dc:date>
    <item>
      <title>Match Sample without replacement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Match-Sample-without-replacement/m-p/687053#M208558</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have 2 datasets: treatment firms and control firms. I need to match these two datasets based on this equation: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;match error=∑_(k=1)^3〖((c_k^i-c_k^j)/(c_k^i+c_k^j ))〗^2&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;where i=treatment firm, j= control firm, and c_k is one of the three variables: log market capitalization, log volume, and price. I would like to match each test firm with a control firm (without replacement) based on the smallest match error from of the above equation.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here is my sas code:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data control;&lt;BR /&gt;set control;&lt;BR /&gt;rename price_Mean=_price_Mean log_volume=_log_volume log_mrk_cap =_log_mrk_cap;&lt;BR /&gt;k+1;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;if _n_ eq 1 then do;&lt;BR /&gt;if 0 then set control;&lt;BR /&gt;declare hash h(dataset:'control',multidata:'y');&lt;BR /&gt;h.definekey('control pool');&lt;BR /&gt;h.definedata('_price_Mean','_log_volume','_log_mrk_cap','k');&lt;BR /&gt;h.definedone();&lt;BR /&gt;end;&lt;BR /&gt;call missing(of _all_);&lt;BR /&gt;set treatment;&lt;BR /&gt;n=0;&lt;BR /&gt;min=9999999;&lt;BR /&gt;rc=h.find();&lt;BR /&gt;do while(rc=0);&lt;BR /&gt;merror=(((price_Mean-_price_Mean)/(price_Mean+_price_Mean))**2)+(((log_adv-_log_volume)/(log_volume+_log_volume))**2)+(((log_mrk_cap-_log_mrk_cap)/(log_mrk_cap+_log_mrk_cap))**2);&lt;BR /&gt;if merror lt min then do;n=k;min=merror;end;&lt;BR /&gt;rc=h.find_next();&lt;BR /&gt;end;&lt;BR /&gt;rc=h.find();&lt;BR /&gt;do while(rc=0);&lt;BR /&gt;if n=k then do;h.removedup();leave;end;&lt;BR /&gt;rc=h.find_next();&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My problem that I'm having is that once I test the difference between the two groups by each criteria variable, they are significantly different. However, I know this could just be natural by the experiment I'm running but I want to make sure that it is not the result of the code.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any comments or help would be appreciated. Thank you,&lt;/P&gt;&lt;P&gt;Best, Donovan&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Sep 2020 18:38:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Match-Sample-without-replacement/m-p/687053#M208558</guid>
      <dc:creator>dowen</dc:creator>
      <dc:date>2020-09-27T18:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: Match Sample without replacement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Match-Sample-without-replacement/m-p/687062#M208566</link>
      <description>&lt;P&gt;The significant difference is not surprising, since you are minimysing the square of differences. If the treatment group is significantly greater or lower than the control group, you will find the same trend in matched pairs.&lt;/P&gt;</description>
      <pubDate>Sun, 27 Sep 2020 20:10:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Match-Sample-without-replacement/m-p/687062#M208566</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2020-09-27T20:10:32Z</dc:date>
    </item>
  </channel>
</rss>

