# Can I use survival analysis for this data set?

I presented my paper in a conference, I used Poisson model to see the relationship between "number of comments" users receive for their topic with the "number of days until posting the second topic". In fact I wanted to see how the feedback affects individuals to come back and post in the website.

one of the audience told me I can use survival analysis. I have never heard about it and I bought a book to read but it will take a lot of time to know which model fits to my data.

Would you please someone let me know if for the following sample dataset I can use survival analysis? if yes, which model and what steps I need to follow to do survival analysis and interpret the outcomes.

Also, should I delete the last observation for each user from dataset since they do not have any survival time? should I delete the users who just participated one time since they do not have any value for survival time column?

I really will appreciate any help since your help can save a lot of time for me.

• I think survival analysis is a good suggestion. If you treat number of comments as an outcome within some observed time periods but not a covariate, Poisson is also good. – Deep North Sep 20 '17 at 23:00
• Even if you condition only on those who will post a second one eventually, consider that there's a distinct possibility someone does not post a second one in the period of your data collection. Then if you're trying to estimate the distribution of time you can neither exclude such people from consideration (you'll bias the answers down - maybe heavily - by omitting people with the longest times) nor can you work as if their time was the time you observed them for (again, you bias the estimates). It's not so much a matter of can you, if it's present you really should deal with the censoring. – Glen_b -Reinstate Monica Sep 21 '17 at 0:01
• @Deep North Thanks for your comment. Actually comment should be independent variable since I want to see the effect of comments on survival. – PSS Sep 21 '17 at 3:50

Would you please someone let me know if for the following sample dataset I can use survival analysis? if yes, which model and what steps I need to follow to do survival analysis and interpret the outcomes.

Potentially. This would help answer the question "What is the distribution of time until the next website participation, and what factors influence that?" And with your data, it looks like you have the data to do so.

In terms of steps, I would suggest doing some more reading (I suggest Paul Allison's book on survival analysis in SAS, even if you're not going to use SAS) to refine what you're looking to answer and in what form, because that will partially determine what approach to use.

Also, should I delete the last observation for each user from dataset since they do not have any survival time? should I delete the users who just participated one time since they do not have any value for survival time column?

No. This is what is known as censoring, and there are ways to handle it within the analysis itself.

• Thanks so much for your comment. I'll read thee book but since I am a little close to a deadline I was wondering which models or sections are about this type of data? So i can save time by reading the related models to my data. Thanks – PSS Sep 21 '17 at 3:53

I'm no expert, but it seems to me that this dataset is better suited to recurrence analysis than typical survival analysis. Where survival analysis measures failure or death, which can only occur once for each individual (or not for censored individuals), recurrence analysis allows repeated "treatments" or "repairs" to extend the survival of the item or individual. It seems to me that you want to assess the mean cumulative function for posting.

Yes, your case is classical survival analysis. The point is that you're taking a snapshot over a period of time and not all subjects that you're aware of experienced a particular outcome during that time. That tells you something: some of those subjects may never experience the event, some of them will drop off of your radar even before the end of your data, and others will take more time than your data covers. The last case, for example, would make your average longer if you were able to look at a longer period of time -- possibly into the future -- or if you use survival analysis.

Basic survival analysis covers a beginning time and an event. The name "survival" coming from the idea that the event is a failure or death. As evolecogen says, a more advanced form ("recurrent event") allows for events to occur multiple times. Other techniques cover "competing risks", where one of several mutually-exclusive events may occur. "Multi-state" analysis is more general still, and there are also discrete and continuous versions.

If you happen to be using R, I can highly recommend the survival package, and in particular its vignettes. The author is experienced, pithy, and entertaining. For example:

“We are left with an unreliable estimate of an uninteresting quantity. Mislabeling any true state as censoring is always a mistake, one that will not be repeated here.”

“In this hypothetical world it is indeed true that many more subjects would progress to PCM, but it is also not a world that any of us will ever inhabit.”

“If nothing else, draw [the State diagram] on a scrap of paper and tape it to the side of the terminal when creating a data set and plots.”

“Very few subjects acquire PCM more than 15 years after a MGUS diagnosis at age 80 for the obvious reason: very few of them will still be alive.”

I can say that you have recurrent survival analysis problem. Your data set shows some( if not all) subjects have multiple record with different information. To handle recurrent data , R contains great packages, the one that I recommend is survival. One important thing that you have to take to you consideration when you work with recurrent data the structure of the data. AG, PWP, WLW, and frailty are some models that will help (sure if you have time)