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
Collapsing Data IssueI tried this: collapse (mean) mpg_all /// , by(state_code.year.month) Received this error: factor…
Why the survival function is missingHi STATA users, I have a set of survival data as below which is from a longitudinal study. And I kn…
ourteg2, addtableWHy does my second table rewrite over my first table instead when I use this command? …
How to add reference to contours plotDear Stata users, I am trying to visualise continuous-by-continuous interactions (albuminuria and eG…
Using PAYPER to generate amortization tablesI have a dataset with about 50,000 observations. Each observation corresponds to a loan's informatio…
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