Statalist


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

Re: st: RE: Dropping observation after it has 'failed'


From   Steven Samuels <sjhsamuels@earthlink.net>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: Dropping observation after it has 'failed'
Date   Mon, 13 Oct 2008 12:07:19 -0400

Q1 Stata's -stset- command requires that you designate an indicator for the event. When you do this, Stata's survival programs will ignore records after the event. This behavior can be modified if multiple events are possible (-time0- ). Reread the manual section for -stset-.

Q2 does not make sense to me either. You seem to be saying that you do not want the independent variable value at time 3 to predict the event at time 3. If so, what value of the variable should predict the event? In the standard approach to event history analysis, prediction of an event at time "t" is based on covariates measured at t; these can include lagged values or prior values, but there must be something. I can only guess that you have grouped data (events "at" time t, really refer to events in (t-1, t], but that you don't want to use an independent variable that was measured at the end of the interval. If so, use the value from the prior interval. This leaves the question about what to about for events in the first interval.


Read Stephen Jenkin's fine text: http://www.iser.essex.ac.uk/teaching/ degree/stephenj/ec968/pdfs/ec968lnotesv6.pdf

-Steve

sjhsamuels@earthlink.net


Anders Ryom Villadsen

 I'm a relatively new Stata user doing discrete event history models
with two questions regarding data handling. I have browsed manuals and
the list archive but cannot seem to find an answer to my questions that
works.
My data looks like this.

id  time  event  indep1 .....
1    1       0        1
1    2       0        0
1    3       1        0
1    4       0        0
etc.....

1) How do I drop the observation for time 4 (after org1 has 'failed')
and it should no longer be part of my cloglog or logit models?
2) I want my indep var to work for two periods. How do I do that without

making it work for period 3?

*
*   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/



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