<?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: propensity score matching macros in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/propensity-score-matching-macros/m-p/679946#M205389</link>
    <description>&lt;P&gt;I hope that you don't expect that anyone reads the unformatted code you have posted, so please edit your post and move all sas code to the window opening when you click on the little-running-man icon. And please don't just move the code to the box, apply proper formatting first.&lt;/P&gt;</description>
    <pubDate>Fri, 28 Aug 2020 05:18:42 GMT</pubDate>
    <dc:creator>andreas_lds</dc:creator>
    <dc:date>2020-08-28T05:18:42Z</dc:date>
    <item>
      <title>propensity score matching macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/propensity-score-matching-macros/m-p/679923#M205374</link>
      <description>&lt;P&gt;Hi SAS experts&lt;/P&gt;&lt;P&gt;I would like to make a propensity score matching for my cohort study.&lt;/P&gt;&lt;P&gt;I have used the macros of propensity score matching I have used are similar to the macros provided by Mayo clinic but they didn't work with me!!!&lt;/P&gt;&lt;P&gt;The codes are attached.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can any one help me with this? it would be appreciated&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Aug 2020 13:33:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/propensity-score-matching-macros/m-p/679923#M205374</guid>
      <dc:creator>ALAA1</dc:creator>
      <dc:date>2020-08-28T13:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: propensity score matching macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/propensity-score-matching-macros/m-p/679946#M205389</link>
      <description>&lt;P&gt;I hope that you don't expect that anyone reads the unformatted code you have posted, so please edit your post and move all sas code to the window opening when you click on the little-running-man icon. And please don't just move the code to the box, apply proper formatting first.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Aug 2020 05:18:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/propensity-score-matching-macros/m-p/679946#M205389</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-08-28T05:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: propensity score matching macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/propensity-score-matching-macros/m-p/680020#M205427</link>
      <description>Thank you for your comment.&lt;BR /&gt;This is my first time to post codes and I thought it will be formatted after posting I recognised the problem!&lt;BR /&gt;I have edited the topic and attached the codes I think this will be more useful.</description>
      <pubDate>Fri, 28 Aug 2020 13:36:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/propensity-score-matching-macros/m-p/680020#M205427</guid>
      <dc:creator>ALAA1</dc:creator>
      <dc:date>2020-08-28T13:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: propensity score matching macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/propensity-score-matching-macros/m-p/680046#M205438</link>
      <description>&lt;P&gt;Doesn't work is awful vague.&lt;BR /&gt;&lt;BR /&gt;Are there errors in the log?: Post the code and log in a code box opened with the &amp;lt;&amp;gt; to maintain formatting of error messages.&lt;BR /&gt;&lt;BR /&gt;No output? Post any log in a code box.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat&lt;/A&gt;... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To make the LOG more meaningful set the system option MPRINT prior to executing any code with macros when things give unexpected results or errors. Then notes, warnings and errors will appear in the log near the code that causes the problem.&lt;/P&gt;
&lt;P&gt;And read the log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The macros involved have lots of checks on the macro parameters. Did you see any thing in the log about problems with them?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Aug 2020 15:27:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/propensity-score-matching-macros/m-p/680046#M205438</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-08-28T15:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: propensity score matching macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/propensity-score-matching-macros/m-p/680054#M205443</link>
      <description>&lt;P&gt;I mean by doesn't work that there is no output and there is error messages.&lt;/P&gt;&lt;P&gt;you can find the log below.&lt;/P&gt;&lt;P&gt;the whole macros ( until 583 %MEND MATCH;) ran and appeared in the log box with black color.&lt;/P&gt;&lt;P&gt;after (584 %match) the error messages appeared.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope it is clear now&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;  proc means data=&amp;amp;outnmca n mean sum min max; var &amp;amp;mvars;
573           title9'Summary data for NON-matched cases';
574           run;
575           proc means data=&amp;amp;outnmco n mean sum min max; var &amp;amp;mvars;
576           title9'Summary data for NON-matched controls';
577           run;
578           %end;
579        %END;
580     %END;
581      title9; footnote;
582      run;
&lt;STRONG&gt;583  %MEND MATCH;&lt;/STRONG&gt;

