I am working with panel data with incomplete case: enter image description here

and the goal is to predict the probability of 1 at each time for each case. I am trying to use the cox-ph model for this analysis because like case B and C are right censored and can start with different time, and I am using the last known status (0 or 1 at time 5) as the status for each case. for the above case A will be: enter image description here

There are 5 observations for case A, and the third column is the response variable.

Is the way I deal with data correct?

  • $\begingroup$ Honestly, your data matrices aren't terribly informative. If the rows are the cases or units of analysis, are the columns time periods? Survival analysis usually assumes that, at the time of the origin of the model, the observations are equal in status by all being "alive," That your Case A looks to be "dead" for the duration of the study suggests that this individual wouldn't belong in an estimation of the odds of "survival." That could be a question of how you define the origin as much as anything though. $\endgroup$ Jun 5, 2015 at 16:25
  • $\begingroup$ In addition, I'm not sure I understand what you mean by "using the last known status" for each case. Finally, you need to supply more information as to why Case C is missing for the first field. It may be that simply left-aligning your cases would solve the problem. One of the best, most readily accessible books on survival analysis is Paul Allison's Survival Analysis Using SAS. Forget that it's about the SAS software as his examples are wide ranging, his explanations are as clear as a bell and never limited to the SAS software. $\endgroup$ Jun 5, 2015 at 16:25
  • $\begingroup$ @MikeHunter Thank you for the comments, please see my edits if it makes sense to you. I will read the book you recommended. $\endgroup$
    – Yoki
    Jun 5, 2015 at 17:01

1 Answer 1


Now that you've clarified the data matrix, the answer is, "no," this is not the right way to handle it in survival analysis. One of the most important facts about survival models is that they account for censoring, something traditional linear regression models do not. This means that you would want to structure the data in a "stacked," vertical format. Here's an example using your data which has 5 possible periods:

Case  Period  Status Censored
 A      1       0        0
 A      2       0        0
 A      3       0        0
 A      4       1        0
 B      1       0        0
 B      2       0        0
 B      3       0        0
 B      4       0        0
 B      5       0        1
 C      2       0        0
 C      3       0        0
 C      4       0        0
 C      5       0        1
 D      2       0        0
 D      3       0        0
 D      4       0        1

I've added case D to illustrate a case that was "interval" censored.

Left-aligning would pick up Case C in its second period. You might want to adjust the count of the periods to reflect that as a function of model parameterization. In addition, the model should allow you to specify a censoring variable to reflect the right-aligned period in which that occurs.

Other fixed and time-varying predictors would apply in the model as available and appropriate.

  • $\begingroup$ In reviewing my comment, I see that the SE text editor completely screwed up the layout of the table or matrix of cases and their values that I created. Let me clarify what this matrix is: There are 4 columns: the case (5 possible case: A-D), the time period (1-5), the status of the case (is it alive? yes=0, no=1), finally, is it censored? (no=0, yes=1). $\endgroup$ Jun 6, 2015 at 19:28
  • $\begingroup$ Thanks for the answer. Is there any survival model for panel (or longitude) data? $\endgroup$
    – Yoki
    Jun 16, 2015 at 19:47
  • $\begingroup$ @yoki My answer may not have been that helpful as I neglected to consider Kaplan-Meier survival models. They are the simplest models to estimate and assume a constant value to the survivor function. Here's a pretty good Wiki post about this approach: en.wikipedia.org/wiki/Kaplan%E2%80%93Meier_estimator The data in the example you posted is, at its root, longitudinal panel data. If you get a chance to review Paul Allison's book, mentioned in our last round of comments, he reviews the field thoroughly. Most analysts prefer to use Cox proportional hazards models. $\endgroup$ Jun 16, 2015 at 20:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.