Specifies control parameters for the data preprocessing stage, used by estimate_dynam(), estimate_rem() and estimate_dynami() (when preprocessingInit is not a preprocessed.goldfish object) and gather_model_data().

set_preprocessing_opt(
  start_time = NULL,
  end_time = NULL,
  opportunities_list = NULL
)

Arguments

start_time

A numerical value or a date-time character string (parsable by as.POSIXct) indicating the starting time when the events are considered for likelihood computation. All the events that happen before the start_time are used to compute the initial values of the effects statistics in the model. It's useful to set this parameter when the model has windowed effects or effects that depends of previous order of events (e.g., trans() and cycle() when history argument is set to sequential or consecutive, as they are initialized with empty values. Default is NULL (start from the first event).

end_time

A numerical value or a date-time character string (parsable by as.POSIXct) indicating the end time when the events are not to be considered for likelihood computation. The preprocessing stage won't stop at this time and will continue processing events after this time. Default is NULL (end with the last event).

opportunities_list

A list object. For choice models, this list specifies, for each dependent event, the set of available nodes in the choice set. The list should have the same length as the number of events in the dependent events objects created with make_dependent_events(). Default is NULL, so the choice set is the set of all nodes present at the time of the event.

Value

An object of class preprocessing_opt.goldfish (a list object), with where the components values are the default values or the values provided to the function. The list object has the following components:

start_time

Value from start_time argument.

end_time

Value from end_time argument.

opportunities_list

Value from opportunities_list argument.

Examples

prep_ctrl <- set_preprocessing_opt(
  start_time = "2000-01-01 00:00:00",
  end_time = "2000-12-31 23:59:59"
)