&lt;FONT color="#0000FF"&gt;NOTE: This SAS session is using a registry in WORK.  All changes will be lost at the end
      of this session.&lt;/FONT&gt;
584  %match(case=case1,control=control1,idca=caseid,idco=ctlid,
585                mvars=prac1 pred,maxiter=100000,
586                wts=1 1, dmaxk=0 0.05,out=mtch,ncontls=2,
587                method=greedy, seedco=123456, seedca=234567);

&lt;FONT color="#0000FF"&gt;NOTE: DATA statement used (Total process time):
      real time           0.12 seconds
      cpu time            0.00 seconds&lt;/FONT&gt;



&lt;FONT color="#0000FF"&gt;NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds



NOTE: Variable prac1 is uninitialized.
NOTE: Variable pred is uninitialized.
NOTE: There were 11955 observations read from the data set WORK.CASE1.
NOTE: The data set WORK.__CASE has 0 observations and 5 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds



NOTE: Numeric values have been converted to character values at the places given by:
      (Line):(Column).
      16:94
NOTE: There were 0 observations read from the data set WORK.__CASE.
NOTE: The data set WORK.__CASE has 0 observations and 6 variables.
NOTE: DATA statement used (Total process time):
      real time           0.04 seconds
      cpu time            0.00 seconds



NOTE: Input data set is empty.
NOTE: The data set WORK.__CASE has 0 observations and 6 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.04 seconds
      cpu time            0.01 seconds



NOTE: Variable prac1 is uninitialized.
NOTE: Variable pred is uninitialized.
NOTE: There were 65087 observations read from the data set WORK.CONTROL1.
NOTE: The data set WORK.__CONT has 0 observations and 5 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds



NOTE: Numeric values have been converted to character values at the places given by:
      (Line):(Column).
      31:94
NOTE: There were 0 observations read from the data set WORK.__CONT.
NOTE: The data set WORK.__CONT has 0 observations and 6 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds

&lt;/FONT&gt;
&lt;FONT color="#339966"&gt;WARNING: Apparent symbolic reference NCO not resolved.
WARNING: Apparent symbolic reference NCA not resolved.
WARNING: Apparent symbolic reference NCA not resolved.&lt;/FONT&gt;
&lt;FONT color="#993366"&gt;ERROR: A character operand was found in the %EVAL function or %IF condition where a
       numeric operand is required. The condition was: &amp;amp;NCA*2
ERROR: A character operand was found in the %EVAL function or %IF condition where a
       numeric operand is required. The condition was: &amp;amp;NCO &amp;lt; %EVAL(&amp;amp;NCA*&amp;amp;NCONTLS)
ERROR: The macro GREEDY will stop executing.
ERROR: File WORK.MTCH.DATA does not exist.&lt;/FONT&gt;
&lt;FONT color="#0000FF"&gt;NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.04 seconds
      cpu time            0.00 seconds

NOTE: Input data set is empty.
NOTE: The data set WORK.__CASE has 0 observations and 6 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds&lt;/FONT&gt;

&lt;FONT color="#993366"&gt;ERROR: File WORK.MTCH.DATA does not exist.&lt;/FONT&gt;
&lt;FONT color="#0000FF"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/FONT&gt;
&lt;FONT color="#339966"&gt;WARNING: The data set WORK.__NMCA may be incomplete.  When this step was stopped there
         were 0 observations and 6 variables.&lt;/FONT&gt;
&lt;FONT color="#0000FF"&gt;NOTE: DATA statement used (Total process time):
      real time           0.04 seconds
      cpu time            0.01 seconds&lt;/FONT&gt;


&lt;FONT color="#0000FF"&gt;NOTE: Input data set is empty.
NOTE: The data set WORK.__CONT has 0 observations and 6 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds&lt;/FONT&gt;
&lt;FONT color="#993366"&gt;ERROR: File WORK.MTCH.DATA does not exist.&lt;/FONT&gt;
&lt;FONT color="#0000FF"&gt;NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds&lt;/FONT&gt;

&lt;FONT color="#993366"&gt;ERROR: File WORK.MTCH.DATA does not exist.&lt;/FONT&gt;

