A data descriptor function used to identify start and stop times for observations in a longitudinal data structure. Information is intended to be stored in a model_specification object.

identify_interval(start_name = NULL, end_name = NULL)

Arguments

start_name

The name of a variable in the input data that denotes the start of an interval.

end_name

The name of a variable in the input data that denotes the end of an interval.

Value

A object that can be used by specify_models to add information about the outcome to the data description function.

Details

The data for datasets with time-varying covariates should be arranged in the following manner. The time over which a given subject is observed should be partitioned into intervals such that the subject's covariates are constant within each interval. Note that it is expected that each subject is observed starting at time 0. Each interval should be supplied as a row in the data, with the start and end times of the intervals specified by the columns identified through the inputs to the start_name and end_name arguments. The end time of each subject's last interval is allowed to be missing or to be some large value such as the maximum amount of allowed follow-up. In either case, the end time of the interval will be inferred to be the subject's censoring or event time as appropriate.

Note that in the multiple-row-per-subject data format described above, the censoring and event information for a given subject should be replicated across each of a given subject's rows.

Author

M. Alan Brookhart