<?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: LOG(LN) function in PROC SQL in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/LOG-LN-function-in-PROC-SQL/m-p/719805#M222916</link>
    <description>&lt;P&gt;The &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=p0urbseuxrkrlyn1tr04y30nt25s.htm&amp;amp;locale=en" target="_self"&gt;Log Function&lt;/A&gt;&amp;nbsp;&lt;SPAN&gt;Returns the natural (base e) logarithm.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Feb 2021 05:54:18 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2021-02-17T05:54:18Z</dc:date>
    <item>
      <title>LOG(LN) function in PROC SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/LOG-LN-function-in-PROC-SQL/m-p/719803#M222915</link>
      <description>&lt;P&gt;Hi SAS Users,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Today when I run this code&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/******Calculate delta_q industry*****/
proc sql;
create table work.industry_return as
  select Type, year, INDC3,wRETURN, 
		ln(1 + mean(wRETURN)) as industry_ret
  from canus_sample
  group by INDC3,year
  ;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The log is&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;28         proc sql;
29         create table work.industry_return as
30           select Type, year, INDC3,wRETURN,
31         		ln(1 + mean(wRETURN)) as industry_ret
32           from canus_sample
33           group by INDC3,year
34           ;
ERROR: Function LN could not be located.
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
35         quit;
NOTE: The SAS System stopped processing this step because of errors.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Could you please tell me how to deal with this problem? Whether we must create another data step to calculate &lt;STRONG&gt;ln&lt;/STRONG&gt; in this case, is there any shorter way to do so?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Warm regards.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2021 05:39:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/LOG-LN-function-in-PROC-SQL/m-p/719803#M222915</guid>
      <dc:creator>Phil_NZ</dc:creator>
      <dc:date>2021-02-17T05:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: LOG(LN) function in PROC SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/LOG-LN-function-in-PROC-SQL/m-p/719805#M222916</link>
      <description>&lt;P&gt;The &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=p0urbseuxrkrlyn1tr04y30nt25s.htm&amp;amp;locale=en" target="_self"&gt;Log Function&lt;/A&gt;&amp;nbsp;&lt;SPAN&gt;Returns the natural (base e) logarithm.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2021 05:54:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/LOG-LN-function-in-PROC-SQL/m-p/719805#M222916</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-02-17T05:54:18Z</dc:date>
    </item>
  </channel>
</rss>

