<?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: Is the Bayes command in PROC QLIM still working? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Is-the-Bayes-command-in-PROC-QLIM-still-working/m-p/872786#M43164</link>
    <description>&lt;P&gt;Yes, the PRIOR and BAYES statements are valid in PROC QLIM.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you are using the old SAS 9 Enhanced Editor in the Windows environment. The color-coding in that editor is not perfect. Sometimes there are enhancements to a procedure that are not recognized by the editor's color-coding software. To determine if a statement is valid, just run the program and you will see that it works.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are correct that the editor should not color these statements in red. I will forward your complaint to the team that supports color-coding and syntax prompting in the SAS editors.&lt;/P&gt;</description>
    <pubDate>Fri, 28 Apr 2023 12:28:22 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2023-04-28T12:28:22Z</dc:date>
    <item>
      <title>Is the Bayes command in PROC QLIM still working?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Is-the-Bayes-command-in-PROC-QLIM-still-working/m-p/872692#M43162</link>
      <description>&lt;P&gt;When I copy the example from SAS Help into the program editor both "Bayes" and "Prior" are highlighted in red as invalid.&amp;nbsp; Relieved that my original coding was not inept, but concerned that SAS 's own examples produce errors.&amp;nbsp; Have the Bayes options in PROC QLIM been disabled?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 21:27:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Is-the-Bayes-command-in-PROC-QLIM-still-working/m-p/872692#M43162</guid>
      <dc:creator>anakcu</dc:creator>
      <dc:date>2023-04-27T21:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: Is the Bayes command in PROC QLIM still working?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Is-the-Bayes-command-in-PROC-QLIM-still-working/m-p/872778#M43163</link>
      <description>&lt;P&gt;Since the original question generated no interest, perhaps someone from SAS could explain why the Example they provide in the software documentation generates errors when you try to run it.&amp;nbsp; Has the Bayes command been disabled for PROC QLIM?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc qlim data=test plots(prior)=all;&lt;BR /&gt;model TicketSales = WinChance price;&lt;BR /&gt;endogenous TicketSales ~ censored(lb=0 ub= 50000);&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;prior&lt;/FONT&gt; intercept~normal(mean=48000);&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;prior&lt;/FONT&gt; WinChance~normal(mean=5000);&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;prior&lt;/FONT&gt; Price~normal(mean=-100);&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;bayes&lt;/FONT&gt; NBI=10000 NMC=30000 THIN=1 ntrds=1 DIAG=ALL STATS=ALL seed=2;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 11:07:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Is-the-Bayes-command-in-PROC-QLIM-still-working/m-p/872778#M43163</guid>
      <dc:creator>anakcu</dc:creator>
      <dc:date>2023-04-28T11:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: Is the Bayes command in PROC QLIM still working?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Is-the-Bayes-command-in-PROC-QLIM-still-working/m-p/872786#M43164</link>
      <description>&lt;P&gt;Yes, the PRIOR and BAYES statements are valid in PROC QLIM.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you are using the old SAS 9 Enhanced Editor in the Windows environment. The color-coding in that editor is not perfect. Sometimes there are enhancements to a procedure that are not recognized by the editor's color-coding software. To determine if a statement is valid, just run the program and you will see that it works.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are correct that the editor should not color these statements in red. I will forward your complaint to the team that supports color-coding and syntax prompting in the SAS editors.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 12:28:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Is-the-Bayes-command-in-PROC-QLIM-still-working/m-p/872786#M43164</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2023-04-28T12:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: Is the Bayes command in PROC QLIM still working?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Is-the-Bayes-command-in-PROC-QLIM-still-working/m-p/872787#M43165</link>
      <description>&lt;P&gt;My own code would not run as both PRIOR and BAYES were identified as errors and highlighted in red. To make sure it was an error in my code I copied the SAS example into the program editor.&amp;nbsp; Same exact syntax error.&amp;nbsp; I have tried this in two different computer environments and get the same error result.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 12:35:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Is-the-Bayes-command-in-PROC-QLIM-still-working/m-p/872787#M43165</guid>
      <dc:creator>anakcu</dc:creator>
      <dc:date>2023-04-28T12:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: Is the Bayes command in PROC QLIM still working?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Is-the-Bayes-command-in-PROC-QLIM-still-working/m-p/872789#M43166</link>
      <description>&lt;P&gt;The color of a statement in the editor does not prevent code from running. The BAYES and PRIOR statements were introduced in SAS/ETS 12.1, which was released as part of SAS 9.3M2.&amp;nbsp; The code will run as long as you have a license for SAS/ETS and are running SAS 9.3M2&amp;nbsp; or any SAS 9.4 release.&amp;nbsp; If your code does not run, you might not have a license for ETS. Run&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc setinit;run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and examine the log. It should tell you your current version of SAS and the products that you have licensed.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 12:50:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Is-the-Bayes-command-in-PROC-QLIM-still-working/m-p/872789#M43166</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2023-04-28T12:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: Is the Bayes command in PROC QLIM still working?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Is-the-Bayes-command-in-PROC-QLIM-still-working/m-p/872791#M43167</link>
      <description>&lt;P&gt;Thanks for providing a way to check this possible explanation.&amp;nbsp; Unfortunately, both systems have ETS in their licenses that expire no earlier than Dec. 2026.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 12:58:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Is-the-Bayes-command-in-PROC-QLIM-still-working/m-p/872791#M43167</guid>
      <dc:creator>anakcu</dc:creator>
      <dc:date>2023-04-28T12:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: Is the Bayes command in PROC QLIM still working?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Is-the-Bayes-command-in-PROC-QLIM-still-working/m-p/872795#M43168</link>
      <description>&lt;P&gt;As always, the best way to get a helpful response is to submit the code that you are using, then copy/paste the entire log into the discussion. For example, here is what I get on my computer:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
