IDEAS home Printed from https://ideas.repec.org/c/boc/bocode/s460001.html

TVTOOLS: Stata module to build and analyze time-varying exposure data for survival analysis

Author

Listed:
  • Timothy P Copeland

    (Karolinska Institutet)

Programming Language

Abstract

tvtools is a suite of commands that turns prescription, treatment, and other episode records into analysis-ready time-varying survival data. tvexpose converts episode records into person-time intervals with categorical, ever/current/former, cumulative-duration, recency, and cumulative-dose exposure definitions, including grace periods, lags, and washout windows; tvmerge combines several time-varying exposure datasets into one interval set; tvevent attaches single, competing, or recurring events and supports gap-time clocks; tvage, tvband, and tvsplit split follow-up on age, calendar, elapsed-time, and multiple Lexis timescales; and tvpanel builds entry-anchored person-period panels. tvbuild, with the specification frame written by tvspec, performs the whole construction as one validated, transactional call and records a provenance manifest. tvdiagnose reports coverage, gaps, overlaps, and exposure summaries, and tvweight estimates inverse probability of treatment weights (optionally stabilized), overlap and matching weights, and inverse probability of censoring weights for marginal structural models. Dialogs are provided for tvexpose, tvmerge, and tvevent, and the tvtools command lists the suite. Results are returned in r().

Suggested Citation

  • Timothy P Copeland, 2026. "TVTOOLS: Stata module to build and analyze time-varying exposure data for survival analysis," Statistical Software Components S460001, Boston College Department of Economics.
  • Handle: RePEc:boc:bocode:s460001
    Note: This module should be installed from within Stata by typing "ssc install tvtools". The module is made available under terms of the MIT license (https://opensource.org/licenses/MIT).
    as

    Download full text from publisher

    File URL: http://fmwww.bc.edu/repec/bocode/t/tvtools.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/t/tvexpose.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/t/tvexpose.dlg
    File Function: dialog file
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/t/tvexpose.sthlp
    File Function: help file
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/_/_tvexpose_eligible.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/_/_tvexpose_fast_data.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/_/_tvexpose_fast_build.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/_/_tvexpose_dose_sweep.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/_/_tvexpose_diagnostics.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/_/_tvexpose_frame_commit.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/_/_tvexpose_mata.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/t/tvmerge.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/t/tvmerge.dlg
    File Function: dialog file
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/t/tvmerge.sthlp
    File Function: help file
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/_/_tvmerge_mata.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/_/_tvmerge_stack_ids.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/t/tvspec.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/t/tvspec.sthlp
    File Function: help file
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/_/_tvtools_new_vallabel.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/_/_tvtools_check_dates.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/_/_tvtools_interval_union.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/_/_tvtools_rule.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/_/_tvtools_row.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/t/tvevent.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/t/tvevent.dlg
    File Function: dialog file
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/t/tvevent.sthlp
    File Function: help file
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/t/tvdiagnose.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/t/tvdiagnose.sthlp
    File Function: help file
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/t/tvweight.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/_/_tvweight_cumprod.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/t/tvweight.sthlp
    File Function: help file
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/t/tvtools.sthlp
    File Function: help file
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/t/tvage.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/t/tvage.sthlp
    File Function: help file
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/t/tvband.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/t/tvband.sthlp
    File Function: help file
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/t/tvsplit.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/t/tvsplit.sthlp
    File Function: help file
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/_/_tvband_split.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/t/tvpanel.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/t/tvpanel.sthlp
    File Function: help file
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/_/_tvpanel_sweep.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/t/tvbuild.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/t/tvbuild.sthlp
    File Function: help file
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/_/_tvbuild_normalize_spec.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/_/_tvbuild_preflight.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/_/_tvbuild_load_source.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/_/_tvbuild_carry_meta.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/_/_tvbuild_make_source.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/_/_tvbuild_combine.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/_/_tvbuild_event.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/_/_tvbuild_finalize.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/_/_tvbuild_manifest.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/_/_tvbuild_commit.ado
    File Function: program code
    Download Restriction: no
    ---><---

    More about this item

    Keywords

    ;
    ;
    ;
    ;
    ;
    ;
    ;
    ;
    ;
    ;
    ;
    ;
    ;
    ;

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:boc:bocode:s460001. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Christopher F Baum (email available below). General contact details of provider: https://edirc.repec.org/data/debocus.html .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.