<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Archiving and Interchange DTD v2.3 20070202//EN" "archivearticle.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" article-type="data-paper">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">Front. Big Data</journal-id>
<journal-title>Frontiers in Big Data</journal-title>
<abbrev-journal-title abbrev-type="pubmed">Front. Big Data</abbrev-journal-title>
<issn pub-type="epub">2624-909X</issn>
<publisher>
<publisher-name>Frontiers Media S.A.</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="doi">10.3389/fdata.2019.00004</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Big Data</subject>
<subj-group>
<subject>Code</subject>
</subj-group>
</subj-group>
</article-categories>
<title-group>
<article-title>Matching Cases and Controls Using SAS&#x000AE; Software</article-title>
</title-group>
<contrib-group>
<contrib contrib-type="author" corresp="yes">
<name><surname>Mortensen</surname> <given-names>Laura Quitzau</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="corresp" rid="c001"><sup>&#x0002A;</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/638411/overview"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Andresen</surname> <given-names>Kristoffer</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/474074/overview"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Burcharth</surname> <given-names>Jakob</given-names></name>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
</contrib>
<contrib contrib-type="author">
<name><surname>Pommergaard</surname> <given-names>Hans-Christian</given-names></name>
<xref ref-type="aff" rid="aff3"><sup>3</sup></xref>
</contrib>
<contrib contrib-type="author">
<name><surname>Rosenberg</surname> <given-names>Jacob</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
</contrib>
</contrib-group>
<aff id="aff1"><sup>1</sup><institution>Center for Perioperative Optimization, Department of Surgery, Herlev Hospital</institution>, <addr-line>Herlev</addr-line>, <country>Denmark</country></aff>
<aff id="aff2"><sup>2</sup><institution>Department of Surgery, University Hospital of Zealand</institution>, <addr-line>Koege</addr-line>, <country>Denmark</country></aff>
<aff id="aff3"><sup>3</sup><institution>Department of Surgery and Transplantation, Rigshospitalet</institution>, <addr-line>Copenhagen</addr-line>, <country>Denmark</country></aff>
<author-notes>
<fn fn-type="edited-by"><p>Edited by: Bertram M&#x000FC;ller-Myhsok, Max Planck Institute of Psychiatry (MPI), Germany</p></fn>
<fn fn-type="edited-by"><p>Reviewed by: Maria Chan, Memorial Sloan Kettering Cancer Center, United States; Julia Rager, University of North Carolina at Chapel Hill, United States</p></fn>
<corresp id="c001">&#x0002A;Correspondence: Laura Quitzau Mortensen <email>lauraquitzau&#x00040;outlook.com</email></corresp>
<fn fn-type="other" id="fn001"><p>This article was submitted to Medicine and Public Health, a section of the journal Frontiers in Big Data</p></fn></author-notes>
<pub-date pub-type="epub">
<day>08</day>
<month>05</month>
<year>2019</year>
</pub-date>
<pub-date pub-type="collection">
<year>2019</year>
</pub-date>
<volume>2</volume>
<elocation-id>4</elocation-id>
<history>
<date date-type="received">
<day>05</day>
<month>11</month>
<year>2018</year>
</date>
<date date-type="accepted">
<day>23</day>
<month>04</month>
<year>2019</year>
</date>
</history>
<permissions>
<copyright-statement>Copyright &#x000A9; 2019 Mortensen, Andresen, Burcharth, Pommergaard and Rosenberg.</copyright-statement>
<copyright-year>2019</copyright-year>
<copyright-holder>Mortensen, Andresen, Burcharth, Pommergaard and Rosenberg</copyright-holder>
<license xlink:href="http://creativecommons.org/licenses/by/4.0/"><p>This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.</p></license>
</permissions>
<abstract><p>Matching is frequently used in observational studies, especially in medical research. However, only a small number of articles with matching programs for the SAS software (SAS Institute Inc., Cary, NC, USA) are available, even less are usable for inexperienced users of SAS software. This article presents a matching program for the SAS software and links to an online repository for examples and test data. The program enables matching on several variables and includes in-depth explanation of the expressions used and how to customize the program. The selection of controls is randomized and automated, minimizing the risk of selection bias. Also, the program provides means for the researcher to test for incomplete matching.</p></abstract>
<kwd-group>
<kwd>SAS&#x000AE; software</kwd>
<kwd>matching</kwd>
<kwd>code</kwd>
<kwd>macro</kwd>
<kwd>case control study</kwd>
<kwd>observational study</kwd>
<kwd>explanation</kwd>
<kwd>code:sas</kwd>
</kwd-group>
<counts>
<fig-count count="1"/>
<table-count count="6"/>
<equation-count count="0"/>
<ref-count count="7"/>
<page-count count="5"/>
<word-count count="3592"/>
</counts>
</article-meta>
</front>
<body>
<sec id="s1">
<title>Description and Application</title>
<p>Matching of one group with specific exposures or outcome with a comparable group is frequently used in medical research to investigate the association between exposure and outcome. In case-control studies the cases with the disease of interest are matched with disease-free controls in order to retrospectively explore risk-factors. In matched cohort studies, the persons with the exposure of interest are matched with unexposed persons in order to make the two groups more similar with regard to confounding variables. Therefore, matching often reduces the risk of confounding in cohort studies (Bloom et al., <xref ref-type="bibr" rid="B1">2007</xref>). For researchers new to the SAS software (SAS Institute Inc., Cary, NC, USA), matching cases with controls may not be easily performed. Only a small number of suitable methods for matching case with controls are available using SAS software for inexperienced SAS-users. One article described a matching program (Mounib and Satchi, <xref ref-type="bibr" rid="B3">2000</xref>); however, for inexperienced SAS-users several issues hindered meaningful use of this method. These issues included typographical errors that prevented the execution of the code.</p>
<p>This article presents a revised matching program which was generated using SAS software, Version 9.4 of the SAS System. The program has also been tested and found applicable for SAS Software University Edition. The purpose of the code is to enable matching between two dissimilar groups based on specific characteristics selected by the user. In this article, the main focus for the use of the code is case-control matching. The revised program makes it possible to match on several variables, both on fixed values and ranges, and includes a more in-depth explanation of the expressions used. It provides a random selection of eligible controls and clarifies which cases, if any, that do not receive the desired number of controls. Thus, the aim of this paper is to present an easily understood and easy-to-use matching program for the SAS software.</p></sec>
<sec sec-type="methods" id="s2">
<title>Methods</title>
<p>Before matching, it is necessary to prepare a data set containing all cases as well as potential controls. In this paper, this data set is referred to as <italic>population</italic>. One way to distinguish the two groups is to create a variable, called <italic>casecontrol</italic>, which is marked 1 for cases and 0 for potential controls. Since the following program matches controls to cases by age and sex, <italic>population</italic> must contain this information, as well as a unique identifier for each person in the data set. The program will be presented and explained from beginning to end using the lines of code as a reference. The program is presented in <xref ref-type="table" rid="T1">Tables 1</xref>&#x02013;<bold>5</bold>. To access the program online, please go to: <ext-link ext-link-type="uri" xlink:href="https://github.com/lauraqmortensen/sas">https://github.com/lauraqmortensen/sas</ext-link>.</p>
<table-wrap position="float" id="T1">
<label>Table 1</label>
<caption><p>Lines 1&#x02013;2.</p></caption>
<table frame="hsides" rules="groups">
<thead><tr>
<th valign="top" align="left"><bold><monospace>Line</monospace></bold></th>
<th valign="top" align="left"><bold><monospace>Code</monospace></bold></th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" align="left"><monospace>1.</monospace></td>
<td valign="top" align="left"><monospace>%LET agerange</monospace> &#x0003D; <monospace>5;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>2.</monospace></td>
<td valign="top" align="left"><monospace>%LET ratio</monospace> &#x0003D; <monospace>3;</monospace></td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<p><italic>In these lines, the accepted age range between a case and a control and the desired number of controls per case are defined. The age range must be defined by the same measurement as age, i.e., years, months</italic>.</p>
</table-wrap-foot>
</table-wrap>
</sec>
<sec id="s3">
<title>Lines 1&#x02013;10</title>
<p>The program matches controls to cases by a numerical range and a categorical value, age, and sex, respectively. In <italic>lines 1&#x02013;2</italic>, the variables <italic>agerange</italic> and <italic>ratio</italic> are defined by a <italic>%LET</italic> statement as macro-variables and can be recalled later with a preceding ampersand, see <xref ref-type="table" rid="T1">Table 1</xref>. The %<italic>LET</italic> statement in the beginning of the code makes it easy to customize the variables. The value of <italic>agerange</italic> has been set to five, which will allow the program to select controls of up to 5 years younger or 5 years older than the case, given that the variable <italic>age</italic> is listed in years. The <italic>ratio</italic> has been defined as three which means that to each case three unique controls will be matched. It is possible to exchange these two variables for others or match on more than two variables. However, narrowing ranges and increasing numbers of matching variables will limit the number of available controls.</p>
<p>The purpose of <italic>lines 3&#x02013;7</italic> is to produce two separate data sets from <italic>population</italic>, see <xref ref-type="table" rid="T2">Table 2</xref> and <xref ref-type="fig" rid="F1">Figure 1</xref>. One data set contains cases (<italic>cases)</italic>; the other holds potential controls (<italic>controls)</italic>. The separation of cases and possible controls is done by the variable <italic>casecontrol</italic> in the data set containing the entire population, <italic>population</italic>.</p>
<table-wrap position="float" id="T2">
<label>Table 2</label>
<caption><p>Lines 3&#x02013;7.</p></caption>
<table frame="hsides" rules="groups">
<thead><tr>
<th valign="top" align="left"><bold><monospace>Line</monospace></bold></th>
<th valign="top" align="left"><bold><monospace>Code</monospace></bold></th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" align="left"><monospace>3.</monospace></td>
<td valign="top" align="left"><monospace>DATA cases controls;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>4.</monospace></td>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;&#x000A0;SET population;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>5.</monospace></td>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;&#x000A0;IF casecontrol</monospace> &#x0003D; <monospace>1 THEN OUTPUT cases;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>6.</monospace></td>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;&#x000A0;ELSE OUTPUT controls;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>7.</monospace></td>
<td valign="top" align="left"><monospace>RUN;</monospace></td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<p><italic>Population is a data set containing both cases and possible controls. This data set should have a variable called &#x0201C;casecontrol&#x0201D; and a variable called &#x0201C;uniqueid.&#x0201D; The data set should also include the matching variables. The data step creates two new data sets, cases and controls</italic>.</p>
</table-wrap-foot>
</table-wrap>
<fig id="F1" position="float">
<label>Figure 1</label>
<caption><p>The assigning of controls to cases. Illustration of data sets used and produced by the program. The data set <italic>controls</italic> holds all potential controls. Controls are matched to cases based on the data set <italic>caseout</italic>. Matched controls are moved to <italic>matches</italic>; the remaining controls are reused as potential controls in <italic>controls</italic>. The dataset <italic>final</italic> contains metadata on cases and matched controls and is used to check for insufficient matches.</p></caption>
<graphic xlink:href="fdata-02-00004-g0001.tif"/>
</fig>
<p><italic>Lines 8&#x02013;10</italic> produce a data set, <italic>caseout</italic>, containing frequencies of different combinations in the case group of the matching variables, <italic>age</italic> and <italic>gender</italic>, see <xref ref-type="table" rid="T3">Table 3</xref>. This list will later be used to identify eligible controls. The <italic>NOPRINT</italic> option suppresses display of an output from the <italic>PROC FREQ</italic>.</p>
<table-wrap position="float" id="T3">
<label>Table 3</label>
<caption><p>Lines 8&#x02013;10.</p></caption>
<table frame="hsides" rules="groups">
<thead><tr>
<th valign="top" align="left"><bold><monospace>Line</monospace></bold></th>
<th valign="top" align="left"><bold><monospace>Code</monospace></bold></th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" align="left"><monospace>8.</monospace></td>
<td valign="top" align="left"><monospace>PROC FREQ NOPRINT DATA</monospace> &#x0003D; <monospace>cases;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>9.</monospace></td>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;&#x000A0;TABLES age</monospace><sup>&#x0002A;</sup><monospace>gender/OUT</monospace> &#x0003D; <monospace>caseout;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>10.</monospace></td>
<td valign="top" align="left"><monospace>RUN;</monospace></td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<p><italic>A new data set caseout is created. It holds count of various combinations of matching variables within the case group</italic>.</p>
</table-wrap-foot>
</table-wrap></sec>
<sec id="s4">
<title>The Macro, Lines 11&#x02013;34</title>
<p>A macro is a program within the program. It allows for fast changes and is helpful and time-saving when the same code needs to run many times as is done when matching controls to cases (Slaughter and Delwiche, <xref ref-type="bibr" rid="B5">2004</xref>). The macro, named <italic>sample</italic>, is repeated for each combination of matching variables in <italic>caseout</italic> to locate eligible controls for matching, see <xref ref-type="table" rid="T4">Table 4</xref>.</p>
<table-wrap position="float" id="T4">
<label>Table 4</label>
<caption><p>The macro, lines 11&#x02013;38.</p></caption>
<table frame="hsides" rules="groups">
<thead><tr>
<th valign="top" align="left"><bold><monospace>Line</monospace></bold></th>
<th valign="top" align="left"><bold><monospace>Code</monospace></bold></th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" align="left"><monospace>11.</monospace></td>
<td valign="top" align="left"><monospace>%MACRO sample(v_age, v_gender, v_count);</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>12.</monospace></td>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;&#x000A0;DATA qualify1;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>13.</monospace></td>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;SET controls;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>14.</monospace></td>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;WHERE (&#x00026;v_age-&#x00026;agerange</monospace> &#x0003C;&#x0003D; <monospace>age</monospace> &#x0003C;&#x0003D; <monospace>&#x00026;v_age</monospace>&#x0002B;<monospace>&#x00026;agerange)</monospace></td>
</tr>
<tr>
<td/>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;AND</monospace></td>
</tr>
<tr>
<td/>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;(gender</monospace> &#x0003D; <monospace>&#x0201C;&#x00026;v_gender&#x0201D;);</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>15.</monospace></td>
<td valign="top" align="left"><monospace>case_age</monospace> &#x0003D; <monospace>&#x00026;v_age;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>16.</monospace></td>
<td valign="top" align="left"><monospace>case_gender</monospace> &#x0003D; <monospace>&#x0201C;&#x00026;v_gender&#x0201D;;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>17.</monospace></td>
<td valign="top" align="left"><monospace>SEED</monospace> &#x0003D; <monospace>RANUNI(0);</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>18.</monospace></td>
<td valign="top" align="left"><monospace>PROC SORT;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>19.</monospace></td>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;BY SEED;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>20.</monospace></td>
<td valign="top" align="left"><monospace>DATA qualify2;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>21.</monospace></td>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;SET qualify1 NOBS</monospace> &#x0003D; <monospace>totobs;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>22.</monospace></td>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;IF _N_</monospace> &#x0003C;&#x0003D; <monospace>&#x00026;v_count</monospace><sup>&#x0002A;</sup><monospace>&#x00026;ratio;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>23.</monospace></td>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;IF &#x00026;v_count</monospace><sup>&#x0002A;</sup><monospace>&#x00026;ratio</monospace> &#x0003C;&#x0003D; <monospace>totobs THEN tag</monospace> &#x0003D; <monospace>&#x02018;yes&#x02019;;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>24.</monospace></td>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;ELSE tag</monospace> &#x0003D; <monospace>&#x02018;no&#x02019;;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>25.</monospace></td>
<td valign="top" align="left"><monospace>PROC APPEND BASE</monospace> &#x0003D; <monospace>matches DATA</monospace> &#x0003D; <monospace>qualify2 force;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>26.</monospace></td>
<td valign="top" align="left"><monospace>PROC SORT DATA</monospace> &#x0003D; <monospace>qualify2 OUT</monospace> &#x0003D; <monospace>temp1 (KEEP</monospace> &#x0003D; <monospace>uniqueid);</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>27.</monospace></td>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;BY uniqueid;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>28.</monospace></td>
<td valign="top" align="left"><monospace>PROC SORT DATA</monospace> &#x0003D; <monospace>controls OUT</monospace> &#x0003D; <monospace>temp2;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>29.</monospace></td>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;BY uniqueid;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>30.</monospace></td>
<td valign="top" align="left"><monospace>DATA controls;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>31.</monospace></td>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;MERGE temp1(IN</monospace> &#x0003D; <monospace>in1) temp2(IN</monospace> &#x0003D; <monospace>in2);</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>32.</monospace></td>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;BY uniqueid;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>33.</monospace></td>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;IF in2 AND NOT in1;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>34.</monospace></td>
<td valign="top" align="left"><monospace>%MEND sample;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>35.</monospace></td>
<td valign="top" align="left"><monospace>DATA _NULL_;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>36.</monospace></td>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;&#x000A0;&#x000A0;SET caseout;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>37.</monospace></td>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;&#x000A0;&#x000A0;CALL EXECUTE</monospace></td>
</tr>
<tr>
<td/>
<td valign="top" align="left"><monospace>(&#x02018;%sample(&#x02018;||age||&#x02019;,&#x02018;||gender||&#x02019;,&#x02018;||count||&#x02019;)&#x02019;);</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>38.</monospace></td>
<td valign="top" align="left"><monospace>RUN;</monospace></td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<p><italic>The macro is a program within the program. The macro begins with the %macro statement and ends with the %mend statement. It is started with the call execute statement. The macro runs in iterations for each combination of matching variables in the case group. The matched controls are placed in the new data set, matches</italic>.</p>
</table-wrap-foot>
</table-wrap>
<p>In <italic>line 11</italic>, the macro is begun with the <italic>%MACRO</italic> statement. Parameters are introduced to the macro definition in a set of parentheses. These parameters are called within the macro with a preceding ampersand. The parameters will be defined later when the macro is invoked.</p>
<p><italic>Lines 12&#x02013;14</italic> produce a data set, <italic>qualify1</italic>, which contains eligible controls based on the matching criteria set forth in <italic>line 14</italic>. That is, in order to be an eligible control, the following must apply; the value of the variable <italic>age</italic> must be equal to or greater than the value of <italic>age</italic> of the case minus the value of <italic>agerange</italic> and be less than or equal to the value of <italic>age</italic> of the case plus the value of <italic>agerange</italic>. Furthermore, the gender of the potential control must equal that of the case. The variable <italic>v_gender</italic> is in quotation marks because it is a categorical variable. New variables are introduced to <italic>qualify1</italic> in <italic>lines 15&#x02013;16</italic> for the controls, representing values of gender and age of their corresponding case.</p>
<p>The new variable, <italic>SEED</italic>, introduced in <italic>lines 17&#x02013;19</italic> is assigned a random number for each eligible control in the data set. This random number has a value between 0 and 1 and is produced from the <italic>RANUNI</italic> function. The <italic>RANUNI</italic> distributes the numbers in a uniform manner. The <italic>(0)</italic> instructs the SAS software to start the sequence of numbers based on the time of day which makes it impossible to replicate the stream of random numbers. The variable <italic>SEED</italic> is renewed with each iteration of the macro. Therefore, the potential controls who have not been assigned to a case, reenter the group of potential controls in <italic>controls</italic> and receive a new random number with the new iteration of the macro, see <xref ref-type="fig" rid="F1">Figure 1</xref>.</p>
<p>The purpose of <italic>lines 20&#x02013;24</italic> is to output a data set, <italic>qualify2</italic>, which will contain the required number of controls, if accessible; otherwise, it will contain the maximal obtainable number. Several variables are introduced in these five lines. The value of the variable <italic>NOBS</italic> equals the total number of potential controls in <italic>qualify1</italic>. With the statement <italic>NOBS</italic> &#x0003D; <italic>totobs</italic>, the variable <italic>totobs</italic> is assigned the value of <italic>NOBS. Totobs</italic> can be used anywhere in the data step. The variable <italic>_N_</italic> is an automatic variable in the SAS software which is 1 for the first observation of the data set and increases by 1 for each additional observation. <italic>V_count</italic> represents the variable <italic>count</italic> in the data set <italic>caseout</italic> which keeps count of the frequency of combinations of matching variables. The consequence of <italic>line 22</italic> is that <italic>qualify2</italic> will contain the assigned controls. If <italic>qualify1</italic> holds fewer observations than the number of desired controls, then <italic>qualify2</italic> will obtain them all. However, if <italic>qualify1</italic> has more observations than required, <italic>qualify2</italic> will obtain the first observations until the observation number, _N_, equals the number of desired controls, &#x00026;<italic>v_count</italic><sup>&#x0002A;</sup>&#x00026;<italic>ratio</italic>. In effect, the macro will not assign too many controls. Since the potential controls have been sorted by <italic>SEED</italic>, those with the smallest values in <italic>SEED</italic> will be acquired. The variable <italic>tag</italic> is designated &#x0201C;yes&#x0201D; or &#x0201C;no&#x0201D; based on whether or not the desired amount of controls is reached.</p>
<p>In <italic>line 25</italic> the matched controls from <italic>qualify2</italic> are added to the end of the data set <italic>matches</italic> using the <italic>APPEND</italic> procedure. <italic>Matches</italic> will contain all the final controls and will not exist until the first iteration of the macro. The two data sets, <italic>qualify2</italic> and <italic>controls</italic>, are sorted in <italic>lines 26&#x02013;29</italic> by <italic>uniqueid</italic>, an identifier unique for each participant. The outcome is two new data sets, <italic>temp1</italic> and <italic>temp2</italic>. <italic>Temp1</italic> contains the newly found controls that were added to <italic>matches</italic> in <italic>line 25</italic>, and <italic>temp2</italic> contains the original pool of potential controls in <italic>controls</italic> that <italic>qualify1</italic> was created from and form which <italic>qualify1</italic> will be created again during next iteration of the macro.</p>
<p>The purpose of <italic>lines 30&#x02013;33</italic> is to delete the already matched controls from the data set <italic>controls</italic> in order to ensure that controls are used only once. The <italic>IN</italic> &#x0003D; option creates temporary variables, <italic>in1</italic> and <italic>in2</italic>. In <italic>line 33</italic> these two variables are used for selecting only non-matched controls for the updated data set <italic>controls</italic>. The macro is ended with the <italic>%MEND</italic> statement in <italic>line 34</italic>.</p></sec>
<sec id="s5">
<title>Lines 35&#x02013;38</title>
<p>The purpose of these lines is to execute the macro, see <xref ref-type="table" rid="T4">Table 4</xref>. In <italic>line 35</italic> the data statement is followed by the word _<italic>NULL</italic>_ which is a keyword that prevents the SAS software from writing a new data set (SAS Institute Inc, <xref ref-type="bibr" rid="B4">2001</xref>). Execution of the macro is implemented with a <italic>CALL EXECUTE</italic> statement. The macro is run on the basis of the <italic>caseout</italic> data set, and the macro parameters are defined as the variables <italic>age, gender</italic>, and <italic>count</italic> from <italic>caseout</italic>. The double vertical bar around the variables links data from the data step to the macro (Usov, <xref ref-type="bibr" rid="B6">2014</xref>). Because of the preceding <italic>SET</italic> statement, the <italic>CALL EXECUTE</italic> executes the macro repeatedly for each observation in the <italic>caseout</italic> data set.</p>
<p>The result of the macro is two data sets. First, the new data set <italic>matches</italic> which contains the controls that have been selected. Second, an updated version of the data set <italic>controls</italic> which contains the rest of the population that has not been selected as controls.</p></sec>
<sec id="s6">
<title>Lines 39&#x02013;54</title>
<p>This section is run in order to discover which, if any, cases were not matched with a sufficient number of controls.</p>
<p>The outcome of <italic>lines 39&#x02013;40</italic> is the data set <italic>con_out</italic>, the equivalent of <italic>caseout</italic> for controls, see <xref ref-type="table" rid="T5">Table 5</xref>. <italic>Con_out</italic> contains frequencies of controls for each unique combination of matching variables. In <italic>lines 41&#x02013;44</italic>, the data set <italic>con_out</italic> and the data set <italic>caseout</italic> are sorted by the same variables. The two data sets are merged in <italic>lines 45&#x02013;47</italic>, resulting in the data set <italic>final</italic> which contains numbers of cases with each unique combination of matching variables, as well as the number of matched controls for each combination.</p>
<table-wrap position="float" id="T5">
<label>Table 5</label>
<caption><p>Lines 39&#x02013;54.</p></caption>
<table frame="hsides" rules="groups">
<thead><tr>
<th valign="top" align="left"><bold><monospace>Line</monospace></bold></th>
<th valign="top" align="left"><bold><monospace>Code</monospace></bold></th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" align="left"><monospace>39.</monospace></td>
<td valign="top" align="left"><monospace>PROC FREQ NOPRINT DATA</monospace> &#x0003D; <monospace>matches;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>40.</monospace></td>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0; TABLES case_age</monospace><sup>&#x0002A;</sup><monospace>case_gender/OUT</monospace> &#x0003D; <monospace>con_out;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>41.</monospace></td>
<td valign="top" align="left"><monospace>PROC SORT DATA</monospace> &#x0003D; <monospace>caseout(RENAME</monospace> &#x0003D;</td>
</tr>
<tr>
<td/>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;(age</monospace> &#x0003D; <monospace>case_age gender</monospace> &#x0003D; <monospace>case_gender</monospace></td>
</tr>
<tr>
<td/>
<td valign="top" align="left"><monospace>count</monospace> &#x0003D; <monospace>case_cnt));</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>42.</monospace></td>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;BY case_age case_gender;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>43.</monospace></td>
<td valign="top" align="left"><monospace>PROC SORT DATA</monospace> &#x0003D; <monospace>con_out (RENAME</monospace> &#x0003D; <monospace>(count</monospace> &#x0003D; <monospace>con_cnt));</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>44.</monospace></td>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;BY case_age case_gender;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>45.</monospace></td>
<td valign="top" align="left"><monospace>DATA final (DROP</monospace> &#x0003D; <monospace>percent);</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>46.</monospace></td>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;MERGE caseout con_out;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>47.</monospace></td>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;BY case_age case_gender;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>48.</monospace></td>
<td valign="top" align="left"><monospace>con_need</monospace> &#x0003D; <monospace>case_cnt</monospace><sup>&#x0002A;</sup><monospace>&#x00026;ratio;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>49.</monospace></td>
<td valign="top" align="left"><monospace>IF con_cnt</monospace> &#x0003D; <monospace>. THEN con_cnt</monospace> &#x0003D; <monospace>0;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>50.</monospace></td>
<td valign="top" align="left"><monospace>diff</monospace> &#x0003D; <monospace>con_cnt-con_need;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>51.</monospace></td>
<td valign="top" align="left"><monospace>PROC PRINT DATA</monospace> &#x0003D; <monospace>final;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>52.</monospace></td>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;WHERE diff</monospace>&#x0003C;<monospace> 0;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>53.</monospace></td>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;TITLE &#x02018;Insufficient Matches&#x02019;;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>54.</monospace></td>
<td valign="top" align="left"><monospace>RUN;</monospace></td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<p><italic>To investigate whether all cases have received the desired amount of matched controls, the code in this table may be used. It results in a table showing the cases missing one or more matched controls</italic>.</p>
</table-wrap-foot>
</table-wrap>
<p>Two new variables are created in <italic>lines 48&#x02013;50, con_need</italic> and <italic>diff</italic> . They represent the number of controls needed for each type of case and the difference between the number of controls matched and needed, respectively. Finally, in <italic>lines 51&#x02013;54</italic>, the table named &#x0201C;insufficient matches&#x0201D; is created from the data set <italic>final</italic>. The table contains the cases who did not receive a sufficient number of matched controls.</p></sec>
<sec sec-type="discussion" id="s7">
<title>Discussion</title>
<p>The program presented in this paper uses individual matching, i.e., matching of controls to cases based on specific characteristics. The program makes it possible to match on several variables. It provides a random selection of eligible controls and ensures that each control is only used once. In the event of more than one control per case, the program will assign all controls before moving on to the next case. This strategy is timesaving and useful with large data sets. The program has been revised from its previous edition (Mounib and Satchi, <xref ref-type="bibr" rid="B3">2000</xref>) which contained several issues that impeded its use. In its current form, the program has successfully been used by the authors to match multiple controls to more than 40,000 cases (Mortensen et al., <xref ref-type="bibr" rid="B2">2017</xref>).</p>
<p>The program is easy to customize. In order to widen or narrow the age span or match more or fewer controls it is possible to change the value of <italic>agerange</italic> and/or <italic>ratio</italic>. Often, it will not be necessary to match on other variables than age and gender. However, it is possible to add matching variables to the program. For instance, in order to match on ethnicity, a categorical variable that describes ethnic background, <italic>ethnic</italic>, is needed in the <italic>population</italic> data set. The changes that need to be made in the program are listed in bold in <xref ref-type="table" rid="T6">Table 6</xref>.</p>
<table-wrap position="float" id="T6">
<label>Table 6</label>
<caption><p>An example of addition of a matching variable.</p></caption>
<table frame="hsides" rules="groups">
<thead><tr>
<th valign="top" align="left"><bold><monospace>Line</monospace></bold></th>
<th valign="top" align="left"><bold><monospace>Code</monospace></bold></th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" align="left"><monospace>9.</monospace></td>
<td valign="top" align="left"><monospace>TABLES age</monospace><sup>&#x0002A;</sup><monospace>gender</monospace><sup>&#x0002A;</sup><monospace><bold>ethnic</bold>/OUT</monospace> &#x0003D; <monospace>caseout;</monospace></td>
</tr> <tr>
<td valign="top" align="left"><monospace>11.</monospace></td>
<td valign="top" align="left"><monospace>%MACRO sample(v_age, v_gender, v_count,<bold>v_ethnic</bold>);</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>14.</monospace></td>
<td valign="top" align="left"><monospace>WHERE (&#x00026;v_age-&#x00026;agerange</monospace> &#x0003C;&#x0003D; <monospace>age</monospace> &#x0003C;&#x0003D; <monospace>&#x00026;v_age</monospace>&#x0002B;<monospace>&#x00026;agerange)</monospace></td>
</tr>
<tr>
<td/>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;AND</monospace></td>
</tr>
<tr>
<td/>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;(gender</monospace> &#x0003D; <monospace> &#x0201C;&#x00026;v_gender&#x0201D;)</monospace></td>
</tr>
<tr>
<td/>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;<bold>AND</bold></monospace></td>
</tr>
<tr>
<td/>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;(ethnic</monospace><bold>&#x0003D;</bold><monospace> &#x0201C;&#x00026;v_ethnic&#x0201D;);</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>16.</monospace></td>
<td valign="top" align="left"><monospace>case_gender</monospace> &#x0003D; <monospace> &#x0201C;&#x00026;v_gender&#x0201D;;</monospace></td>
</tr>
<tr>
<td/>
<td valign="top" align="left"><bold><monospace>case_ethnic</monospace><bold>&#x0003D;</bold><monospace> &#x0201C;&#x00026;v_ethnic&#x0201D;;</monospace></bold></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>37.</monospace></td>
<td valign="top" align="left"><monospace>CALL EXECUTE</monospace></td>
</tr>
<tr>
<td/>
<td valign="top" align="left"><monospace>(&#x02018;%sample(&#x02018;||age||&#x02019;,&#x02018;||gender||&#x02019;,&#x02018;||count||&#x02019;</monospace></td>
</tr>
<tr>
<td/>
<td valign="top" align="left"><bold><monospace>,&#x02018;||ethnic||&#x02019;)&#x00027;);</monospace></bold></td>
</tr> <tr style="border-top: thin solid #000000;">
<td valign="top" align="left"><monospace>40.</monospace></td>
<td valign="top" align="left"><monospace>TABLES case_age</monospace><sup>&#x0002A;</sup><monospace>case_gender</monospace><sup>&#x0002A;</sup><monospace><bold>case_ethnic</bold>/OUT</monospace> &#x0003D; <monospace>con_out;</monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>41.</monospace></td>
<td valign="top" align="left"><monospace>PROC SORT DATA</monospace> &#x0003D; <monospace>caseout(RENAME</monospace> &#x0003D;</td>
</tr>
<tr>
<td/>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;(age</monospace> &#x0003D; <monospace>case_age gender</monospace> &#x0003D; <monospace>case_gender count</monospace> &#x0003D; <monospace>case_cnt</monospace></td>
</tr>
<tr>
<td/>
<td valign="top" align="left"><bold><monospace>&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;ethnic</monospace><bold>&#x0003D;</bold><monospace>case_ethnic));</monospace></bold></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>42.</monospace></td>
<td valign="top" align="left"><monospace>&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;BY case_age case_gender <bold>case_ethnic;</bold></monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>44.</monospace></td>
<td valign="top" align="left"><monospace>BY case_age case_gender <bold>case_ethnic;</bold></monospace></td>
</tr>
<tr>
<td valign="top" align="left"><monospace>47.</monospace></td>
<td valign="top" align="left"><monospace>BY case_age case_gender <bold>case_ethnic;</bold></monospace></td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<p><italic>The table contains the lines of the program that need changing at the addition of an extra matching variable (ethnic). The lines are numbered corresponding to the lines in <xref ref-type="table" rid="T1">Tables 1</xref>&#x02013;<xref ref-type="table" rid="T5">5</xref>, and the changes are written in bold</italic>.</p>
</table-wrap-foot>
</table-wrap>
<p>When having a small number of possible controls and/or very strict matching criteria, the program presented here may fall short, and another strategy may be considered, where the program locates controls for the cases with fewest possible controls first (Wang, <xref ref-type="bibr" rid="B7">2012</xref>). However, this option will be time-consuming for larger data sets. It has not been possible to test the code in other versions of the SAS Software than Version 9.4 and University Edition due to inaccessibility. It is therefore not possible for us to guarantee the applicability to other versions.</p></sec>
<sec sec-type="conclusions" id="s8">
<title>Conclusion</title>
<p>We have presented a program for randomized matching of controls to cases using SAS software. Variables, statements, and options have been explained to ease understanding of the code for researchers less used to working with the software. The program can handle several matching variables and an adjustable ratio of controls. The selection of controls is randomized and automated which minimizes the risk of selection bias. Also, the program produces a variable as well as a table by which the researchers can examine which cases did not receive the desired number of controls.</p>
<p>SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. &#x000AE;indicates USA registration.</p></sec>
<sec id="s9">
<title>Author Contributions</title>
<p>All authors contributed to the conception of the work. LM drafted the manuscript. KA, JB, H-CP, and JR revised the manuscript critically. All authors have given final approval and are accountable for the content of this article.</p>
<sec>
<title>Conflict of Interest Statement</title>
<p>The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.</p></sec></sec>
</body>
<back>
<ref-list>
<title>References</title>
<ref id="B1">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Bloom</surname> <given-names>M. S.</given-names></name> <name><surname>Schisterman</surname> <given-names>E. F.</given-names></name> <name><surname>Hediger</surname> <given-names>M. L.</given-names></name></person-group> (<year>2007</year>). <article-title>The use and misuse of matching in case-control studies: the example of polycystic ovary syndrome</article-title>. <source>Fertil. Steril.</source> <volume>88</volume>, <fpage>707</fpage>&#x02013;<lpage>710</lpage>. <pub-id pub-id-type="doi">10.1016/j.fertnstert.2006.11.125</pub-id><pub-id pub-id-type="pmid">17433314</pub-id></citation></ref>
<ref id="B2">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Mortensen</surname> <given-names>L. Q.</given-names></name> <name><surname>Burcharth</surname> <given-names>J.</given-names></name> <name><surname>Andresen</surname> <given-names>K.</given-names></name> <name><surname>Pommergaard</surname> <given-names>H. C.</given-names></name> <name><surname>Rosenberg</surname> <given-names>J.</given-names></name></person-group> (<year>2017</year>). <article-title>An 18-year nationwide cohort study on the association between diverticulitis and colon cancer</article-title>. <source>Ann. Surg.</source> <volume>265</volume>, <fpage>954</fpage>&#x02013;<lpage>959</lpage>. <pub-id pub-id-type="doi">10.1097/SLA.0000000000001794</pub-id><pub-id pub-id-type="pmid">27192351</pub-id></citation></ref>
<ref id="B3">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Mounib</surname> <given-names>E. L.</given-names></name> <name><surname>Satchi</surname> <given-names>T.</given-names></name></person-group> (<year>2000</year>). <article-title>Automating the selection of controls in case-control studies</article-title>, in <source>Proceedings of the Twenty-Fifth Annual SAS&#x000AE; Users Group International Conference</source> (<publisher-loc>Indianapolis, IN</publisher-loc>).</citation></ref>
<ref id="B4">
<citation citation-type="book"><person-group person-group-type="author"><collab>SAS Institute Inc</collab></person-group> (<year>2001</year>). <article-title>Writing lines to the SAS log or to an output file</article-title>, in <source>Step-by-Step Programming with Base SAS</source>&#x000AE; <italic>Software</italic> (<publisher-loc>Cary, NC</publisher-loc>: <publisher-name>SAS Institute Inc</publisher-name>.), <fpage>521</fpage>&#x02013;<lpage>536</lpage>.</citation></ref>
<ref id="B5">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Slaughter</surname> <given-names>S. J.</given-names></name> <name><surname>Delwiche</surname> <given-names>L. D.</given-names></name></person-group> (<year>2004</year>). <article-title>SAS&#x000AE; macro programming for beginners</article-title>, in <source>Proceedings of the Twenty-Ninth Annual SAS&#x000AE; Users Group International Conference</source> (<publisher-loc>Montreal, QC</publisher-loc>).</citation></ref>
<ref id="B6">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Usov</surname> <given-names>A.</given-names></name></person-group> (<year>2014</year>). <article-title>Call execute: let your program run your macro</article-title>, in <source>Conference Paper Presented at Pharmaceutical Users Software Exchange Annual Conference</source> (<publisher-loc>London, UK</publisher-loc>).</citation></ref>
<ref id="B7">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Wang</surname> <given-names>Z.</given-names></name></person-group> (<year>2012</year>). <article-title>Optimized 1:N case-control match using SAS&#x000AE;</article-title>, in <source>Proceedings of the SAS&#x000AE; Global Forum 2012 Conference</source> (<publisher-loc>Orlando, FL</publisher-loc>).</citation></ref>
</ref-list> 
</back>
</article>