Dear Statlisters,
I have the following data (FYI the values CI_EV and CI_RI are the
cumulative incidence value from the 'ci' option in -stcompet-)
+--------------------------------+
| time(hr) CI_EV CI_RI |
|--------------------------------|
1. | 1 0 .00069396 |
2. | 2 .00069396 0 |
3. | 3 0 .00138793 |
4. | 4 0 .00208189 |
5. | 5 0 .00277585 |
|--------------------------------|
6. | 6 .00138793 0 |
7. | 7 0 .00346981 |
8. | 8 0 .00416378 |
9. | 9 0 .00485774 |
10. | 10 0 .0055517 |
|--------------------------------|
11. | 11 0 .00624566 |
12. | 12 0 .00693963 |
13. | 13 0 .00763359 |
14. | 14 .00208189 0 |
15. | 15 0 .00832755 |
|--------------------------------|
16. | 16 0 0 |
17. | 17 0 .009022 |
18. | 18 0 .00971645 |
19. | 19 0 0 |
20. | 20 0 .01041139 |
|--------------------------------|
21. | 21 0 .01110633 |
22. | 22 0 .01180126 |
23. | 23 0 .0124962 |
As cumulative incidence is a step function I may want to identify the
value for CI_EV at, say, time =5, so I want to fill in the gaps with the
previous known value (so in the above example, the values of CI_EV for
time = 3,4 and 5 would be recoded to 0.00069396).
Some sort of loop should be in order but I am having problems with the
'grey matter'. All assistance would be gratefully received.
Regards and thanks,
Dave
****************************************************
Mr David L. Winter, HNC
I.T. Manager
Centre for Childhood Cancer Survivor Studies
Department of Public Health & Epidemiology
University of Birmingham
Edgbaston
Birmingham
B15 2TT
UK
tel.: +44 (0)121 414 6766
fax.: +44 (0)121 414 7923
email: [email protected]
website: www.bccss.bham.ac.uk
****************************************************
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/