I want to do a survival analysis using a discrete time multilevel model in Stata, because the data I have is subject to heaping at certain ages (which explains the discrete time) and because the data I have is hierarchal (children are nested in households, the variable hh_number
).
Specifically, I want to look at whether the variable polygamy
has an effect on survival. I created the following variables:
death_indicator_1
: that takes 1 if the child died 0 and 11 months,death_indicator_2
: that takes 1 if the child died between 12 and 23 months, anddeath_indicator_3
that takes 1 if the child died between 24 and 60 months.
I also created the variables
survival_time_1
for survival time between 0 and 11 months,survival_time_2
for survival time between 12 and 23 months, andsurvival_time_3
for children between 24 and 60 months.
The variable polygamy
takes 1 if the child was born into a polygamous household. In the papers I read that use a similar model, the survival analysis in discrete time is always in reference to one time-interval.
I tried this command to declare interval-timed survival model:
stset survival_time_1 survival_time_2 survival_time_3, failure(death_indicator_1 == 1 | death_indicator_2 == 1 | death_indicator_3 == 1)
But Stata says: too many variables specified
And this command to run the multilevel fixed effect logistic regression:
clogit death_indicator_1 death_indicator_2 death_indicator_3 i.polygam, base(0), group(hh_number)
But I get: invalid 'group'
How can I do this correctly?