Hi,
I am trying to replicate this graph. This is from a study https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7214907/
This is a two-piecewise linear regression model. I will like to know the sas code which can be used to replicate this graph.
Look at proc transreg.
Calling @Rick_SAS
proc sgplot data=sashelp.heart(obs=1000); loess x=weight y=height/clm nomarkers; run;
See the article "Piecewise regression models and spline effects" for a discussion, example, and code. The example uses PROC GLIMMIX, but also includes a reference to the PROC TRANSREG documentation, which contains a second example.
The example assumes that the two pieces of the model both have the same form (for example, linear or quadratic). If you want to mix-and-match models on separate domains, you can use PROC NLIN to construct a segmented regression model.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
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!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.