<?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: Proc surveyselect matched case control in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-surveyselect-matched-case-control/m-p/449403#M69652</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/24022"&gt;@Greek&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Thank you very much for your quick response!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many apologies, I tried posting a picture of the error message, but my company has a very conservative firewall that blocked it. There was no output, SAS EG just disconnected.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Logs are text, so copy text and paste text.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the error is from the OS and not the log, which seems possible in this case, it may be that you are exceeding the output limits of your job. Having such large log entries may be an indication of other issues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest also using a subset of the SAMPSIZE data set so that you are only selecting for a couple of strata and examine the log to see why it is generating so much output.&lt;/P&gt;</description>
    <pubDate>Wed, 28 Mar 2018 15:34:27 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-03-28T15:34:27Z</dc:date>
    <item>
      <title>Proc surveyselect matched case control</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-surveyselect-matched-case-control/m-p/449320#M69649</link>
      <description>&lt;P&gt;Good morning,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to create a matched case/control data set from a case (n=1,646,667) and Control (n=313,552). I have gone through the awesome article called "Simplified Matched Case-Control sampling using proc surveyselect"&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/sugi29/209-29.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi29/209-29.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I have been unable to make it work.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I thought the sample size could be an issue, but the Case part (larger data set) runs fine only with a warning that my log is exceeds the size and needs to close, while the control part&amp;nbsp;(smaller data set) crashes completely. The problems appear during the proc surveyselect part&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have listed my code below which is 99% similar to the one of the article.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anybody have a suspicion of what is happening?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;data control;&lt;BR /&gt;length index $25;&lt;BR /&gt;set HDP_SCRH.c88090_mcc_control ;&lt;BR /&gt;Index=compress(cust_gendr_cd || age_band_cd || zip3 || rx_mms || bio2016 || tmc_band || risk_band || ccm_eng_2016 || ccm_id_2016 &lt;BR /&gt;|| er_band || inp_band || fip_inn_Band || fip_oon_band || fop_inn_Band || fop_oon_band || prof_inn_Band || prof_oon_band);&lt;/P&gt;
&lt;P&gt;length_=length(index);&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC FREQ DATA= Control NOPRINT;&lt;BR /&gt;TABLES INDEX/LIST MISSING OUT=CTRLCNT (/*KEEP=INDEX COUNT*/&lt;BR /&gt;RENAME=(COUNT=CTRLCNT));&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;data Case;&lt;BR /&gt;length index $25;&lt;BR /&gt;set HDP_SCRH.c88090_mcc_CASE;&lt;BR /&gt;Index=compress(cust_gendr_cd || age_band_cd || zip3 || rx_mms || bio2016 || tmc_band || risk_band || ccm_eng_2016 || ccm_id_2016 &lt;BR /&gt;|| er_band || inp_band || fip_inn_Band || fip_oon_band || fop_inn_Band || fop_oon_band || prof_inn_Band || prof_oon_band);&lt;/P&gt;
&lt;P&gt;length_=length(index);&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC FREQ DATA= case NOPRINT;&lt;BR /&gt;TABLES INDEX/LIST MISSING OUT=CASECNT (/*KEEP=INDEX COUNT*/&lt;BR /&gt;RENAME=(COUNT=CASECNT));&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;DATA ALLCOUNT;&lt;BR /&gt; MERGE CASECNT (IN=A) CTRLCNT (IN=B);&lt;BR /&gt; BY INDEX;&lt;BR /&gt; IF CASECNT &amp;gt; 0;&lt;BR /&gt; IF A AND NOT B THEN CTRLCNT = 0;&lt;BR /&gt; _NSIZE_ = MIN(CASECNT,CTRLCNT);&lt;BR /&gt; IF _NSIZE_ GT 0;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;PROC SQL;&lt;BR /&gt;CREATE TABLE ELIGIBLE_CONTROLS AS&lt;BR /&gt;SELECT *&lt;BR /&gt;FROM CASE&lt;BR /&gt;WHERE INDEX IN (SELECT INDEX FROM ALLCOUNT)&lt;BR /&gt;ORDER BY INDEX;&lt;BR /&gt;QUIT;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;PROC SQL;&lt;BR /&gt;CREATE TABLE ELIGIBLE_CASES AS&lt;BR /&gt;SELECT *&lt;BR /&gt;FROM CONTROL&lt;BR /&gt;WHERE INDEX IN (SELECT INDEX FROM ALLCOUNT)&lt;BR /&gt;ORDER BY INDEX;&lt;BR /&gt;QUIT;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;PROC SURVEYSELECT DATA =ELIGIBLE_CASES&lt;BR /&gt; SAMPSIZE = ALLCOUNT&lt;BR /&gt; METHOD = SRS&lt;BR /&gt; SEED=890&lt;BR /&gt; OUT=SELECTED_CASES;&lt;BR /&gt; STRATA INDEX;&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;PROC SURVEYSELECT DATA =ELIGIBLE_CONTROLS&lt;BR /&gt; SAMPSIZE = ALLCOUNT&lt;BR /&gt; METHOD = SRS&lt;BR /&gt; SEED=134&lt;BR /&gt; OUT=SELECTED_CONTROLS;&lt;BR /&gt; STRATA INDEX;&lt;BR /&gt;RUN;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2018 13:56:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-surveyselect-matched-case-control/m-p/449320#M69649</guid>
      <dc:creator>Greek</dc:creator>
      <dc:date>2018-03-28T13:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Proc surveyselect matched case control</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-surveyselect-matched-case-control/m-p/449335#M69650</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/24022"&gt;@Greek&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Good morning,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to create a matched case/control data set from a case (n=1,646,667) and Control (n=313,552). I have gone through the awesome article called "Simplified Matched Case-Control sampling using proc surveyselect"&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/sugi29/209-29.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi29/209-29.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I have been unable to make it work.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I thought the sample size could be an issue, but the Case part (larger data set) runs fine only with a warning that my log is exceeds the size and needs to close, while the control part&amp;nbsp;(smaller data set) crashes completely. The problems appear during the proc surveyselect part&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Please describe "crashes completely". Does SAS crash/quit working,is the output unexpected or does the code generate errors?&lt;/P&gt;
