Dear StataList Members,
I am trying to conduct a surival anaylsis using the data I placed here.
The code I use is here: stset age_months , failure(monthly_duration==0)
age_months is the age of children given in months. It is my time variable. It starts from 0. It ends in 59.
monthly_duration is a dichotomous variable that indicates whether the child is still breastfed or not. If 1, the child is still breatfed. If 0, not still breastfed. It is my event variable.
When I run this code:
stset age_months , failure(monthly_duration==0), I get the notification :
207691 total observations
7625 observations end on or before enter()
I know why this is the case. In my data, 7625 of observations are children who are 0 month old (age_months=0), and all of those 7625 children are still brastfed. There is no exception.
That is, all those 7625 children take the value of 1 for their monthly_duration variable.
My question is here: Can I proceed my analysis? Is that true? Because now the 7625 children are lost. My N is 200066 rahther than 207691 (the difference is 7625). If it is not true, what should I do?
Thank you very much.
clear
input float(age_months monthly_duration) double M4_1 str15 CASEID float age_months2
0 1 20 " 10110 2" 21
1 1 20 " 10110 2" 21
2 1 20 " 10110 2" 21
3 1 20 " 10110 2" 21
4 1 20 " 10110 2" 21
5 1 20 " 10110 2" 21
6 1 20 " 10110 2" 21
7 1 20 " 10110 2" 21
8 1 20 " 10110 2" 21
9 1 20 " 10110 2" 21
10 1 20 " 10110 2" 21
11 1 20 " 10110 2" 21
12 1 20 " 10110 2" 21
13 1 20 " 10110 2" 21
14 1 20 " 10110 2" 21
15 1 20 " 10110 2" 21
16 1 20 " 10110 2" 21
17 1 20 " 10110 2" 21
18 1 20 " 10110 2" 21
19 1 20 " 10110 2" 21
20 1 20 " 10110 2" 21
21 0 20 " 10110 2" 21
0 1 17 " 102 3 2" 59
1 1 17 " 102 3 2" 59
2 1 17 " 102 3 2" 59
3 1 17 " 102 3 2" 59
4 1 17 " 102 3 2" 59
5 1 17 " 102 3 2" 59
6 1 17 " 102 3 2" 59
7 1 17 " 102 3 2" 59
8 1 17 " 102 3 2" 59
9 1 17 " 102 3 2" 59
10 1 17 " 102 3 2" 59
11 1 17 " 102 3 2" 59
12 1 17 " 102 3 2" 59
13 1 17 " 102 3 2" 59
14 1 17 " 102 3 2" 59
15 1 17 " 102 3 2" 59
16 1 17 " 102 3 2" 59
17 1 17 " 102 3 2" 59
18 0 17 " 102 3 2" 59
19 0 17 " 102 3 2" 59
20 0 17 " 102 3 2" 59
21 0 17 " 102 3 2" 59
22 0 17 " 102 3 2" 59
23 0 17 " 102 3 2" 59
24 0 17 " 102 3 2" 59
25 0 17 " 102 3 2" 59
26 0 17 " 102 3 2" 59
27 0 17 " 102 3 2" 59
28 0 17 " 102 3 2" 59
29 0 17 " 102 3 2" 59
30 0 17 " 102 3 2" 59
31 0 17 " 102 3 2" 59
32 0 17 " 102 3 2" 59
33 0 17 " 102 3 2" 59
34 0 17 " 102 3 2" 59
35 0 17 " 102 3 2" 59
36 0 17 " 102 3 2" 59
37 0 17 " 102 3 2" 59
38 0 17 " 102 3 2" 59
39 0 17 " 102 3 2" 59
40 0 17 " 102 3 2" 59
41 0 17 " 102 3 2" 59
42 0 17 " 102 3 2" 59
43 0 17 " 102 3 2" 59
44 0 17 " 102 3 2" 59
45 0 17 " 102 3 2" 59
46 0 17 " 102 3 2" 59
47 0 17 " 102 3 2" 59
48 0 17 " 102 3 2" 59
49 0 17 " 102 3 2" 59
50 0 17 " 102 3 2" 59
51 0 17 " 102 3 2" 59
52 0 17 " 102 3 2" 59
53 0 17 " 102 3 2" 59
54 0 17 " 102 3 2" 59
55 0 17 " 102 3 2" 59
56 0 17 " 102 3 2" 59
57 0 17 " 102 3 2" 59
58 0 17 " 102 3 2" 59
59 0 17 " 102 3 2" 59
0 1 24 " 10217 1" 41
1 1 24 " 10217 1" 41
2 1 24 " 10217 1" 41
3 1 24 " 10217 1" 41
4 1 24 " 10217 1" 41
5 1 24 " 10217 1" 41
6 1 24 " 10217 1" 41
7 1 24 " 10217 1" 41
8 1 24 " 10217 1" 41
9 1 24 " 10217 1" 41
10 1 24 " 10217 1" 41
11 1 24 " 10217 1" 41
12 1 24 " 10217 1" 41
13 1 24 " 10217 1" 41
14 1 24 " 10217 1" 41
15 1 24 " 10217 1" 41
16 1 24 " 10217 1" 41
17 1 24 " 10217 1" 41
end
label values M4_1 M4_1
[/CODE]
Related Posts with Cox Regression - observations end on or before enter()
Add confidence intervals to medianDear Stata users, I would like to add 95% confidence intervals to q50. But it does not appear to be…
ttest by different classification standardHi, I have a bunch of variables, say: a,b,c,d,e. I want to do ttest by different classification. Th…
Demand elasticityHi all, I am using stata to estimate demand for automobiles. I have panel data of 4 years 2014-2017…
logit model yield too high coefficientI ran a logit model Code: egen Banks=group(V) [/CODE] logit Collateraldummy Age Numberofemployee…
Cumulative frequencies and names of observations calculated across rows of different variablesHi Statalisters, Could someone help me with the below or direct me to any previous thread (which I …
Subscribe to:
Post Comments (Atom)
0 Response to Cox Regression - observations end on or before enter()
Post a Comment