Dear all,

I am a new Stata user and this is the first time I use this forum.

I need to conduct a survival time analysis to determine the impact of certain covariates on the likelihood of a company being downgraded. So the event is a downgrade compared to the previous quarter.

My dataset is a panel data containing an id variable for several companies, a qdate variable for the time (e.g. 2000q1), a dummy variable equal to 1 if a downgrade occurs in a certain quarter and a list of explanatory variable X1, X2, X3, etc. For every firm there might be multiple downgrades.

I used the code: stset qdate, id(id variable) failure(downgrade) exit(qdate==.) scale(1)

Is this the correct way? From what I read, there might be an issue with the survival time variable. If so how can I correct it and properly declare the dataset to be of a surival time nature?

I hope my question is clear and to be able to obtain some help.

I remain available for any clarifications and I apologize if there are any mistakes in the formulation of my question

Kind regards,