<?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 Different code producing same results in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Different-code-producing-same-results/m-p/654101#M196503</link>
    <description>&lt;P&gt;Below is my code, which is producing the same results. With the different output file names, and different regression variables, I would expect different results. I separated the two with #### to indicate a 'break' in the two requests. The bold/underlined text is what changes between the two.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is greatly appreciated! I've been looking over this forever...does anyone see the problem that I cannot find?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*BB: 3e*/&lt;BR /&gt;ods exclude all; /* suppress tables to screen */&lt;BR /&gt;ods output FitStatistics=&lt;U&gt;&lt;STRONG&gt;RegEq3e_Output&lt;/STRONG&gt;&lt;/U&gt;; /* contains results for each BY group */&lt;BR /&gt;proc reg data=temp.Equation3_interactions plots=none;&lt;BR /&gt;by datacqtr;&lt;BR /&gt;model lead_prccq = epsq bvpsq &lt;U&gt;&lt;STRONG&gt;BB_Real_GDP_Q&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;&lt;U&gt;&lt;STRONG&gt;BB_EPS BB_BV&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;cfpsq cashpsq dvpspq rdpsq&lt;BR /&gt;intanpsq spipsq ocipsq revpsq atpsq change_revtpsq&lt;BR /&gt;capxpsq cogspsq xsgapsq FF;&lt;BR /&gt;quit;&lt;BR /&gt;ods exclude none; /* no longer suppress tables */&lt;BR /&gt;&lt;BR /&gt;proc print data=&lt;U&gt;&lt;STRONG&gt;RegEq3e_Output&lt;/STRONG&gt;&lt;/U&gt; noobs;&lt;BR /&gt;where Label2="Adj R-Sq";&lt;BR /&gt;var datacqtr Label2 nValue2;&lt;BR /&gt;title 'Rsquared Values for Full Regression Equation 3 BB';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;/*To keep only the Adj Rsquared Rows*/&lt;BR /&gt;data temp.&lt;U&gt;&lt;STRONG&gt;RegEq3e_Output&lt;/STRONG&gt;&lt;/U&gt;; set work.&lt;U&gt;&lt;STRONG&gt;RegEq3e_Output&lt;/STRONG&gt;&lt;/U&gt;;&lt;BR /&gt;where Label2="Adj R-Sq";&lt;BR /&gt;keep datacqtr Label2 nValue2;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;/*Merge the Adj Rsquared data with the Quarter from Econ Vars*/&lt;BR /&gt;proc sql;&lt;BR /&gt;create table temp.&lt;U&gt;&lt;STRONG&gt;RegEq3e_QTR&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;as select *&lt;BR /&gt;from temp.&lt;U&gt;&lt;STRONG&gt;RegEq3e_Output&lt;/STRONG&gt;&lt;/U&gt; as a, work.EconVarFile as b&lt;BR /&gt;where a.datacqtr=b.datacqtr;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;proc print data=temp.&lt;U&gt;&lt;STRONG&gt;RegEq3e_QTR&lt;/STRONG&gt;&lt;/U&gt; noobs;&lt;BR /&gt;where Label2="Adj R-Sq";&lt;BR /&gt;var datacqtr Label2 nValue2 datacqtrQ;&lt;BR /&gt;title 'Rsquared for Full Equation with Quarterly Time Variable BB';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;/*BB (Bloomberg Real GDP):*/&lt;BR /&gt;proc reg data=temp.&lt;U&gt;&lt;STRONG&gt;RegEq3e_QTR&lt;/STRONG&gt;&lt;/U&gt; plots=none;&lt;BR /&gt;model nValue2 = datacqtrQ;&lt;BR /&gt;title 'Full Regression Equation 4 BB';&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;/*###################################################################*/&lt;/P&gt;&lt;P&gt;/*Jensen: 3f*/&lt;BR /&gt;ods exclude all; /* suppress tables to screen */&lt;BR /&gt;ods output FitStatistics=&lt;U&gt;&lt;STRONG&gt;RegEq3f_Output&lt;/STRONG&gt;&lt;/U&gt;; /* contains results for each BY group */&lt;BR /&gt;proc reg data=temp.Equation3_interactions plots=none;&lt;BR /&gt;by datacqtr;&lt;BR /&gt;model lead_prccq = epsq bvpsq &lt;U&gt;&lt;STRONG&gt;jen_calc&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;&lt;U&gt;&lt;STRONG&gt;jen_EPS jen_BV&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;cfpsq cashpsq dvpspq rdpsq&lt;BR /&gt;intanpsq spipsq ocipsq revpsq atpsq change_revtpsq&lt;BR /&gt;capxpsq cogspsq xsgapsq FF;&lt;BR /&gt;quit;&lt;BR /&gt;ods exclude none; /* no longer suppress tables */&lt;BR /&gt;&lt;BR /&gt;proc print data=&lt;U&gt;&lt;STRONG&gt;RegEq3f_Output&lt;/STRONG&gt; &lt;/U&gt;noobs;&lt;BR /&gt;where Label2="Adj R-Sq";&lt;BR /&gt;var datacqtr Label2 nValue2;&lt;BR /&gt;title 'Rsquared Values for Full Regression Equation 3 Jensen';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;/*To keep only the Adj Rsquared Rows*/&lt;BR /&gt;data temp.&lt;U&gt;&lt;STRONG&gt;RegEq3f_Output&lt;/STRONG&gt;&lt;/U&gt;; set work.&lt;U&gt;&lt;STRONG&gt;RegEq3f_Output&lt;/STRONG&gt;&lt;/U&gt;;&lt;BR /&gt;where Label2="Adj R-Sq";&lt;BR /&gt;keep datacqtr Label2 nValue2;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;/*Merge the Adj Rsquared data with the Quarter from Econ Vars*/&lt;BR /&gt;proc sql;&lt;BR /&gt;create table temp.&lt;U&gt;&lt;STRONG&gt;RegEq3f_QTR&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;as select *&lt;BR /&gt;from temp.&lt;U&gt;&lt;STRONG&gt;RegEq3f_Output&lt;/STRONG&gt;&lt;/U&gt; as a, work.EconVarFile as b&lt;BR /&gt;where a.datacqtr=b.datacqtr;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;proc print data=temp.&lt;U&gt;&lt;STRONG&gt;RegEq3f_QTR&lt;/STRONG&gt;&lt;/U&gt; noobs;&lt;BR /&gt;where Label2="Adj R-Sq";&lt;BR /&gt;var datacqtr Label2 nValue2 datacqtrQ;&lt;BR /&gt;title 'Rsquared for Full Equation with Quarterly Time Variable Jensen';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;/*Jensen (Monetary Policy):*/&lt;BR /&gt;proc reg data=temp.&lt;U&gt;&lt;STRONG&gt;RegEq3f_QTR&lt;/STRONG&gt;&lt;/U&gt; plots=none;&lt;BR /&gt;model nValue2 = datacqtrQ;&lt;BR /&gt;title 'Full Regression Equation 4 Jensen';&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 08 Jun 2020 04:07:11 GMT</pubDate>
    <dc:creator>jaimedba</dc:creator>
    <dc:date>2020-06-08T04:07:11Z</dc:date>
    <item>
      <title>Different code producing same results</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Different-code-producing-same-results/m-p/654101#M196503</link>
      <description>&lt;P&gt;Below is my code, which is producing the same results. With the different output file names, and different regression variables, I would expect different results. I separated the two with #### to indicate a 'break' in the two requests. The bold/underlined text is what changes between the two.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is greatly appreciated! I've been looking over this forever...does anyone see the problem that I cannot find?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*BB: 3e*/&lt;BR /&gt;ods exclude all; /* suppress tables to screen */&lt;BR /&gt;ods output FitStatistics=&lt;U&gt;&lt;STRONG&gt;RegEq3e_Output&lt;/STRONG&gt;&lt;/U&gt;; /* contains results for each BY group */&lt;BR /&gt;proc reg data=temp.Equation3_interactions plots=none;&lt;BR /&gt;by datacqtr;&lt;BR /&gt;model lead_prccq = epsq bvpsq &lt;U&gt;&lt;STRONG&gt;BB_Real_GDP_Q&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;&lt;U&gt;&lt;STRONG&gt;BB_EPS BB_BV&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;cfpsq cashpsq dvpspq rdpsq&lt;BR /&gt;intanpsq spipsq ocipsq revpsq atpsq change_revtpsq&lt;BR /&gt;capxpsq cogspsq xsgapsq FF;&lt;BR /&gt;quit;&lt;BR /&gt;ods exclude none; /* no longer suppress tables */&lt;BR /&gt;&lt;BR /&gt;proc print data=&lt;U&gt;&lt;STRONG&gt;RegEq3e_Output&lt;/STRONG&gt;&lt;/U&gt; noobs;&lt;BR /&gt;where Label2="Adj R-Sq";&lt;BR /&gt;var datacqtr Label2 nValue2;&lt;BR /&gt;title 'Rsquared Values for Full Regression Equation 3 BB';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;/*To keep only the Adj Rsquared Rows*/&lt;BR /&gt;data temp.&lt;U&gt;&lt;STRONG&gt;RegEq3e_Output&lt;/STRONG&gt;&lt;/U&gt;; set work.&lt;U&gt;&lt;STRONG&gt;RegEq3e_Output&lt;/STRONG&gt;&lt;/U&gt;;&lt;BR /&gt;where Label2="Adj R-Sq";&lt;BR /&gt;keep datacqtr Label2 nValue2;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;/*Merge the Adj Rsquared data with the Quarter from Econ Vars*/&lt;BR /&gt;proc sql;&lt;BR /&gt;create table temp.&lt;U&gt;&lt;STRONG&gt;RegEq3e_QTR&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;as select *&lt;BR /&gt;from temp.&lt;U&gt;&lt;STRONG&gt;RegEq3e_Output&lt;/STRONG&gt;&lt;/U&gt; as a, work.EconVarFile as b&lt;BR /&gt;where a.datacqtr=b.datacqtr;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;proc print data=temp.&lt;U&gt;&lt;STRONG&gt;RegEq3e_QTR&lt;/STRONG&gt;&lt;/U&gt; noobs;&lt;BR /&gt;where Label2="Adj R-Sq";&lt;BR /&gt;var datacqtr Label2 nValue2 datacqtrQ;&lt;BR /&gt;title 'Rsquared for Full Equation with Quarterly Time Variable BB';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;/*BB (Bloomberg Real GDP):*/&lt;BR /&gt;proc reg data=temp.&lt;U&gt;&lt;STRONG&gt;RegEq3e_QTR&lt;/STRONG&gt;&lt;/U&gt; plots=none;&lt;BR /&gt;model nValue2 = datacqtrQ;&lt;BR /&gt;title 'Full Regression Equation 4 BB';&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;/*###################################################################*/&lt;/P&gt;&lt;P&gt;/*Jensen: 3f*/&lt;BR /&gt;ods exclude all; /* suppress tables to screen */&lt;BR /&gt;ods output FitStatistics=&lt;U&gt;&lt;STRONG&gt;RegEq3f_Output&lt;/STRONG&gt;&lt;/U&gt;; /* contains results for each BY group */&lt;BR /&gt;proc reg data=temp.Equation3_interactions plots=none;&lt;BR /&gt;by datacqtr;&lt;BR /&gt;model lead_prccq = epsq bvpsq &lt;U&gt;&lt;STRONG&gt;jen_calc&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;&lt;U&gt;&lt;STRONG&gt;jen_EPS jen_BV&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;cfpsq cashpsq dvpspq rdpsq&lt;BR /&gt;intanpsq spipsq ocipsq revpsq atpsq change_revtpsq&lt;BR /&gt;capxpsq cogspsq xsgapsq FF;&lt;BR /&gt;quit;&lt;BR /&gt;ods exclude none; /* no longer suppress tables */&lt;BR /&gt;&lt;BR /&gt;proc print data=&lt;U&gt;&lt;STRONG&gt;RegEq3f_Output&lt;/STRONG&gt; &lt;/U&gt;noobs;&lt;BR /&gt;where Label2="Adj R-Sq";&lt;BR /&gt;var datacqtr Label2 nValue2;&lt;BR /&gt;title 'Rsquared Values for Full Regression Equation 3 Jensen';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;/*To keep only the Adj Rsquared Rows*/&lt;BR /&gt;data temp.&lt;U&gt;&lt;STRONG&gt;RegEq3f_Output&lt;/STRONG&gt;&lt;/U&gt;; set work.&lt;U&gt;&lt;STRONG&gt;RegEq3f_Output&lt;/STRONG&gt;&lt;/U&gt;;&lt;BR /&gt;where Label2="Adj R-Sq";&lt;BR /&gt;keep datacqtr Label2 nValue2;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;/*Merge the Adj Rsquared data with the Quarter from Econ Vars*/&lt;BR /&gt;proc sql;&lt;BR /&gt;create table temp.&lt;U&gt;&lt;STRONG&gt;RegEq3f_QTR&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;as select *&lt;BR /&gt;from temp.&lt;U&gt;&lt;STRONG&gt;RegEq3f_Output&lt;/STRONG&gt;&lt;/U&gt; as a, work.EconVarFile as b&lt;BR /&gt;where a.datacqtr=b.datacqtr;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;proc print data=temp.&lt;U&gt;&lt;STRONG&gt;RegEq3f_QTR&lt;/STRONG&gt;&lt;/U&gt; noobs;&lt;BR /&gt;where Label2="Adj R-Sq";&lt;BR /&gt;var datacqtr Label2 nValue2 datacqtrQ;&lt;BR /&gt;title 'Rsquared for Full Equation with Quarterly Time Variable Jensen';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;/*Jensen (Monetary Policy):*/&lt;BR /&gt;proc reg data=temp.&lt;U&gt;&lt;STRONG&gt;RegEq3f_QTR&lt;/STRONG&gt;&lt;/U&gt; plots=none;&lt;BR /&gt;model nValue2 = datacqtrQ;&lt;BR /&gt;title 'Full Regression Equation 4 Jensen';&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 04:07:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Different-code-producing-same-results/m-p/654101#M196503</guid>
      <dc:creator>jaimedba</dc:creator>
      <dc:date>2020-06-08T04:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: Different code producing same results</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Different-code-producing-same-results/m-p/654102#M196504</link>
      <description>&lt;P&gt;First things I'd be doing:&lt;/P&gt;
