BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
PeroGti
Fluorite | Level 6

Hello Dear SAS users,

I have a question regarding the output logarithmic data in SAS:

when I log these values bellow in the table in SAS I get next log values, but when I tried to log them in excel I get the different numbers, does anybody knows the formula which I have to use in excel to get the numbers like in SAS:

 

   SAS log values ('Housing_Loans_[millions]_y'n=log('Housing_Loans_[millions]_y'n);  excel log values formula in excel LOG10(G5*1000000) 
YearHousing_Loans_[millions]_ylog of Housing_Loans_[millions]_ylog of Housing_Loans_[millions]_y
2013                                                     8.1579,0066503339,91153854
2014                                                     7.9948,9863916849,902740321
2015                                                     7.8418,9670752669,894351307
2016                                                     6.9708,8494137399,843251555
2017                                                     7.0118,8553023789,845808958
2018                                                     7.1728,8779955569,85566448
2019                                                     7.6238,9389224099,882124676
2020                                                     8.2529,0181880689,916549315
2021                                                     8.9949,104287329,953941745
2013                                                   31.68610,3636406710,50087195
2014                                                   32.64510,3934491110,5138176
2015                                                   36.17810,4961930810,55843874
2016                                                   39.20710,5766196910,59336757
2017                                                   45.11110,716885410,65428419
2018                                                   48.56810,7907263710,68635292
2019                                                   52.40710,8667886510,71938635
2020                                                   54.78510,9111682610,73866016
2021                                                   64.24011,0703820210,80780583
2013                                                   11.2469,32776322710,0509961
2014                                                   10.5889,26750116110,02482462
2015                                                     9.5179,160823269,978494991
2016                                                     9.4769,1564972389,976616224
2017                                                     9.7749,1874714779,990068165
2018                                                   10.4099,25043270410,01741188
2019                                                   11.0149,30695273510,04195822
2020                                                   10.9799,30370594210,04054815
2021                                                   12.4409,42870104210,09483283
2013                                                   15.2929,63506325310,1844548
2014                                                   17.3539,76149601610,23936386
2015                                                   19.7039,88853501810,29453619
2016                                                   22.49610,0210886610,35210351
2017                                                   25.37010,1413110610,40431543
2018                                                   28.25410,2490059610,45108673
2019                                                   30.98310,341190310,49112188
2020                                                   33.77010,427313910,52852489
2021                                                   37.65610,5362357910,57582906
2013                                                     5.3079,2428075629,724811524
2014                                                     5.3489,284519779,728189044
2015                                                     5.5259,346617999,742298009
2016                                                     5.7179,3800831479,757132563
2017                                                     5.9769,471164999,77638944
2018                                                     6.2399,5410819349,795094172
2019                                                     6.5879,615805489,818701311
2020                                                     6.8629,5567629399,836458372
2021                                                     7.4799,6702936659,873841269
1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hello @PeroGti,

 

You are using the LOG function (base e logarithm) in SAS, but the LOG10 function (base 10 logarithm) in Excel and you apply the latter only after multiplying the argument by 1000000. So, if you do the same in SAS and compute log10('Housing_Loans_[millions]_y'n*1000000) or equivalently log10('Housing_Loans_[millions]_y'n)+6, the results should be the same (up to tiny differences like 1E-12 or so).

 

If you describe the result as the logarithm of housing loans (in millions), then you should neither multiply by 1000000 nor add 6 to the logarithm.

View solution in original post

2 REPLIES 2
FreelanceReinh
Jade | Level 19

Hello @PeroGti,

 

You are using the LOG function (base e logarithm) in SAS, but the LOG10 function (base 10 logarithm) in Excel and you apply the latter only after multiplying the argument by 1000000. So, if you do the same in SAS and compute log10('Housing_Loans_[millions]_y'n*1000000) or equivalently log10('Housing_Loans_[millions]_y'n)+6, the results should be the same (up to tiny differences like 1E-12 or so).

 

If you describe the result as the logarithm of housing loans (in millions), then you should neither multiply by 1000000 nor add 6 to the logarithm.

PeroGti
Fluorite | Level 6

thank you very much

 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 587 views
  • 5 likes
  • 2 in conversation