Hi!

I am working with SPSS for the first time and I have come across a problem while calculating the follow-up length of participants in a study. I want to calculate the follow-up length for all patients, starting at the date of diagnosis. I want the last date of follow-up to be the last known follow-up date. However, if death has occurred, I want to calculate the time from diagnosis till death. However, if a recurrence of cancer has occurred, I want to calculate the time from diagnosis till recurrence (less recent than last known follow-up date or possible death).

I have already created two new variables. One from date of diagnosis till date of last known follow-up (var X). Another from date of diagnosis till recurrence or death (if one of these or both occur) by calculating both from date of diagnosis and combining them using COMPUTE MIN (var Y). So now I would like to combine these variables into a new variable Z: if var Y exists, I want var Z to be var Y. However, if var Y does not exist, I want var Z to be var X.

Can anyone please help me with this?

Thank you in advance! Please let me know if I have to be more specific.

More Tessa van Veen's questions See All
Similar questions and discussions