Dear stata users
I apologize for this rather basic (and long) question but it is really
getting me into despair.
I want to perform very simple survival analysis from some data provided in
"life table format" (i.e. count data):
It is about fertility rates of two groups in an artificial insemination
program.
35 patients enter the first insemination cycle in group 0 (not having some
health problem) and 16 in group 1 (having it).
There are failures (embarazos) and censoring (not getting the "failure" and
exiting the program at some time after the entrance) in both groups.
After reading ST manual�s ctst and cttost commands I built the following
"life table style" dataset:
list
+---------------------------------------------+
| ciclo embara~s censura entran grupo |
|--------------------------------------------------|
1. | 0 0 0 35 0 |
2. | 0 0 0 16 1 |
3. | 1 3 0 0 0 |
4. | 1 0 0 0 1 |
5. | 2 3 0 0 0 |
|---------------------------------------------|
6. | 2 1 1 0 1 |
7. | 3 2 0 0 0 |
8. | 3 1 1 0 1 |
9. | 4 3 3 0 0 |
10. | 4 0 1 0 1 |
|---------------------------------------------|
11. | 5 3 0 0 0 |
12. | 5 0 0 0 1 |
13. | 6 1 1 0 0 |
14. | 6 0 1 0 1 |
+---------------------------------------------+
Then I tried to declare this data as count-time stata data:
ctset ciclo embarazos censura entran, by( grupo)
No claim from stata, with the following log:
dataset name: E:\Trabajos\......\tablas4.dta
time: ciclo
no. fail: embarazos
no. lost: censura
no. enter: entran
by: grupo
Thereafter I proceed and issue the cttost command with the following
results:
cttost
(data are now st)
failure event: embarazos != 0 & embarazos < .
obs. time interval: (0, ciclo]
exit on or before: failure
weight: [fweight=w]
----------------------------------------------------------------------------
--
14 total obs.
0 exclusions
----------------------------------------------------------------------------
--
14 physical obs. remaining, equal to
25 weighted obs., representing
17 failures in single record/single failure data
86 total analysis time at risk, at risk from t = 0
earliest observed entry t = 0
last observed exit t = 6
I cannot see that there are 51 patients at the entrance of the programme
(first cycle). Similarly if I issue:
stdes, w
I get:
failure _d: embarazos
analysis time _t: ciclo
weight: [fweight=w]
|-------------- per
subject --------------|
weighted weighted weighted
Category total mean min median
max
----------------------------------------------------------------------------
--
no. of subjects 25
no. of records 25 1 1 1
1
(first) entry time 0 0 0
0
(final) exit time 3.44 1 4
6
subjects with gap 0
time on gap if gap 0
time at risk 86 3.44 1 4
6
failures 17 .68 0 1
1
----------------------------------------------------------------------------
--
And after:
sts list , by(grupo)
The following real (but inaccurate) life tables turn up:
failure _d: embarazos
analysis time _t: ciclo
weight: [fweight=w]
Beg. Net Survivor Std.
Time Total Fail Lost Function Error [95% Conf.
Int.]
----------------------------------------------------------------------------
---
grupo=0
1 19 3 0 0.8421 0.0837 0.5865
0.9462
2 16 3 0 0.6842 0.1066 0.4279
0.8439
3 13 2 0 0.5789 0.1133 0.3321
0.7626
4 11 3 3 0.4211 0.1133 0.2037
0.6249
5 5 3 0 0.1684 0.1028 0.0306
0.4024
6 2 1 1 0.0842 0.0787 0.0056
0.3070
grupo=1
2 6 1 1 0.8333 0.1521 0.2731
0.9747
3 4 1 1 0.6250 0.2135 0.1419
0.8931
4 2 0 1 0.6250 0.2135 0.1419
0.8931
6 1 0 1 0.6250 0.2135 0.1419
0.8931
----------------------------------------------------------------------------
---
All I can see is that stata uses only 25 cases instead of 51. A careful
reading of the examples in the manual does not enable me to quite
understand the right way to proceed although I have tried it in several
different ways
Any clue will be very much welcomed
Thanks in advance
Jose I Pijo�n
Unidad de Epidemiolog�a Cl�nica
Hospital de Cruces
Tfno: 94 600 6452
Fax: 94 600 6451
email: [email protected]
*
* 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/