Hi SAS Users,
Today when I run this code
/******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;
The log is
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.
Could you please tell me how to deal with this problem? Whether we must create another data step to calculate ln in this case, is there any shorter way to do so?
Warm regards.
The Log Function Returns the natural (base e) logarithm.
The Log Function Returns the natural (base e) logarithm.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.