EconPapers    
Economics at your fingertips  
 

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

Timothy P Copeland ()
Additional contact information
Timothy P Copeland: Karolinska Institutet

Statistical Software Components from Boston College Department of Economics

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().

Language: Stata
Requires: Stata version 16
Keywords: time-varying exposure; survival analysis; stset; person-time; episode data; prescription data; pharmacoepidemiology; Lexis expansion; competing risks; inverse probability weighting; IPTW; IPCW; marginal structural models (search for similar items in EconPapers)
Date: 2026-10-30
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).
References: Add references at CitEc
Citations:

Downloads: (external link)
http://fmwww.bc.edu/repec/bocode/t/tvtools.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/t/tvexpose.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/t/tvexpose.dlg dialog file (text/plain)
http://fmwww.bc.edu/repec/bocode/t/tvexpose.sthlp help file (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_tvexpose_eligible.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_tvexpose_fast_data.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_tvexpose_fast_build.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_tvexpose_dose_sweep.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_tvexpose_diagnostics.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_tvexpose_frame_commit.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_tvexpose_mata.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/t/tvmerge.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/t/tvmerge.dlg dialog file (text/plain)
http://fmwww.bc.edu/repec/bocode/t/tvmerge.sthlp help file (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_tvmerge_mata.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_tvmerge_stack_ids.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/t/tvspec.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/t/tvspec.sthlp help file (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_tvtools_new_vallabel.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_tvtools_check_dates.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_tvtools_interval_union.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_tvtools_rule.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_tvtools_row.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/t/tvevent.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/t/tvevent.dlg dialog file (text/plain)
http://fmwww.bc.edu/repec/bocode/t/tvevent.sthlp help file (text/plain)
http://fmwww.bc.edu/repec/bocode/t/tvdiagnose.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/t/tvdiagnose.sthlp help file (text/plain)
http://fmwww.bc.edu/repec/bocode/t/tvweight.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_tvweight_cumprod.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/t/tvweight.sthlp help file (text/plain)
http://fmwww.bc.edu/repec/bocode/t/tvtools.sthlp help file (text/plain)
http://fmwww.bc.edu/repec/bocode/t/tvage.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/t/tvage.sthlp help file (text/plain)
http://fmwww.bc.edu/repec/bocode/t/tvband.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/t/tvband.sthlp help file (text/plain)
http://fmwww.bc.edu/repec/bocode/t/tvsplit.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/t/tvsplit.sthlp help file (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_tvband_split.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/t/tvpanel.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/t/tvpanel.sthlp help file (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_tvpanel_sweep.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/t/tvbuild.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/t/tvbuild.sthlp help file (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_tvbuild_normalize_spec.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_tvbuild_preflight.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_tvbuild_load_source.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_tvbuild_carry_meta.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_tvbuild_make_source.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_tvbuild_combine.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_tvbuild_event.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_tvbuild_finalize.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_tvbuild_manifest.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_tvbuild_commit.ado program code (text/plain)

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:boc:bocode:s460001

Ordering information: This software item can be ordered from
http://repec.org/docs/ssc.php

Access Statistics for this software item

More software in Statistical Software Components from Boston College Department of Economics Boston College, 140 Commonwealth Avenue, Chestnut Hill MA 02467 USA. Contact information at EDIRC.
Bibliographic data for series maintained by Christopher F Baum ().

 
Page updated 2026-11-02
Handle: RePEc:boc:bocode:s460001