BookmarkSubscribeRSS Feed
Des
Calcite | Level 5 Des
Calcite | Level 5

Hello all,

I am new to this forum, and hope someone will step up helping out on the following.

I have a longitudinal data, but with some missing values of individuals' weight.   If  at least 50% of the data points are not missing, I want to fill missing values based on the overall pattern of observed values (polynomial spline).

data have;

infile cards;

input ID time wt;;

cards;

1      1      54

1      2      66

1     3       .

1     4       81

1     5      82

1     6      .

1     7      .

1     8      .

1     9     67   

1     10    64

2    1     75

2     2     72

2    3      .

2    4      .

2    5     .

2    6     .

2    7      80

2    8      79

2    9      76

2    10      84

;

Can any help me in coding to fill these missing values with polynomial spline instead of nearest values?

1 REPLY 1
PGStats
Opal | Level 21

Do you have the license to SAS/ETS? PROC EXPAND does exactly what you want.

PG

PG

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1 reply
  • 348 views
  • 0 likes
  • 2 in conversation