BookmarkSubscribeRSS Feed
hh9
Calcite | Level 5 hh9
Calcite | Level 5

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;

 

1 REPLY 1
Oligolas
Barite | Level 11

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 -

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 659 views
  • 0 likes
  • 2 in conversation