Quartz | Level 8

## How to output inflection point or changing point from Proc mixed

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).

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
Meteorite | Level 14

## Re: How to output inflection point or changing point from Proc mixed

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

8 REPLIES 8
Meteorite | Level 14

## Re: How to output inflection point or changing point from Proc mixed

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

?

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

Quartz | Level 8

## Re: How to output inflection point or changing point from Proc mixed

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.

Meteorite | Level 14

## Re: How to output inflection point or changing point from Proc mixed

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

Quartz | Level 8

## Re: How to output inflection point or changing point from Proc mixed

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?

Meteorite | Level 14

## Re: How to output inflection point or changing point from Proc mixed

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

Quartz | Level 8

## Re: How to output inflection point or changing point from Proc mixed

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?

Meteorite | Level 14

## Re: How to output inflection point or changing point from Proc mixed

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

Quartz | Level 8

## Re: How to output inflection point or changing point from Proc mixed

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.

Discussion stats
• 8 replies
• 316 views
• 0 likes
• 2 in conversation