Reputation: 756
I have a data frame in the format required for coxph
function in the survival package. The status of a subject can be either 0 (alive) or 1 (dead). I want to run a permutation on the status of subjects and re-run the analysis. In this case, one person who was alive for 10 time periods, might be assigned as dead for time period 6 now.
Should I specifically ask my code to ignore any observation after time period 6 for that person, or the coxph
function itself does it automatically?
Upvotes: 1
Views: 130
Reputation: 756
As Gregor suggested, I simply created a small table of data and checked if coxph automatically ignores the observations after the first failure for each subject. It turned out that not really. You have to remove those observations manually if the nature of your failure indicates that there is no recovery from it.
Upvotes: 2