[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Steven Samuels <sjhsamuels@earthlink.net> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: eqivalent to stkerhaz for discrete time survival analysis? |

Date |
Mon, 16 Feb 2009 18:27:30 -0500 |

-- Hilde-

gen p_j = exp(-exp(_b[dj])) A -forval- statement will automate the process, e.g.: forvalues j =1/12 { gen p_`j' = exp(-exp(_b[d`j'])) }

-Steve On Feb 16, 2009, at 6:00 AM, Hilde Karlsen wrote:

Dear statalisters,I am performing a survival analysis of attrition from the nursingoccupation (dependent variable is binary: 1 eq 'death/moved out'; 0eq not moved out, and the time variable is discrete and ranges from1-13 'years sice graduation').I have read that I should estimate a baseline hazard to describethe form of the hazardfunction. However, I am not sure how to dothis. I've found an ado which is called stkerhaz, but it seems thiscommand should only be used after stcox, and I will probably beusing the hshaz (model 2) or logit or cloglog. Is there a commandwhich can help me estimate the baseline hazard and plot thehazardfunction, or do I have to calculate this myself? In thelatter case, how do I do this?Furthermore, I've been playing around a bit with hshaz, and thecomputations/convergence take a lot of time, particularly for model2. I get messages from stata iteration log that the likelihood isvery close to non-concave (or something in that direction). What isthe best method to 'avoid' this long series of iterations?Here is the syntax I wrote (please tell me if it is wrong) where : male = man eq 1; year1_4 = 1 to 4 years after graduation; year5_8 = 5 to 8 years after graduation (the omitted category is 9-13 years after graduation) LPNR is the id-variable movedout is the dependent variable (1= moved out, 0=not moved out)Year is the time wariable, ranging from 1-13 years after graduationfrom the nursing study programhshaz male year1_4 year5_8 male*year1_4 male*year5_8, id(LPNR) dead(movedout) seq(year)Do you by the way know of a document which gives examples ofestimation techniques and interpretation of estimates for the hshaz-command? (something similar to the chapter 7 from http://www.iser.essex.ac.uk/iser/teaching/module-ec968 ?)Best wishes, Hilde * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

* * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:**st: eqivalent to stkerhaz for discrete time survival analysis?***From:*Hilde Karlsen <Hilde.Karlsen@hio.no>

- Prev by Date:
**st: Using for within Mata optimize to loop over observations** - Next by Date:
**Re: st: AW: marginal effects and standard errors in count regressions** - Previous by thread:
**st: eqivalent to stkerhaz for discrete time survival analysis?** - Next by thread:
**st: Re: reg3** - Index(es):

© Copyright 1996–2022 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |