BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
RobF
Quartz | Level 8

Thanks Jaap, much appreciated. I'll put DS2 and the advanced data mgmt functions FriedEgg used on my reading list!

RobF
Quartz | Level 8

Yes, agreed.

The weird thing that still nags me is that my logistic regression code (and the Poisson regression code which is very similar) converges to a solution which is close but not exactly the same as the glmnet solution. I expected that my code would either be way off the mark or dead on, not really close but still off a bit.

So my algorithm is still missing something - it's hard to say without delving into the Fortran code that Jerome Friedman wrote.

Kurt_Bremser
Super User

You may experience a precision problem. SAS uses 8 bytes real to store numbers (52 bit mantissa), the FORTRAN/R code may work with extended precision or employ 64 bit integer math where possible.

RobF
Quartz | Level 8

Good point - but would that translate into a parameter estimate being off by more than a few percentage pts?

jakarman
Barite | Level 11

This is one of the rare occasions I disagree with Kurt.   The Floating point routines are part of the processor. All programming languages are using that same processor and by that are having the same limitations. As you are using advanced multiplication / division that is the best place to have them used. The way it works is standardized.  Double-precision floating-point format - Wikipedia, the free encyclopedia

There dedicated routines optimize for scalar.matrix processing in generic libraries having limited checks around them and there are routines full of checks. That is making a difference in speed. SAS is not having the option of using the GPU for calculations with those optimized for imaging you have a real difference in precision not always being told .
  

---->-- ja karman --<-----

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 20 replies
  • 4161 views
  • 9 likes
  • 6 in conversation