LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (August 2005, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 11 Aug 2005 11:26:20 -0400
Reply-To:   William Turner <william@INGENIUMIS.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   William Turner <william@INGENIUMIS.COM>
Subject:   Data step code for smoothing via cubic spline interpolation?

I'm trying to find data step code that would perform smoothing of an X,Y series of data via cubic spline interpolation (or a similar spline interpolation). I'm trying to replicate the smoothing done by the "INTERPOL=SM<0-99>" option to the SYMBOL statement in SAS graph. I know there are a couple of procedures that can do this, but I want to perform the smoothing in a data step, continuously re-evaluating the y=f(x) function as each new record (i.e., set of X,Y values) is input. I would take a crack at writing it myself, but I must admit that I don't completely understand the mechanics of this procedure. My goal is to smooth the data sufficiently in order to identify local min and max values (where the first derivative is zero) and points of inflection (where the second derivative is zero).

The data series are a fixed period counter (X) ranging from 1 to n, where it's always true that (0 < x1 < x2 < ... < xn), and an oscillating indicator that ranges between 0 and 15 (Y). The Y values are very noisy (which is why I'm looking for a good smoothing function). I want to find a solution that doesn't lag significantly, as a moving average approach would do. At the lowest level of X represented in the data, there can only be one value of Y.

Any and all help or suggestions will be greatly appreciated. Thank you.

Regards,

William


Back to: Top of message | Previous page | Main SAS-L page