I'm working on a project in which I need to perform survival analysis on a sample of firms.
When I stset my sample, everything works out perfectly, but there is an issue, as STATA doesn't take into account the firms that died in the same year in which they were born.
The code I am using is the following:
stset age, id(id) failure(death==1)
Where age is defined by the following code: gen age = year-year_birth
The firms that have year of birth equal to the year of their death are to be considered in my study, but STATA sets their _st as 0 by default.
What can I do in order to solve this issue? Appreciate any help!
Related Posts with Making it so that stset works when birth and death happen in the same year
Diff-in-Diff covariate collinearity issueHi all. I'm running a difference-in-difference model with the new xtdidregress command. When I inclu…
Plotting yearly and monthly data in the same graphHi all, I have two variables. Let's say I observe variable M each month. However, for variable Y, I…
Constructing weekly date when the weeks are determinedHi I have variables for the year, the quarter (taking values from 1 to 4), and the week (taking val…
How to save the content of result interface in STATA?When trying to save the content of the results interface of STATA, I found this discussion (https://…
Fill null values in an ordered list with repeating valuesHi there. For a data structure like the following, ordered by COMUNA - N_CALLE - NUMN and where repe…
Subscribe to:
Post Comments (Atom)
0 Response to Making it so that stset works when birth and death happen in the same year
Post a Comment