treatinit: Gets dataset into standard form

Description Usage Arguments Value Author(s) References Examples

Description

Creates sequential IDs

Calculates starting and stopping times

Usage

1
treatinit(dataset,nmaxint)

Arguments

dataset

data.frame organized as expected by tc()

nmaxint

maximum number of TC intervals allowed

Value

dataset

data.frame with dataset broken up according to TC intervals

obsnum

number of intervals of time in dataset

nperson

number of subjects in dataset

maxobs

maximum number of observations (intervals of time) allowed for dataset

numevents

number of events in datsaet

start_times

vector of ordered times when starting of treatment occurs in dataset

stop_times

vector of ordered times when stopping of treatment occurs in dataset

followup

vector of same length as dataset containing followup times

tti

vector of same length as dataset containing times when starting occurs or 0 if subject does not start

tti

vector of same length as dataset containing times when stopping occurs or 0 if subject does not stop

medianfollowup

median followup for subjects in dataset

Author(s)

James F. Troendle

References

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.

Examples

1
2
3
4
5
6
7
8
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (x)
{
  }

trooper197/tccox documentation built on May 8, 2019, 6:56 p.m.