&lt;FONT color="#0000FF"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/FONT&gt;
&lt;FONT color="#339966"&gt;WARNING: The data set WORK.__NMCO may be incomplete.  When this step was stopped there
         were 0 observations and 6 variables.&lt;/FONT&gt;
&lt;FONT color="#0000FF"&gt;NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds&lt;/FONT&gt;


&lt;FONT color="#993366"&gt;ERROR: File WORK.MTCH.DATA does not exist.&lt;/FONT&gt;

&lt;FONT color="#0000FF"&gt;NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds



NOTE: Writing HTML Body file: sashtml.htm&lt;/FONT&gt;
&lt;FONT color="#993366"&gt;ERROR: File WORK.MTCH.DATA does not exist.&lt;/FONT&gt;

&lt;FONT color="#0000FF"&gt;NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.48 seconds
      cpu time            0.12 seconds&lt;/FONT&gt;
&lt;FONT color="#993366"&gt;ERROR: File WORK.MTCH.DATA does not exist.
ERROR: No data set open to look up variables.
ERROR: No data set open to look up variables.
ERROR: No data set open to look up variables.
ERROR: No data set open to look up variables.
ERROR: No data set open to look up variables.&lt;/FONT&gt;

&lt;FONT color="#0000FF"&gt;NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE MEANS used (Total process time):
      real time           0.03 seconds
      cpu time            0.00 seconds

NOTE: No observations in data set WORK.__NMCA.
NOTE: PROCEDURE MEANS used (Total process time):
      real time           0.17 seconds
      cpu time            0.00 seconds

NOTE: No observations in data set WORK.__NMCO.
NOTE: PROCEDURE MEANS used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds&lt;/FONT&gt;


588
589
590  data mtchall;set mtch;run;
&lt;FONT color="#993366"&gt;ERROR: File WORK.MTCH.DATA does not exist.&lt;/FONT&gt;

&lt;FONT color="#0000FF"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/FONT&gt;
&lt;FONT color="#339966"&gt;WARNING: The data set WORK.MTCHALL may be incomplete.  When this step was stopped there
         were 0 observations and 0 variables.&lt;/FONT&gt;
&lt;FONT color="#0000FF"&gt;NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds&lt;/FONT&gt;
593  data mtchcase;set mtchall;
594  rename __IDCA=caseid;
595  keep  __IDCA ;
596  run;

&lt;FONT color="#339966"&gt;WARNING: The variable __IDCA in the DROP, KEEP, or RENAME list has never been referenced.
WARNING: The variable __IDCA in the DROP, KEEP, or RENAME list has never been referenced.&lt;/FONT&gt;
&lt;FONT color="#0000FF"&gt;NOTE: There were 0 observations read from the data set WORK.MTCHALL.
NOTE: The data set WORK.MTCHCASE has 0 observations and 0 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds

&lt;/FONT&gt;
597  proc sort data=mtchall;by __IDCA;run;
&lt;FONT color="#993366"&gt;ERROR: Variable __IDCA not found.&lt;/FONT&gt;

&lt;FONT color="#0000FF"&gt;NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds&lt;/FONT&gt;
598
599
600


601  data mtchctl;set mtchall;
602  rename __IDCO=ctlid;
603  keep  __IDCO  ;
604  run;
&lt;FONT color="#339966"&gt;WARNING: The variable __IDCO in the DROP, KEEP, or RENAME list has never been referenced.
WARNING: The variable __IDCO in the DROP, KEEP, or RENAME list has never been referenced.&lt;/FONT&gt;
&lt;FONT color="#0000FF"&gt;NOTE: There were 0 observations read from the data set WORK.MTCHALL.
NOTE: The data set WORK.MTCHCTL has 0 observations and 0 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds&lt;/FONT&gt;


605  proc sort data=mtchctl;by ctlid;run;
&lt;FONT color="#993366"&gt;ERROR: Variable CTLID not found.&lt;/FONT&gt;

&lt;FONT color="#0000FF"&gt;NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds&lt;/FONT&gt;

606


607  proc sort data=case1;by caseid;run;

&lt;FONT color="#0000FF"&gt;NOTE: There were 11955 observations read from the data set WORK.CASE1.
NOTE: The data set WORK.CASE1 has 11955 observations and 3 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds&lt;/FONT&gt;


