Hi SAS experts!
I need help with interpolate growth data using cubic spline model. I have multiple measures for each participant but at different timepoint, my question is how can I get their predicted weight at the exact 0, 6, 12, 24, 36 months using cubic spline model? Thanks in advance for your help.
My data is
DATA Have;
INPUT id age weight;
DATALINES;
1 0 4
1 2.2 6
1 5 8
1 10 20
1 11.3 28
1 28 40
1 40 53
2 0 3
2 1.5 8
2 4.9 15
2 6.4 20
2 14.9 40
2 31 50
2 41 66
3 0 6
3 2.8 11
3 6.1 23
3 9.4 36
3 19.1 40
3 37 51
;
RUN;
Hi,
have a look at these blog entries:
https://blogs.sas.com/content/iml/2020/05/11/cubic-interpolation-sas.html
https://github.com/sascommunities/the-do-loop-blog/blob/master/interpolation/cubicInterp.sas
Unfortunately it does not work on my machine, so I can not try it.
- Cheers -
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!
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.
Ready to level-up your skills? Choose your own adventure.