Dear all,
currently I am converting my snapshot dataset to time-span dataset with the command snapspan.
My datastructure is like that:
The data is right-censored due to end of observation. Event 1 is just the entry/origin of that individual. The event in this case is not a failure event. The event 2 will only cause a change in the time-varying variable.
After using snapsan my data looks like:
The problem is now that after the second event (on 30.03.2015), Stata is loosing the information about the time-varying variable. In this case it will loose the increase of the time-varying variable of 100 to 200. This change lasts until the end of observation since there is no failure at id 1.
Am I right that this loss is not important, since e.g. cox model would only consider the time-varying variable in the case of a failure? In the case of a failure (event = 3) there would be another line like that:
Thanks, Max
currently I am converting my snapshot dataset to time-span dataset with the command snapspan.
My datastructure is like that:
id | event_date | event | time-varying_variable | continuous_variable |
1 | 01.01.2015 | 1 | . | 5 |
1 | 15.02.2015 | 2 | 100 | 5 |
1 | 30.03.2015 | 2 | 200 | 5 |
After using snapsan my data looks like:
id | date0 | event_date | event | time-varying_variable | continuous_variable |
1 | . | 01.01.2015 | 1 | . | 5 |
1 | 01.01.2015 | 15.02.2015 | 2 | . | 5 |
1 | 15.02.2015 | 30.03.2015 | 2 | 100 | 5 |
Am I right that this loss is not important, since e.g. cox model would only consider the time-varying variable in the case of a failure? In the case of a failure (event = 3) there would be another line like that:
id | date0 | event_date | event | time-varying_variable | continuous_variable |
1 | . | 01.01.2015 | 1 | . | 5 |
1 | 01.01.2015 | 15.02.2015 | 2 | . | 5 |
1 | 15.02.2015 | 30.03.2015 | 2 | 100 | 5 |
1 | 30.03.2015 | 15.04.2015 | 3 | 200 | 5 |
Comment