help for wtdml

Maximum likelihood estimation with Waiting Time Distribution data

wtdml,
[prevd(fr_dens)
hdens(inc_dens)
ddens(exit_dens)
cens(cens_type)
norobust
robust
level(#)
ml_model_opts]

wtdml

wtdml is for use with Waiting Time Distribution data; see help
wtd. You must wtdset your data before using this
command; see help wtdset.

Notes on syntax

fr_dens is one of

exp | lnorm | wei

inc_dens is one of

exp | unif

exit_dens is one of

exp | unif

In the current version inc_dens must equal exit_dens.

cens_type is one of

depphi | dep | indep | none

ml_model_opts are (some!) options allowed with
ml model, see help ml, such as maximum number of iterations,
maximization technique, etc. You should rarely need this, and please
keep in mind that no thorough validation have been made to ensure that
all options will work!

Description

wtdml performs maximum likelihood estimation for
Waiting Time Distribution (wtd) data; see help wtd. wtdml
without options and no ',' redisplays the results from the
previously estimated model. On the other hand wtdml, without
options fits the simplest possible model, as described below.

Options for wtdml

prevd(fr_dens) specifies the forward recurrence
density to use. They are named after their corresponding interarrival
density, i.e. exp means Exponential, lnorm means
Log-Normal, and wei means Weibull. The forward recurrence
density f(t) for an interarrival density g(t) is given by

f(t) = S(t) / mu

where S(t) is the survivor function for g(t) and mu
is the mean for g(t). If not specified it defaults to exp.

The actual parametrizations used are:

FR-Exponenential:

f(t) = exp(-(eb * t)) * eb

where eb = exp(beta).

FR-Weibull:

f(t) = exp(-(eb * t) ^ea - lngamma(1 + 1/ea)) * eb

where ea = e(alpha) and eb = exp(beta).

FR-Log-Normal:

f(t) = normprob(-(ln(x) - mu)/exp(lns)) / exp(mu + exp(2 * lns)/2)

where lns = ln(sigma).

hdens(inc_dens) specifies the incidence density over
the observation interval to be Exponential or Uniform. If not
specified it defaults to exp.

ddens(exit_dens) specifies the exit density over
the observation interval to be Exponential or Uniform. If not
specified it defaults to exp, if cens() is not set to
none.

cens(cens_type) specifies the dependency structure
between event and exit times. depphi implies dependency on both
initial disease status and long term dependency between event and exit
times among non-prevalents (as measured by the parameter phi,
hence the name). dep implies dependency on initial
disease status only. indep implies full independence between
event and exit times regardless of initial treatment status.
none implies that no model should be fitted for exit times, and
only event times be considered.

robust specifies that the Huber/White/sandwich
estimator of variance is to be used in place of the traditional
calculation in the estimation. robust combined with
cluster() (must be set with wtdset) further allows
observations which are not independent within cluster (although they
must be independent between clusters). See help wtdset for
further information.

norobust specifies that the estimation should not
use the Huber/White/sandwich estimator of variance, even though this
was specified in the wtdset statement, see help wtdset.

level(#) is the standard confidence-level option. It
specifies the confidence level, in percent, for confidence intervals
of the coefficients. The default is level(95) or as set by
set level; see help level.

Remarks

A more detailed description of the parameters is given in
the paper by Støvring and Vach (2005), see help wtd. Briefly,
the parameters are:

p is prevalence

lambda is incidence rate

d[i] is i'th exit rate (1 is for prevalents, 0 for
non-prevalents, and if i is missing then it is the joint rate for all)

phi measures departure from independence between event and exit
times among non-prevalents

alpha, beta, mu, and sigma are the parameters of
the forward recurrence density

Note that the maximization procedure involves numerical
integration. This is implemented through the use of a Monte Carlo
technique with antithetic sampling. This results in rather fast code
yielding high precision (although it may still take a while depending
on problem, problem size, and hardware), but it does result in small
(usually very small) random error in estimates. Thus, on a re-run with
exact same data, you will observe a small change in estimates. This
should be considered a feature, as it allows for direct evaluation of
the uncertainty due to the numerical integration, but can be avoided
by setting the seed prior to maximization, see help seed.

Examples

. wtdset event exit, i(id) start(31dec1996) end(31dec1997) scale(365)

. wtdml, prevd(wei) cens(depphi)

. wtdml, prevd(exp) hdens(exp) cens(none)

. wtdml, /* same as above */

. wtdml /* redisplays results */

Also see

Online: help for wtd, ml