- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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) | ||
Year | Housing_Loans_[millions]_y | log of Housing_Loans_[millions]_y | log of Housing_Loans_[millions]_y |
2013 | 8.157 | 9,006650333 | 9,91153854 |
2014 | 7.994 | 8,986391684 | 9,902740321 |
2015 | 7.841 | 8,967075266 | 9,894351307 |
2016 | 6.970 | 8,849413739 | 9,843251555 |
2017 | 7.011 | 8,855302378 | 9,845808958 |
2018 | 7.172 | 8,877995556 | 9,85566448 |
2019 | 7.623 | 8,938922409 | 9,882124676 |
2020 | 8.252 | 9,018188068 | 9,916549315 |
2021 | 8.994 | 9,10428732 | 9,953941745 |
2013 | 31.686 | 10,36364067 | 10,50087195 |
2014 | 32.645 | 10,39344911 | 10,5138176 |
2015 | 36.178 | 10,49619308 | 10,55843874 |
2016 | 39.207 | 10,57661969 | 10,59336757 |
2017 | 45.111 | 10,7168854 | 10,65428419 |
2018 | 48.568 | 10,79072637 | 10,68635292 |
2019 | 52.407 | 10,86678865 | 10,71938635 |
2020 | 54.785 | 10,91116826 | 10,73866016 |
2021 | 64.240 | 11,07038202 | 10,80780583 |
2013 | 11.246 | 9,327763227 | 10,0509961 |
2014 | 10.588 | 9,267501161 | 10,02482462 |
2015 | 9.517 | 9,16082326 | 9,978494991 |
2016 | 9.476 | 9,156497238 | 9,976616224 |
2017 | 9.774 | 9,187471477 | 9,990068165 |
2018 | 10.409 | 9,250432704 | 10,01741188 |
2019 | 11.014 | 9,306952735 | 10,04195822 |
2020 | 10.979 | 9,303705942 | 10,04054815 |
2021 | 12.440 | 9,428701042 | 10,09483283 |
2013 | 15.292 | 9,635063253 | 10,1844548 |
2014 | 17.353 | 9,761496016 | 10,23936386 |
2015 | 19.703 | 9,888535018 | 10,29453619 |
2016 | 22.496 | 10,02108866 | 10,35210351 |
2017 | 25.370 | 10,14131106 | 10,40431543 |
2018 | 28.254 | 10,24900596 | 10,45108673 |
2019 | 30.983 | 10,3411903 | 10,49112188 |
2020 | 33.770 | 10,4273139 | 10,52852489 |
2021 | 37.656 | 10,53623579 | 10,57582906 |
2013 | 5.307 | 9,242807562 | 9,724811524 |
2014 | 5.348 | 9,28451977 | 9,728189044 |
2015 | 5.525 | 9,34661799 | 9,742298009 |
2016 | 5.717 | 9,380083147 | 9,757132563 |
2017 | 5.976 | 9,47116499 | 9,77638944 |
2018 | 6.239 | 9,541081934 | 9,795094172 |
2019 | 6.587 | 9,61580548 | 9,818701311 |
2020 | 6.862 | 9,556762939 | 9,836458372 |
2021 | 7.479 | 9,670293665 | 9,873841269 |
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
thank you very much