I'm trying to estimate a competing risks model (2 risks) based on a MPH
specification for each risk. Time is discrete and the observation window is
13 months. The baseline hazards are assumed piece-wise constant, so there
are 13 parameters for each risk. The systematic part is modelled as exp(.),
and each risk has its own continuous covariate (cov1 and cov2,
respectively). As for the joint distribution of the unobservables I'm
assuming two points of support for each unobservable, which gives 7 extra
parameters to estimated (4 points of support + 3 probabilities). In fact,
the probabilities have been transformed into a multinomial framework (see
program below).
I'm using -ml- routine with method d0. The problem is that maximization is
converging to a flat part of the LF. I have used -ml check- and -ml search-,
and also tried interactivelly several different initial values. From -ml
plot- I noticed that the parameters of the 13th dummy associated with the
piece-wise baseline hazard for each risk become flat very quickly and stay
there for all values I experimented with. I then normalized those
parameters to be zero because I guessed that there may be a 'collinearity'
problem with the means of the unobservables.
Below there is copy of the code I'm using to estimate the model (For
readability I'm also attaching the code in a txt file). There are 3
components to the LF: contributions from the 1st risk (dc==1), from the 2nd
risk (dc==2), and from right-censoring (dc==3). Though it is a discrete time
setting with piece-wise constant baseline hazards, I arranged the data set
so that each row contains only one individual. Apart from the
right-censoring case, the contributions are essentially composed by: the
hazard of risk j times the survivor of risk j times the survivor of risk k,
where j is different from k. Each contribution is obtained by using the
correspondent probability of the unobservables.
cap program drop comprisk
program define comprisk
version 8.0
args todo b lnf
tempvar lnfj
/* Parameters for the baseline hazards: ht* 1st risk; he*
2nd risk */
tempname he1 he2 he3 he4 he5 he6 he7 he8 he9 he10 he11 he12
tempname ht1 ht2 ht3 ht4 ht5 ht6 ht7 ht8 ht9 ht10 ht11 ht12
/* Parameters for mass points of the joint distributions of
unobservables */
tempname v1 v2 v3 v4
/* Parameters for the probabilities of the joint
distribution */
tempname q13 q14 q23 p13 p14 p23 p24
/* Parameters for the systematic part */
tempname b1 b2
/* Normalizing one of the parameters of the baseline hazards
*/
local he13 = 0
local ht13 = 0