BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
rselukar
SAS Employee

By the way, as I mentioned earlier, the turning points are for the underlying smooth signal (s_level).   You can slightly alter @jacksharp's code to get the plot of turning points of s_level as follows:

 

data all;
    set change turns(keep=n s_level rename=(n=_n s_level=_v));
run;

proc sgplot data=all;
   title Plot of smoothed_value with identified turning points;
   series x=n y=s_level;
   scatter x=_n y=_v/markerattrs=(symbol=starfilled color=red);
run;

Which results in the following plot:

rselukar_0-1669131640845.png

Of course, @jacksharp's way of showing the turning points is much better than my earlier plots.  Thanks!

hhchenfx
Rhodochrosite | Level 12

Thank you all for helping.

It is great code.

HHC

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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!

Register now

Discussion stats
  • 16 replies
  • 14520 views
  • 9 likes
  • 6 in conversation