<?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 Creating Synthetic Data with SAS/OR in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/Creating-Synthetic-Data-with-SAS-OR/m-p/894683#M10600</link>
    <description>&lt;P&gt;I am trying to create a&amp;nbsp;Creating Synthetic Data with SAS/OR. Attached is the file I am using and below is the code. Except I am getting the following errors?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;598 data INPUTDATA; set SyntheticData(where=(ranuni(2023)&amp;lt;.5));&lt;/P&gt;
&lt;P&gt;NOTE: There were 24372 observations read from the data set WORK.SYNTHETICDATA.&lt;BR /&gt;WHERE RANUNI(2023)&amp;lt;0.5;&lt;BR /&gt;NOTE: The data set WORK.INPUTDATA has 24372 observations and 13 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.04 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;599 data METADATA; set SyntheticData(where=(ranuni(2023)&amp;gt;=.5));&lt;BR /&gt;600 run;&lt;/P&gt;
&lt;P&gt;NOTE: There were 24470 observations read from the data set WORK.SYNTHETICDATA.&lt;BR /&gt;WHERE RANUNI(2023)&amp;gt;=0.5;&lt;BR /&gt;NOTE: The data set WORK.METADATA has 24470 observations and 13 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.03 seconds&lt;BR /&gt;cpu time 0.03 seconds&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;601&lt;BR /&gt;602&lt;BR /&gt;603 %macro GENDATA(INPUTDATA=INPUTDATA, METADATA=METADATA, OUTPUTDATA=SyntheticData,&lt;BR /&gt;604 MOMENTORDER=3, NUMOBS=0, MINNUMIPCANDS=0, LPBATCHSIZE=10, LPGAP=1E-3,&lt;BR /&gt;605 NUMCOFORTHREADS=1, MILPMAXTIME=600, RELOBJGAP=1E-4, ALPHA=0.95,&lt;BR /&gt;606 RANDSEED=0);&lt;BR /&gt;607&lt;BR /&gt;608 proc optmodel printlevel=0;&lt;BR /&gt;609 call streaminit(&amp;amp;RANDSEED);&lt;BR /&gt;610 %PRELIMINARYSTEP(INPUTDATA=&amp;amp;INPUTDATA, METADATA=&amp;amp;METADATA,&lt;BR /&gt;611 MOMENTORDER=&amp;amp;MOMENTORDER, ALPHA=&amp;amp;ALPHA);&lt;BR /&gt;612 %LPSTEP(MOMENTORDER=&amp;amp;MOMENTORDER, NUMOBS=&amp;amp;NUMOBS,&lt;BR /&gt;613 MINNUMIPCANDS=&amp;amp;MINNUMIPCANDS, LPBATCHSIZE=&amp;amp;LPBATCHSIZE,&lt;BR /&gt;614 LPGAP=&amp;amp;LPGAP, NUMCOFORTHREADS=&amp;amp;NUMCOFORTHREADS);&lt;BR /&gt;615 %IPSTEP(OUTPUTDATA=&amp;amp;OUTPUTDATA, MOMENTORDER=&amp;amp;MOMENTORDER,&lt;BR /&gt;616 NUMOBS=&amp;amp;NUMOBS, MINNUMIPCANDS=&amp;amp;MINNUMIPCANDS,&lt;BR /&gt;617 MILPMAXTIME=&amp;amp;MILPMAXTIME, RELOBJGAP=&amp;amp;RELOBJGAP);&lt;BR /&gt;618 quit;&lt;BR /&gt;619&lt;BR /&gt;620 %mend GENDATA;&lt;BR /&gt;621 %GENDATA;&lt;BR /&gt;NOTE: Line generated by the invoked macro "GENDATA".&lt;BR /&gt;1 %PRELIMINARYSTEP(INPUTDAT&lt;BR /&gt;-&lt;BR /&gt;180&lt;BR /&gt;1 ! A=&amp;amp;INPUTDATA, METADATA=&amp;amp;METADATA, MOMENTORDER=&amp;amp;MOMENTORDER, ALPHA=&amp;amp;ALPHA);&lt;BR /&gt;1 ! %LPSTEP(MOMENTORDER=&amp;amp;MOMENTORDER, NUMOBS=&amp;amp;NUMOBS,&lt;BR /&gt;WARNING: Apparent invocation of macro PRELIMINARYSTEP not resolved.&lt;BR /&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/P&gt;
&lt;P&gt;NOTE: Line generated by the invoked macro "GENDATA".&lt;BR /&gt;1 proc optmodel printlevel=0; call streaminit(&amp;amp;RANDSEED);&lt;BR /&gt;1 ! %PRELIMINARYSTEP(INPUTDATA=&amp;amp;INPUTDATA, METADATA=&amp;amp;METADATA, MOMENTORDER=&amp;amp;MOMENTORDER,&lt;BR /&gt;1 ! ALPHA=&amp;amp;ALPHA); %LPSTEP(MOMENTORDER=&amp;amp;MOMENTORDER, NUMOBS=&amp;amp;NUMOBS,&lt;BR /&gt;-&lt;BR /&gt;180&lt;BR /&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/P&gt;
&lt;P&gt;WARNING: Apparent invocation of macro LPSTEP not resolved.&lt;BR /&gt;NOTE: Line generated by the invoked macro "GENDATA".&lt;BR /&gt;2 %IPSTEP(OUTPUTDATA=&amp;amp;OUTPUTDATA, MOMENTORDER=&amp;amp;MOMENTORDER, NUMOBS=&amp;amp;NUMOBS,&lt;/P&gt;
&lt;P&gt;-&lt;/P&gt;
&lt;P&gt;180&lt;BR /&gt;2 ! MINNUMIPCANDS=&amp;amp;MINNUMIPCANDS,&lt;BR /&gt;WARNING: Apparent invocation of macro IPSTEP not resolved.&lt;BR /&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/P&gt;
&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE OPTMODEL used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 17 Sep 2023 14:16:11 GMT</pubDate>
    <dc:creator>Kaushansky</dc:creator>
    <dc:date>2023-09-17T14:16:11Z</dc:date>
    <item>
      <title>Creating Synthetic Data with SAS/OR</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Creating-Synthetic-Data-with-SAS-OR/m-p/894683#M10600</link>
      <description>&lt;P&gt;I am trying to create a&amp;nbsp;Creating Synthetic Data with SAS/OR. Attached is the file I am using and below is the code. Except I am getting the following errors?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;598 data INPUTDATA; set SyntheticData(where=(ranuni(2023)&amp;lt;.5));&lt;/P&gt;
&lt;P&gt;NOTE: There were 24372 observations read from the data set WORK.SYNTHETICDATA.&lt;BR /&gt;WHERE RANUNI(2023)&amp;lt;0.5;&lt;BR /&gt;NOTE: The data set WORK.INPUTDATA has 24372 observations and 13 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.04 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;599 data METADATA; set SyntheticData(where=(ranuni(2023)&amp;gt;=.5));&lt;BR /&gt;600 run;&lt;/P&gt;
&lt;P&gt;NOTE: There were 24470 observations read from the data set WORK.SYNTHETICDATA.&lt;BR /&gt;WHERE RANUNI(2023)&amp;gt;=0.5;&lt;BR /&gt;NOTE: The data set WORK.METADATA has 24470 observations and 13 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.03 seconds&lt;BR /&gt;cpu time 0.03 seconds&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;601&lt;BR /&gt;602&lt;BR /&gt;603 %macro GENDATA(INPUTDATA=INPUTDATA, METADATA=METADATA, OUTPUTDATA=SyntheticData,&lt;BR /&gt;604 MOMENTORDER=3, NUMOBS=0, MINNUMIPCANDS=0, LPBATCHSIZE=10, LPGAP=1E-3,&lt;BR /&gt;605 NUMCOFORTHREADS=1, MILPMAXTIME=600, RELOBJGAP=1E-4, ALPHA=0.95,&lt;BR /&gt;606 RANDSEED=0);&lt;BR /&gt;607&lt;BR /&gt;608 proc optmodel printlevel=0;&lt;BR /&gt;609 call streaminit(&amp;amp;RANDSEED);&lt;BR /&gt;610 %PRELIMINARYSTEP(INPUTDATA=&amp;amp;INPUTDATA, METADATA=&amp;amp;METADATA,&lt;BR /&gt;611 MOMENTORDER=&amp;amp;MOMENTORDER, ALPHA=&amp;amp;ALPHA);&lt;BR /&gt;612 %LPSTEP(MOMENTORDER=&amp;amp;MOMENTORDER, NUMOBS=&amp;amp;NUMOBS,&lt;BR /&gt;613 MINNUMIPCANDS=&amp;amp;MINNUMIPCANDS, LPBATCHSIZE=&amp;amp;LPBATCHSIZE,&lt;BR /&gt;614 LPGAP=&amp;amp;LPGAP, NUMCOFORTHREADS=&amp;amp;NUMCOFORTHREADS);&lt;BR /&gt;615 %IPSTEP(OUTPUTDATA=&amp;amp;OUTPUTDATA, MOMENTORDER=&amp;amp;MOMENTORDER,&lt;BR /&gt;616 NUMOBS=&amp;amp;NUMOBS, MINNUMIPCANDS=&amp;amp;MINNUMIPCANDS,&lt;BR /&gt;617 MILPMAXTIME=&amp;amp;MILPMAXTIME, RELOBJGAP=&amp;amp;RELOBJGAP);&lt;BR /&gt;618 quit;&lt;BR /&gt;619&lt;BR /&gt;620 %mend GENDATA;&lt;BR /&gt;621 %GENDATA;&lt;BR /&gt;NOTE: Line generated by the invoked macro "GENDATA".&lt;BR /&gt;1 %PRELIMINARYSTEP(INPUTDAT&lt;BR /&gt;-&lt;BR /&gt;180&lt;BR /&gt;1 ! A=&amp;amp;INPUTDATA, METADATA=&amp;amp;METADATA, MOMENTORDER=&amp;amp;MOMENTORDER, ALPHA=&amp;amp;ALPHA);&lt;BR /&gt;1 ! %LPSTEP(MOMENTORDER=&amp;amp;MOMENTORDER, NUMOBS=&amp;amp;NUMOBS,&lt;BR /&gt;WARNING: Apparent invocation of macro PRELIMINARYSTEP not resolved.&lt;BR /&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/P&gt;
&lt;P&gt;NOTE: Line generated by the invoked macro "GENDATA".&lt;BR /&gt;1 proc optmodel printlevel=0; call streaminit(&amp;amp;RANDSEED);&lt;BR /&gt;1 ! %PRELIMINARYSTEP(INPUTDATA=&amp;amp;INPUTDATA, METADATA=&amp;amp;METADATA, MOMENTORDER=&amp;amp;MOMENTORDER,&lt;BR /&gt;1 ! ALPHA=&amp;amp;ALPHA); %LPSTEP(MOMENTORDER=&amp;amp;MOMENTORDER, NUMOBS=&amp;amp;NUMOBS,&lt;BR /&gt;-&lt;BR /&gt;180&lt;BR /&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/P&gt;
&lt;P&gt;WARNING: Apparent invocation of macro LPSTEP not resolved.&lt;BR /&gt;NOTE: Line generated by the invoked macro "GENDATA".&lt;BR /&gt;2 %IPSTEP(OUTPUTDATA=&amp;amp;OUTPUTDATA, MOMENTORDER=&amp;amp;MOMENTORDER, NUMOBS=&amp;amp;NUMOBS,&lt;/P&gt;
&lt;P&gt;-&lt;/P&gt;
&lt;P&gt;180&lt;BR /&gt;2 ! MINNUMIPCANDS=&amp;amp;MINNUMIPCANDS,&lt;BR /&gt;WARNING: Apparent invocation of macro IPSTEP not resolved.&lt;BR /&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/P&gt;
&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE OPTMODEL used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Sep 2023 14:16:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Creating-Synthetic-Data-with-SAS-OR/m-p/894683#M10600</guid>
      <dc:creator>Kaushansky</dc:creator>
      <dc:date>2023-09-17T14:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Synthetic Data with SAS/OR</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Creating-Synthetic-Data-with-SAS-OR/m-p/894689#M10601</link>
      <description>&lt;P&gt;This part of your errors:&lt;/P&gt;
&lt;PRE&gt;WARNING: Apparent invocation of macro &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;PRELIMINARYSTEP&lt;/STRONG&gt;&lt;/FONT&gt; not resolved.
ERROR 180-322: Statement is not valid or it is used out of proper order.

NOTE: Line generated by the invoked macro "GENDATA".&lt;/PRE&gt;
&lt;P&gt;Tells you that your macro named GENDATA is attempting to use another macro named PRELIMINARYSTEP.&lt;/P&gt;
&lt;P&gt;Any macro call requires that the macro be one of compiled in the current session before use, that means execute the code that starts "%macro Preliminarystep" through a %mend statement, OR be in a file with the name of the macro and in a location that SAS has been told to look for macro code using the SASAUTOS= system option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Apparently you have multiple macros, you can recognize them by names like %Preliminarystep, %Lpstep %IPstep, that need to be made available you session before running this code. Find the source files and execute them.&lt;/P&gt;
&lt;P&gt;Of find the person that wrote your GENDATA macro and ask them where the code for these other macros should be.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Each SAS installed module, such as SAS/OR may also install its own macros that SAS would find. If you do not have a license for, or the module is not installed, then those SAS supplied macros would not be available. I don't recognize those as SAS/OR macros so can't tell if those might indicate missing install.&lt;/P&gt;</description>
      <pubDate>Sun, 17 Sep 2023 16:33:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Creating-Synthetic-Data-with-SAS-OR/m-p/894689#M10601</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-09-17T16:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Synthetic Data with SAS/OR</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Creating-Synthetic-Data-with-SAS-OR/m-p/894704#M10602</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you started from here?&lt;/P&gt;
&lt;P&gt;Creating Synthetic Data with SAS/OR &lt;BR /&gt;By Jared Erickson on Operations Research with SAS May 17, 2017&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/operations/2017/05/17/creating-synthetic-data-sasor/" target="_blank"&gt;https://blogs.sas.com/content/operations/2017/05/17/creating-synthetic-data-sasor/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's a difference between&lt;/P&gt;
&lt;UL class="lia-list-style-type-square"&gt;
&lt;LI&gt;synthetic data (starting from an original set of data and producing a synthetic twin) and&lt;/LI&gt;
&lt;LI&gt;simulation of data (starting from statistical properties and uni- + multivariate statistics and creating data from scratch that obey these properties and statistics).&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For both of these exercises, SAS/OR (SAS Optimization) might not be the best option.&lt;/P&gt;
&lt;UL class="lia-list-style-type-square"&gt;
&lt;LI&gt;Synthetic data are best made with generative adversarial network&amp;nbsp;(GAN)&amp;nbsp;or&amp;nbsp;transformer&amp;nbsp;architecture.&lt;/LI&gt;
&lt;LI&gt;Simulated data are best made with data steps and / or IML (matrix language) code.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Sun, 17 Sep 2023 20:33:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Creating-Synthetic-Data-with-SAS-OR/m-p/894704#M10602</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2023-09-17T20:33:34Z</dc:date>
    </item>
  </channel>
</rss>

