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
Barite | Level 11

Thank you all for helping.

It is great code.

HHC

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

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