EventData: Constructor for event data object

Description Usage Arguments Value

Description

All dates must be in one of the following formats: YYYY-MM-DD, DD/MM/YY or DD Month YYYY

Usage

1
2
EventData(data, subject, rand.date, has.event, withdrawn, time, site = NULL,
  event.type = NULL, remove.0.time = FALSE, followup = Inf)

Arguments

data

A data frame

subject

string, the column name of subject identifiers

rand.date

string, the column name of randomization dates

has.event

string, the column name of whether a subject had an event (1) or not (0)

withdrawn

string, the column name of whether a subject has withdrawn (1) or not (0)

time

Either a string, the column name of time each subject has been on the study or a list with elements with (some of) the following named elements. last.date, event.date, prog.date, dth.date and withdrawn.date In this case the package will attempt to derive the time column See the vignette and then eventPrediction:::AddTimeColumn for further details

site

optional column for subject site

event.type

optional column for the event type (e.g. unstable angina) if not included then ‘Had Event’ will be used

remove.0.time

logical, if TRUE then all subjects with time = NA or 0 are removed from the data set and not included in the object. If FALSE then they are included in the simulation (but not in the model fitting)

followup

A numeric value for the fixed follow up period a subject is followed. This is in days. If there is no fixed followup period then Inf should be used

Value

An EventData object


scientific-computing-solutions/eventPrediction documentation built on May 29, 2019, 3:44 p.m.