*! version 1.0 September 11, 2017 @ 08:35:43

Title

wtdtttpredprob -- Predict probability of a
patient still being in treatment after a prescription
redemption based on the estimated parametric Waiting Time
Distribution (WTD).

Syntax

wtdtttpredprob
newvar [if] [in], distrx(varname)

Description

wtdtttpredprob uses the last fitted reverse Waiting Time Distribution
to estimate the probability of a user still being treated at a time
distrx after a prescription redemption. Any covariates used in
the reverse WTD should also be present in the dataset, where the
prediction is to be calculated. Estimation of the WTD will typically
take place in one dataset before another dataset is opened
in which the prediction is then carried out.

Options

distrx(varname) The specified variable should contain
the time after a prescription redemption for which the prediction
should be calculated. In some applications this will be the time
from a prescription until a subsequent event.

Examples

In the following example we first fit a Log-Normal WTD model in
one dataset before predicting the probability of being treated based
on observed prescription redemptions found in another dataset and the
just obtained parameter values:

. wtdttt last_rxtime, disttype(lnorm) reverse mucovar(i.packsize) logitpcovar(i.packsize)

. use lastRx_index, clear

. wtdtttpredprob probttt, distrx(distlast)

To see this example in action run the example do-file
wtdttt_ex.do, which contains analyses based on the datafiles
wtddat_covar.dta and lastRx_index - both are simulated
datasets and both are enclosed.

Author

Katrine Bødkergaard Nielsen, Aarhus University, kani@clin.au.dk.

Henrik Støvring, Aarhus University, stovring@ph.au.dk.