------------------------------------------------------------------------------- help forwtdml-------------------------------------------------------------------------------

Maximum likelihood estimation with Waiting Time Distribution data

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

wtdml

wtdmlis for use with Waiting Time Distribution data; see help wtd. You mustwtdsetyour data before using this command; see help wtdset.

Notes on syntax

fr_densis one of

exp|lnorm|wei

inc_densis one of

exp|unif

exit_densis one of

exp|unifIn the current version

inc_densmust equalexit_dens.

cens_typeis one of

depphi|dep|indep|none

ml_model_optsare (some!) options allowed withml 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

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

Options forwtdml

prevd(fr_dens)specifies the forward recurrence density to use. They are named after their corresponding interarrival density, i.e.expmeans Exponential,lnormmeans Log-Normal, andweimeans Weibull. The forward recurrence densityf(t)for an interarrival densityg(t)is given by

f(t)=S(t) / muwhere

S(t)is the survivor function forg(t)andmuis the mean forg(t). If not specified it defaults toexp.The actual parametrizations used are:

FR-Exponenential:

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

eb = exp(beta).

FR-Weibull:

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

ea = e(alpha)andeb = 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 toexp.

ddens(exit_dens)specifies the exit density over the observation interval to be Exponential or Uniform. If not specified it defaults toexp, ifcens()is not set tonone.

cens(cens_type)specifies the dependency structure between event and exit times.depphiimplies dependency on both initial disease status and long term dependency between event and exit times among non-prevalents (as measured by the parameterphi, hence the name).depimplies dependency on initial disease status only.indepimplies full independence between event and exit times regardless of initial treatment status.noneimplies that no model should be fitted for exit times, and only event times be considered.

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

norobustspecifies that the estimation shouldnotuse the Huber/White/sandwich estimator of variance, even though this was specified in thewtdsetstatement, 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 islevel(95)or as set byset level; see help level.

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

pis prevalence

lambdais 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)

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

alpha,beta,mu, andsigmaare the parameters of the forward recurrence densityNote 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