&lt;P&gt;If there are errors then best would be to show the code and error messages from the LOG, otherwise we are reduced to guessing.&lt;/P&gt;
&lt;P&gt;Best is to paste the code and errors from the log into a code box opened on the forum using the {I} menu icon in the message box header to preserve formatting of error diagnostic messages that the main message window would remove.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At this point I am going to guess that since you use the same SAMPSIZE data set for cases and controls that you may have requested more records from the control set for one or more strata.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will say that the highlight data set names below seem a bit confusing to me as well:&lt;/P&gt;
&lt;PRE&gt;PROC SQL;
CREATE TABLE ELIGIBLE_&lt;STRONG&gt;&lt;FONT color="#0000ff"&gt;CONTROLS&lt;/FONT&gt;&lt;/STRONG&gt; AS
SELECT *
FROM &lt;STRONG&gt;&lt;FONT color="#0000ff"&gt;CASE&lt;/FONT&gt;&lt;/STRONG&gt;
WHERE INDEX IN (SELECT INDEX FROM ALLCOUNT)
ORDER BY INDEX;
QUIT;


PROC SQL;
CREATE TABLE ELIGIBLE_&lt;FONT color="#0000ff"&gt;CASES&lt;/FONT&gt; AS
SELECT *
FROM &lt;FONT color="#0000ff"&gt;CONTROL&lt;/FONT&gt;
WHERE INDEX IN (SELECT INDEX FROM ALLCOUNT)
ORDER BY INDEX;
QUIT;

&lt;/PRE&gt;
&lt;P&gt;Note that in the article you site code is&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;PROC SQL;
CREATE TABLE WORK.ELIGIBLE_&lt;STRONG&gt;&lt;FONT color="#0000ff"&gt;CONTROLS&lt;/FONT&gt;&lt;/STRONG&gt; AS
SELECT *
FROM &lt;STRONG&gt;&lt;FONT color="#0000ff"&gt;CTRL&lt;/FONT&gt;&lt;/STRONG&gt;
WHERE INDEX IN (SELECT INDEX FROM ALLCOUNT);&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Mar 2018 14:23:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-surveyselect-matched-case-control/m-p/449335#M69650</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-03-28T14:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: Proc surveyselect matched case control</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-surveyselect-matched-case-control/m-p/449353#M69651</link>
      <description>&lt;P&gt;Thank you very much for your quick response!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many apologies, I tried posting a picture of the error message, but my company has a very conservative firewall that blocked it. There was no output, SAS EG just disconnected.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I got the following error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"An error occurred executing the workspace job Matching. The server is disconnected.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was able to find a solution to my problem here. The proc now works without issues&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/42/679.html" target="_blank"&gt;http://support.sas.com/kb/42/679.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2018 14:44:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-surveyselect-matched-case-control/m-p/449353#M69651</guid>
      <dc:creator>Greek</dc:creator>
      <dc:date>2018-03-28T14:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: Proc surveyselect matched case control</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-surveyselect-matched-case-control/m-p/449403#M69652</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/24022"&gt;@Greek&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Thank you very much for your quick response!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many apologies, I tried posting a picture of the error message, but my company has a very conservative firewall that blocked it. There was no output, SAS EG just disconnected.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Logs are text, so copy text and paste text.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the error is from the OS and not the log, which seems possible in this case, it may be that you are exceeding the output limits of your job. Having such large log entries may be an indication of other issues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest also using a subset of the SAMPSIZE data set so that you are only selecting for a couple of strata and examine the log to see why it is generating so much output.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2018 15:34:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-surveyselect-matched-case-control/m-p/449403#M69652</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-03-28T15:34:27Z</dc:date>
    </item>
  </channel>
</rss>