608  proc sort data=mtchcase;by caseid;run;
&lt;FONT color="#993366"&gt;ERROR: Variable CASEID not found.&lt;/FONT&gt;

&lt;FONT color="#0000FF"&gt;NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds&lt;/FONT&gt;

609


610  data mtchcase1;merge mtchcase(in=inmtchcase) case1;
611  by caseid;
612  if inmtchcase;
613  keep chi ;run;
&lt;FONT color="#993366"&gt;ERROR: BY variable caseid is not on input data set WORK.MTCHCASE.&lt;/FONT&gt;
&lt;FONT color="#0000FF"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/FONT&gt;
&lt;FONT color="#339966"&gt;WARNING: The data set WORK.MTCHCASE1 may be incomplete.  When this step was stopped there
         were 0 observations and 1 variables.&lt;/FONT&gt;
&lt;FONT color="#0000FF"&gt;NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds&lt;/FONT&gt;


614
615  proc sort data=mtchcase1;by chi;run;

&lt;FONT color="#0000FF"&gt;NOTE: Input data set is empty.
NOTE: The data set WORK.MTCHCASE1 has 0 observations and 1 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds&lt;/FONT&gt;


616  data mtchcase1f;set mtchcase1;
617  by chi;
618  if first.chi;
619  group=1;
620  run;

&lt;FONT color="#0000FF"&gt;NOTE: There were 0 observations read from the data set WORK.MTCHCASE1.
NOTE: The data set WORK.MTCHCASE1F has 0 observations and 2 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds&lt;/FONT&gt;


621
622
623  proc sort data=control1;by ctlid;run;

&lt;FONT color="#0000FF"&gt;NOTE: There were 65087 observations read from the data set WORK.CONTROL1.
NOTE: The data set WORK.CONTROL1 has 65087 observations and 3 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.04 seconds
      cpu time            0.03 seconds&lt;/FONT&gt;


624  proc sort data=mtchctl;by ctlid;run;
&lt;FONT color="#993366"&gt;ERROR: Variable CTLID not found.&lt;/FONT&gt;

&lt;FONT color="#0000FF"&gt;NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds&lt;/FONT&gt;



625  data mtchctl1;merge mtchctl(in=inmtchctl) control1;
626  by ctlid;
627  if inmtchctl;
628  keep chi ;
629  run;

&lt;FONT color="#993366"&gt;ERROR: BY variable ctlid is not on input data set WORK.MTCHCTL.&lt;/FONT&gt;
&lt;FONT color="#0000FF"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/FONT&gt;
&lt;FONT color="#339966"&gt;WARNING: The data set WORK.MTCHCTL1 may be incomplete.  When this step was stopped there
         were 0 observations and 1 variables.&lt;/FONT&gt;
&lt;FONT color="#0000FF"&gt;NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds&lt;/FONT&gt;


630
631  proc sort data=mtchctl1;by chi;run;

&lt;FONT color="#0000FF"&gt;NOTE: Input data set is empty.
NOTE: The data set WORK.MTCHCTL1 has 0 observations and 1 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds&lt;/FONT&gt;

632  data mtchctl1f;set mtchctl1;
633  by chi;
634  if first.chi;
635  group=0;
636  run;

&lt;FONT color="#0000FF"&gt;NOTE: There were 0 observations read from the data set WORK.MTCHCTL1.
NOTE: The data set WORK.MTCHCTL1F has 0 observations and 2 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds&lt;/FONT&gt;

638  data mtchfinal;set mtchcase1f mtchctl1f;
639  run;

&lt;FONT color="#0000FF"&gt;NOTE: There were 0 observations read from the data set WORK.MTCHCASE1F.
NOTE: There were 0 observations read from the data set WORK.MTCHCTL1F.
NOTE: The data set WORK.MTCHFINAL has 0 observations and 2 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds


&lt;/FONT&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 28 Aug 2020 16:23:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/propensity-score-matching-macros/m-p/680054#M205443</guid>
      <dc:creator>ALAA1</dc:creator>
      <dc:date>2020-08-28T16:23:33Z</dc:date>
    </item>
  </channel>
</rss>

