I use PROC EXPAND to compute moving sum of an indicator variable. For most of observations, the value is zero. However, the resulting sum is not zero. They are extremely small nonzero values, such as -5.69382E-59.
Why does it happen? How to make them "behave as they should"?
I also noticed that rounding errors seem to accumulate more quickly with proc expand than in other SAS procs. Sometimes, unbeknownst to you, the values are the result of a spline interpolation, which tends to be less precise. Requesting a different interpolation method may improve things.
SAS stores numbers in 8 bytes of storage. That means it can hold numbers up to 15 digits long accurately. Anything beyond 15 digits, and that includes decimal places, will be subject to "random" discrepancies. That includes PROC EXPAND.
Here is a more detailed explanation: http://support.sas.com/documentation/cdl/en/lrcon/65287/HTML/default/viewer.htm#p0ji1unv6thm0dn1gp4t...
I also noticed that rounding errors seem to accumulate more quickly with proc expand than in other SAS procs. Sometimes, unbeknownst to you, the values are the result of a spline interpolation, which tends to be less precise. Requesting a different interpolation method may improve things.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.
Ready to level-up your skills? Choose your own adventure.