The function takes a data.frame and list consisting of short and long format right-censored failure times. The function reshapes the long format into the wide format needed for calls to mean_tmle. The list returned by the function will have number of entries equal to length(trtOfInterest) + 1. The first will contain the observed trt columns and will set C.t (the censoring counting process) equal to the observed value of censoring. Subsequent entries will set trt equal to each level of trtOfInterest and set C.t to zero for everyone.

makeWideDataList(dat, allJ, uniqtrt, adjustVars, dataList, t0, ...)

Arguments

dat

The short form data.frame

allJ

Numeric vector indicating the labels of all causes of failure.

uniqtrt

The values of trtOfInterest passed to mean_tmle.

adjustVars

A data.frame of adjustment variables that will be used in estimating the conditional treatment, censoring, and failure (hazard or conditional mean) probabilities.

dataList

A list of long format data.frame objects. See the documentation of makeDataList for more details on formatting.

t0

The timepoint at which survtmle was called to evaluate.

...

Other arguments. Not currently used.

Value

A list of data.frame objects as described above.