&lt;P&gt;- Check the log for Warnings and Errors - and also read the SAS Notes if there is something "telling" in it.&lt;/P&gt;
&lt;P&gt;- Execute the two versions in fresh and independent SAS sessions. This to ensure that steps in the 2nd version can't just pick-up work tables created by the first version.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 04:19:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Different-code-producing-same-results/m-p/654102#M196504</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-06-08T04:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: Different code producing same results</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Different-code-producing-same-results/m-p/654105#M196507</link>
      <description>&lt;P&gt;Thank you for your help! I do get this warning in the log, but I think that's okay?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;WARNING: Variable datacqtr already exists on file TEMP.REGEQ3F_QTR.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 04:47:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Different-code-producing-same-results/m-p/654105#M196507</guid>
      <dc:creator>jaimedba</dc:creator>
      <dc:date>2020-06-08T04:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: Different code producing same results</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Different-code-producing-same-results/m-p/654221#M196511</link>
      <description>&lt;P&gt;&amp;gt;&lt;SPAN&gt;&amp;nbsp;&lt;EM&gt;I do get this warning in the log, but I think that's okay?&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Probably not. It means that the variable&amp;nbsp;&lt;SPAN&gt;REGEQ3F_QTR&lt;/SPAN&gt; from table&amp;nbsp;&lt;SPAN&gt;work.EconVarFile&amp;nbsp; is dropped when you join the tables:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; proc sql;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; create table temp.&lt;/SPAN&gt;RegEq3f_QTR as&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; select *&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; from temp.RegEq3f_Output&amp;nbsp;as a, work.EconVarFile as b&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; where a.datacqtr=b.datacqtr;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; quit;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this what&amp;nbsp;you want?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Never leave warnings in the log. Never.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 06:46:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Different-code-producing-same-results/m-p/654221#M196511</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-06-08T06:46:32Z</dc:date>
    </item>
  </channel>
</rss>