do i=1 to 200;
e1 = rannor(8726)*2000;
WinChance = ranuni(8772);
Price = 10+ranexp(8773)*4;
y = 48000 + 5000*WinChance - 100 * price + e1;
if y&amp;gt;50000 then TicketSales = 50000;
if y&amp;lt;=50000 then TicketSales = y;
output;
end;
keep WinChance price y TicketSales;
run;

proc qlim data=test plots(prior)=all;
model TicketSales = WinChance price;
endogenous TicketSales ~ censored(lb=0 ub= 50000);
prior intercept~normal(mean=48000);
prior WinChance~normal(mean=5000);
prior Price~normal(mean=-100);
bayes NBI=10000 NMC=30000 THIN=1 ntrds=1 DIAG=ALL STATS=ALL seed=2;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;LOG:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;8695
8696  proc qlim data=test plots(prior)=all;
8697  model TicketSales = WinChance price;
8698  endogenous TicketSales ~ censored(lb=0 ub= 50000);
8699  prior intercept~normal(mean=48000);
8700  prior WinChance~normal(mean=5000);
8701  prior Price~normal(mean=-100);
8702  bayes NBI=10000 NMC=30000 THIN=1 ntrds=1 DIAG=ALL STATS=ALL seed=2;
8703  run;

NOTE: Convergence criterion (ABSGCONV=0.00001) satisfied.
NOTE: Begin simulation.
NOTE: End simulation.
NOTE: Begin calculation of summary and diagnostics statistics.
NOTE: End calculation of summary and diagnostics statistics.
NOTE: Begin plotting.
NOTE: End plotting.
NOTE: PROCEDURE QLIM used (Total process time):
      real time           4.21 seconds
      cpu time            2.78 seconds


&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 28 Apr 2023 13:28:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Is-the-Bayes-command-in-PROC-QLIM-still-working/m-p/872795#M43168</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2023-04-28T13:28:20Z</dc:date>
    </item>
    <item>
      <title>Re: Is the Bayes command in PROC QLIM still working?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Is-the-Bayes-command-in-PROC-QLIM-still-working/m-p/872817#M43169</link>
      <description>&lt;P&gt;I can not share my code as it is within a confidential data center.&amp;nbsp; However, running the test example for PROC QLIM first seemed to convince SAS it could also run my original code that it had earlier aborted because of errors.&amp;nbsp; Not sure if this increases or lessens my confidence in SAS.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 14:17:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Is-the-Bayes-command-in-PROC-QLIM-still-working/m-p/872817#M43169</guid>
      <dc:creator>anakcu</dc:creator>
      <dc:date>2023-04-28T14:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: Is the Bayes command in PROC QLIM still working?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Is-the-Bayes-command-in-PROC-QLIM-still-working/m-p/872824#M43170</link>
      <description>&lt;P&gt;If you had been able to share your original program and log, I feel confident that it would have revealed a problem in the initial submission. It could have been a missing or misspecified data set, a missing semicolon, a missing RUN statement, or something else. Anyway,&amp;nbsp;I'm glad you were able to resolve the issue.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 14:27:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Is-the-Bayes-command-in-PROC-QLIM-still-working/m-p/872824#M43170</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2023-04-28T14:27:29Z</dc:date>
    </item>
  </channel>
</rss>

