BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Jie111
Quartz | Level 8

I have a dataset with 50 participants. Each has repeated blood pressure measurements annually. 

I used a non-linear mixed-effect model to describe the trend of blood pressure over time by sex (shown below). 

 

Jie111_1-1682586460985.png

 

Then I want to find the inflection point or changing point, i.e., since which year the blood pressure changed largely and whether the changing point year is different between male and female.

 

I know for the bell-shaped curve, we could calculate the point with slope = 0. However, for the blue curve in the graph, how to find the inflection point?

1 ACCEPTED SOLUTION

Accepted Solutions
yabwon
Onyx | Level 15

That was the idea, you have the model (its equation, e.g ax^2 + bx + c) so you could calculate theoretical derivative (e.g. 2ax + b) and use model's parameter to calculate value.

 

Bart

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



View solution in original post

8 REPLIES 8
yabwon
Onyx | Level 15

Are you looking inflection point (https://en.wikipedia.org/wiki/Inflection_point) or extreme one for that curve, something around here:

yabwon_0-1682590485949.png

?

 

Bart

 

 

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



Jie111
Quartz | Level 8

Hi, sorry but the link from Wiki is not available now.

I just want to find the change point (or knot, joint, turning point), which was defined as “the time when development
switches from one phase to another”. They are the points that are shown in the below graph.

 

I think the extreme value may be one solution.

 

Jie111_1-1682597149079.png

 

 

yabwon
Onyx | Level 15

Did you tried collect data for the plot generated by the procedure with help of the ODS SELECT and ODS OUTPUT statements ? 

Bart

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



Jie111
Quartz | Level 8

Thank you for your quick reply.

 

Now, I did not try the ods output and ods select. I knew in R, the package "nlme" "segmented" can help to get the changing point.

But if it is to choose the extreme slope rate, I know we could output the mixed effect model and calculate the Derivative.

Is this what you mean?

 

yabwon
Onyx | Level 15

That was the idea, you have the model (its equation, e.g ax^2 + bx + c) so you could calculate theoretical derivative (e.g. 2ax + b) and use model's parameter to calculate value.

 

Bart

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



Jie111
Quartz | Level 8

Hi, I know for a bell-shaped curve or U-shaped curve, it is easy to find the changing point.

However, for the blue line in the below picture, the slope for each time point seems to increase over time. There is no such extreme value. 

Do you know how to detect the changing point for those types of curves?

 

Thanks for your help in advance.

 

 

Jie111_0-1682616358649.png

 

 

 

yabwon
Onyx | Level 15

Do you have proper formal definition what is the "changing point"? Without it it's hard to even think what we are looking at.

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



Jie111
Quartz | Level 8

Hi,

 

I did not find a good definition for the "changing point" or break point.

In the paper (https://support.sas.com/resources/papers/proceedings20/4739-2020.pdf), they define it as "the time when development switches from one phase to another ".

 

They used PROC NLMIXED to find the point.

I am thinking they may detect the changing point based on the fitness (AIC, BIC) of the model.

For example, using different knots to spline the curve and find the best one with best fitness.

 

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 8 replies
  • 720 views
  • 0 likes
  • 2 in conversation