I am trying to manipulate the output dataset from survival analysis (used Proc LifeTest). Below is the layout of my output. I have 13 age groups, survival months (0 to n), probability values. The survival months column has two problems: (1) it has missing months e.g. age <13 has 0-5 then 7-9 and so on (2) n is not constant for all age groups.
AGE SURMOS SURVIVAL
G1 0 0.1
G1 1 0.2
G1 3 0.6
G1 6 0.12
G2 0 0.01
G2 1 0.6
G2 5 0.12
G2 6 0.33
G2 10 0.88
I am trying to create a dataset (1) with 0 to n months (whatever is maximum for that particular age group) without missing for all age groups (2) to use the previous row value for probability for the missing. Below if the desired output I am trying to achieve.
AGE SURMOS SURVIVAL
G1 0 0.1
G1 1 0.2
G1 2 0.2
G1 3 0.6
G1 4 0.6
G1 5 0.6
G1 6 0.12
G2 0 0.01
G2 1 0.6
G2 2 0.6
G2 3 0.6
G2 4 0.6
G2 5 0.12
G2 6 0.33
G2 7 0.33
G2 8 0.33
G2 9 0.33
G2 10 0.88