I may not fully understand your question. But say,
You had observed subjects periodically for maximum 31 times, and noted as t0, t1, ..., t30.
for subject 1, at t15 you observed an event on him/her. so, you have a record like
subject=1, time=15, event=1
for subject=2, you followed him to the end of the study (at t30) and no event observed. you have a record like:
- subject=2, time=30, event=0
复制代码
for basic survival analysis, the data like above is enough, that is, 3 variables subject, time and status(event).
for example, in KM method in sas you wrote it as
- proc lifetest...; time time*event(0); ...; run;
复制代码
see, that is, event =0, censored. Remember that, in survial we only consider two statuses of censored or not censored(event).
Here variable 'subject' may not be required. But when you had multiple records from one subject,you may think that, between subjects, observations are independent; but not within subjects. for example, time-dependent covariates, or multiple events, etc. Those need special stastics treatment.
JingJu