Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • DTMS: new Stata command for discrete-time multistate model estimation

    Dear all,

    I am happy to announce the availability of a new Stata package, called dtms. The command name is the abbreviation for "discrete-time multistate" model estimation which has been developed over the last two decades (see, for example, Millimet et al 2003, Lièvre et al 2003, Lynch and Brown 2006, Cai et al. 2010) and has become ever more popular in recent years, especially in epidemiology and demography, but also in other fields. Both continuous-time and discrete-time multistate models have their advantages and disadvantage. Among the advantages of discrete-time models is that they are typically more accessible in terms of intellectual investment and computational burden.

    There are other discrete-time routines out there (see the citations above), but none, to my knowledge, for Stata. Moreover, inference so far has mostly been based on simulation methods and has therefore been computationally costly. The dtms package incorporates newly derived formulas for the asymptotic covariance matrices related to state expectancies and mean age at first incidence, as well as for group comparisons of these results. The derivations of the relevant formulas are contained in the methods PDF file that accompanies the package. I have invested time to make things computationally efficient. Everything is now in what I would consider the interactive range (say, up to a minute or so of waiting time for larger models).

    Even though I have been working on the package for quite a while now, due to its scope it is still in developmental status. I consider it, however, advanced enough to be useful for others. I am using the package as it is in my own research and have put substantial efforts into test scripts. Nevertheless, due to the breadth of the suite of commands, one still may occasionally encounter bugs. Please also note that, while I will try hard to avoid syntax changes in future package versions, they are still possible at this point, so you may have to adjust your do-files that use dtms when you upgrade to a higher package version.

    You can install the package using
    Code:
    . net install dtms , from(https://user.demogr.mpg.de/schneider/stata)
    Once I consider the syntax stable, I will move the package to SSC. The minimum required Stata version is 16.1.

    dtms is a larger suite of commands that not only performs the core multistate calculations but also provides a fairly elaborate mechanism for organizing results. Therefore, it may take a little time until one gets the hang of working with the package. After installation,
    Code:
    . help dtms
    will get you started. Section "Description" of that help entry contains a note on the suggested reading order of other help entries and sections for people that are new to the package. One of the first things to look at is the help entry
    Code:
    . help dtms examples
    which is entirely dedicated to point-and-click examples.

    I hope dtms will be useful to some of you. Any feedback is, of course, highly welcome.

  • #2
    Dear all,

    I have just released version 0.3.0 of the dtms package. It is a large update that includes the following main new features:
    • General implementation of Markov chains with rewards:
      • In addition to the two existing results (life expectancy, mean age at first entry / lifetime risk), there are 12+ new results that are based on the rewards method. Examples are the mean age at absorption and the number of episodes.
      • User-defined rewards that had existed before are now more convenient to calculate.
      • All of the above results come with asymptotic standard errors.
      • All of the above results can additionally be obtained via simulation.
    • Partial age ranges
      • dtms result lexp has new options baseage(), exitage() and partial, and so do the new commands dtms result rslt and dtms result rewd.
      • Partial age ranges under option partial provide a partition of the full age range; and under nopartial provide a convenient shortcut to generating results based on a setup that has a shorter age range than the original setup. All partial age ranges come with asymptotic standard errors.
    • dtms combine now combines any number of any (different) types of results, regardless which result (lexp, mafn, rewards-based results), regardless which age range, and regardless which group (transition probabilities). The only restriction is that results be based on the same mlogit model. 'Combining' here means the generation of a common covariance matrix that can be used for (testing) linear and nonlinear combinations of coefficients.
    The remote package help and point-and-click installation is available via
    Code:
    . view net describe dtms , from(https://user.demogr.mpg.de/schneider/stata)
    For a new install from the command line, use
    Code:
    . net install dtms , from(https://user.demogr.mpg.de/schneider/stata)
    If you are already using the package, you can update using
    Code:
    . adoupdate dtms
    I hope that the new features will be useful for some of you.

    Comment


    • #3
      Dear all,

      I have posted a new version (0.3.2) of the dtms package to the download site (see the previous posts for installation or updating instructions). As far as code is concerned, the current version differs from the last major version (0.3.0) only by a small number of minor bug fixes. A more important change is that the material from the methods document that was included in the package has been converted into working paper format. There are two working papers:
      • Schneider, Daniel C. (2023): Statistical inference for discrete-time multistate models: Asymptotic covariance matrices, partial age ranges, and group contrasts. MPIDR Working Paper, TR-2023-041. DOI:10.4054/MPIDR-WP-2023-041.
      • Schneider, Daniel C. and Myrskylä, Mikko (2023): Statistical inference for discrete-time multistate models: Extensions to Markov chains with rewards. MPIDR Working Paper, TR-2023-042. DOI: 10.4054/MPIDR-WP-2023-042.

      The package no longer contains a methods document, but instead references these two working papers. I hope they will be of interest to some of you.

      Comment

      Working...
      X