Description Usage Arguments Value Author(s) References Examples
Builds time-varying covariates needed and fits Treatment Choice Cox models (Parametric Treatment Choice (PTC), Hybrid Treatment Choice (HTC), or Interval Treatment Choice (ITC)) for observational time-to-event studies.
1 2 3 |
type |
character indicating the type of TC model to be fit ('PTC' for Parametric, 'HTC' for Hybrid, or 'ITC' for Interval) |
dataset |
data.frame containing the data to be used to fit the TC model dataset should have all baseline covariates, starting with treatment (0 or 1), in the leading positions following the baseline covariates should be in order the variables: id, start, stop, status id is a unique number for each subject start is the beginning of each time interval where treatment is constant stop is the endpoint of each time interval where treatment is constant status is an indicator (0 or 1) of an event occuring at the corresponding stop time dataset should be ordered by start values within each level of id for each id the first entry should have treatment=0 |
cov_names |
vector of baseline covariate names (including treatment) |
maxfollow |
maximum followup for any subject in dataset |
nmaxint |
maximum number of TC intervals allowed |
interval_width |
width of the TC intervals |
min_exp_events |
minimum number of events expected of subjects in each cell for determining ITC intervals |
min_future_events |
minimum number of events expected of future starters(stoppers) of treatment for determining upper bound on starting(stopping) TC intervals |
nitc_fixed |
indicator (0 or 1) that potential ITC intervals are fixed |
n_start_fixed |
number of fixed ITC starting intervals (only applicable if nitc_fixed=1) |
n_stop_fixed |
number of fixed ITC stopping intervals (only applicable if nitc_fixed=1) |
interval_stop_beginning |
smallest ITC stopping interval endpoint (only applicable if nitc_fixed=1) |
fit |
fit of TC model |
nitc_start |
number of ITC starting intervals |
itc_start_endpoint |
vector containing the ITC starting interval endpoints |
nitc_stop |
number of ITC stopping intervals |
itc_stop_endpoint |
vector containing the ITC stopping interval endpoints |
nstartint |
number of TC starting intervals |
startint |
vector containing the TC starting interval endpoints |
nstopint |
number of TC stopping intervals |
stopint |
vector containing the TC stopping interval endpoints |
cov_names |
vector containing the covariate names of the model tstart is the cumulative constant starting term (PTC only) tstart1 is the cumulative linear starting term (PTC only) tstop is the cumulative constant stopping term (PTC only) tstop1 is the cumulative linear stopping term (PTC only) tstart0 is the cumulative constant starting term outside of ITC intervals (HTC only) tstop0 is the cumulative constant stopping term outside of ITC intervals (HTC only) treatstartp.# is the #'th ITC starting term (ITC and HTC only) treatstopp.# is the #'th ITC stopping term (ITC and HTC only) |
nperson |
number of subjects in dataset |
numevents |
number of events in datsaet |
medianfollowup |
median followup for subjects in dataset |
James F. Troendle
Troendle, JF, Leifer, E, Zhang Z, Yang, S, and Tewes H (2017) How to Control for Unmeasured Confounding in an Observational Time-To-Event Study With Exposure Incidence Information: the Treatment Choice Cox Model. Statistics in Medicine 36: 3654-3669.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | # Use simulated data in example.dat to build and fit a PTC model
#
require(stats)
require(survival)
cov_names=names(example.dat)[1:2]
example.dat=example.dat[1:500,]
z=tc(type="PTC", dataset=example.dat, cov_names = cov_names, min_exp_events = 5,
min_future_events = 20)
z[[1]]
#
# Use simulated data in example.dat to build and fit an HTC model
#
require(stats)
require(survival)
cov_names=names(example.dat)[1:2]
example.dat=example.dat[1:500,]
z=tc(type="HTC", dataset=example.dat, cov_names = cov_names, min_exp_events = 5,
min_future_events = 20)
z[[1]]
#
# Use simulated data in example.dat to build and fit an ITC model
#
require(stats)
require(survival)
cov_names=names(example.dat)[1:2]
example.dat=example.dat[1:500,]
z=tc(type="ITC", dataset=example.dat, cov_names = cov_names, min_exp_events = 5,
min_future_events = 20)
z[[1]]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.