<?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 sample with control group on size and industry in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Matching-sample-with-control-group-on-size-and-industry/m-p/480273#M124115</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to do a 1 to 1 match. I did it the following way. The results were&amp;nbsp;2721 matches which I am confused about since my control observations are over 400,000 and trying to get one match for each of my 7,000 observations in my sample. Can anyone help me figure it out. Ultimately there should be 7,000 matches so there is a total of 14,000 individual observations.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my data has gvkey (company identifier), fyear (fiscal year), sic (industry), TA (total assets)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table want as&lt;BR /&gt;select s.*, c.gvkey as match_firm, c.AT as match_assets, c.fyear as match_year&lt;BR /&gt;from sample1 as s inner join control1 as c&lt;BR /&gt;on s.sic=c.sic&lt;BR /&gt;where c.gvkey ne s.gvkey&lt;BR /&gt;group by s.gvkey&lt;BR /&gt;having abs(s.AT-c.AT) = min(abs(s.AT-c.AT));&lt;BR /&gt;select * from want;&lt;BR /&gt;quit;&lt;/P&gt;</description>
    <pubDate>Sun, 22 Jul 2018 21:25:57 GMT</pubDate>
    <dc:creator>dlazer1</dc:creator>
    <dc:date>2018-07-22T21:25:57Z</dc:date>
    <item>
      <title>Matching sample with control group on size and industry</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Matching-sample-with-control-group-on-size-and-industry/m-p/480273#M124115</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to do a 1 to 1 match. I did it the following way. The results were&amp;nbsp;2721 matches which I am confused about since my control observations are over 400,000 and trying to get one match for each of my 7,000 observations in my sample. Can anyone help me figure it out. Ultimately there should be 7,000 matches so there is a total of 14,000 individual observations.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my data has gvkey (company identifier), fyear (fiscal year), sic (industry), TA (total assets)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table want as&lt;BR /&gt;select s.*, c.gvkey as match_firm, c.AT as match_assets, c.fyear as match_year&lt;BR /&gt;from sample1 as s inner join control1 as c&lt;BR /&gt;on s.sic=c.sic&lt;BR /&gt;where c.gvkey ne s.gvkey&lt;BR /&gt;group by s.gvkey&lt;BR /&gt;having abs(s.AT-c.AT) = min(abs(s.AT-c.AT));&lt;BR /&gt;select * from want;&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Jul 2018 21:25:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Matching-sample-with-control-group-on-size-and-industry/m-p/480273#M124115</guid>
      <dc:creator>dlazer1</dc:creator>
      <dc:date>2018-07-22T21:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: Matching sample with control group on size and industry</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Matching-sample-with-control-group-on-size-and-industry/m-p/480280#M124117</link>
      <description>&lt;P&gt;Why do you expect 14000 obs and not 7000?&lt;/P&gt;</description>
      <pubDate>Sun, 22 Jul 2018 21:51:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Matching-sample-with-control-group-on-size-and-industry/m-p/480280#M124117</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-07-22T21:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: Matching sample with control group on size and industry</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Matching-sample-with-control-group-on-size-and-industry/m-p/480285#M124119</link>
      <description>&lt;P&gt;I expect 7000 matches so 14,000 total observations ---- 7000 from my sample and 7000 from the control. Regardless, it doesnt make sense to have less than half.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Jul 2018 22:01:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Matching-sample-with-control-group-on-size-and-industry/m-p/480285#M124119</guid>
      <dc:creator>dlazer1</dc:creator>
      <dc:date>2018-07-22T22:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: Matching sample with control group on size and industry</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Matching-sample-with-control-group-on-size-and-industry/m-p/480287#M124120</link>
      <description>&lt;P&gt;Possible causes that I can think of&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many sic have a single gvkey in the control dataset&lt;/P&gt;
&lt;P&gt;Many AT values are missing in the sample dataset&lt;/P&gt;
&lt;P&gt;Some sic in the sample do not occur in the control dataset&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if none of those apply, I'm as puzzled as you are.&lt;/P&gt;</description>
      <pubDate>Sun, 22 Jul 2018 22:14:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Matching-sample-with-control-group-on-size-and-industry/m-p/480287#M124120</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-07-22T22:14:52Z</dc:date>
    </item>
  </channel>
</rss>

