Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Difficult ML

From   Jenkins S P <[email protected]>
To   [email protected]
Subject   Re: st: Difficult ML
Date   Tue, 2 Mar 2004 08:52:39 +0000 (GMT)

On Mon, 1 Mar 2004, miguel foguel wrote:

> Dear all,
> 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

... snip ...

I would try and get the program to work with a parametric specification of
the baseline hazards before considering the non-parametric baseline case;
that way you can more easily see whether your problem is one with the
programming per se or with the data.  (With regard to the problem you
mentioned have you tabulated each event variable against survival time,
and checked that you have events of each type in each and every interval?
If you don't have events thus, then you'll need to modify your piecewise
chunks, or move to a more parametric specification.)

A more substantial comment on the program is that you appear to be
specifying the baseline hazard parameters outside the "b" parameter
vectors.  Moreover in your -ml model- statement I see no equations for the
covariates (i.e. the "X_it" rather than the baseline hazard ones): you
appear to have them as scalars at the end of the statement.
I expected to see 2 /equations/ specified, one for each risk, and the
scalars (incidental parameters) would refer only to mass points and their
probabilities. With the equations specified, the dummy variables that are
used to specify the baseline hazard would simply appear as explanatory
variables in the equations (in addition to the X_it).  Doing things this
way, also makes it very easy to try a more parametric specification (you
could replace the set of d.v.s with log(time), say).

I would also update the version in your code from 8.0 to the latest (8.2),
as some very useful features have been added to -ml- since 8.0.

If you can get access to it, have a look at Gould and others (2003),
/Maximum Likelihood Estimation with Stata/, second edition. I find it, and
the first edition, of great use for complex -ml- problems. And yours is
definitely quite complex.  [I would be interested to see a copy once you
have got it working.]  Good luck!

Professor Stephen P. Jenkins <[email protected]>
Institute for Social and Economic Research (ISER)
University of Essex, Colchester CO4 3SQ, UK
Phone: +44 1206 873374.  Fax: +44 1206 873151.
*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index