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 --<-----

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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