EventPred: Simulation-based event prediction in trials with an...

View source: R/EventPred.r

EventPredR Documentation

Simulation-based event prediction in trials with an event-driven design

Description

This function performs event forecasting in trials with an event-driven design. Blinded event data at an interim analysis are used to forecast the number of events at pre-defined time points in the future. For an example of the function call, see EventPredExample.

Usage

EventPred(parameters)

Arguments

parameters

List of the trial design and other parameters. The required elements are defined below:

  • data_set: Data frame that contains blinded patient enrollment, event and dropout data at the interim analysis with a single record per patient. The following :

    • enrollment: Time of the patient's enrollment.

    • time: Time of the patient's death or last contact if the event is censored relative to the patient's enrollment.

    • event: Event indicator (1 if the patient died and 0 otherwise).

    • dropout: Patient dropout indicator (1 if the patient dropped out of the trial/was lost to follow up and 0 otherwise).

    An example is provided in the EventPredData data set.

  • time_points: Numeric vector defining the future time points for computing event predictions. Each elements must be greater than the latest time point in the data_set.

  • event_prior_distribution: Numeric vector with two elements defining the shape and rate parameters of the prior gamma distribution for the event hazard rate. Each element must be positive. The parameters could be computed using the EventPredPriorDistribution function.

  • dropout_prior_distribution: Numeric vector with two elements defining the shape and rate parameters of the prior gamma distribution for the patient dropout hazard rate. Each element must be positive. The parameters could be computed using the EventPredPriorDistribution function.

  • enrollment_prior_distribution: Numeric vector with two elements defining the shape and rate parameters of the prior gamma distribution for the patient enrollment rate. Each element must be positive. The parameters could be computed using the EventPredPriorDistribution function.

  • random_seed: Integer value defining the random number generator seed. The default value is 49283.

  • nsims: Integer value defining the number of simulation runs.

  • ncores: Integer value defining the number of cores for parallel calculations. The number of cores cannot exceed the maximum available number of cores. The default value is 1.

Value

The function returns an object of class ‘⁠EventPredResults⁠’. This object is a list with the following components:

parameters

List containing the user-specified parameters.

interim_analysis

Data frame containing the event information from the interim analysis data set.

predictions

Data frame containing the event prediction information at the future time points.

A detailed summary of the simulation results can be created using the GenerateReport function.

See Also

EventPredApp


MedianaDesigner documentation built on Aug. 28, 2023, 9:06 a.m.