Describe an epoch within a multistage_parameters object

multistage_epoch(start, pars = NULL, transform_state = NULL)

Arguments

start

The start time, in units of time in your data set. These must correspond to time points with data. The model will complete the step to this time point, then change parameters, then continue (so start represents the time point we move from with these parameters)

pars

Optional parameter object, replacing the model parameters at this point. If NULL then the model parameters are not changed, and it is assumed that you will be changing model state via transform_state.

transform_state

Optional parameter transformation function. This could be used in two cases (1) arbitrary change to the model state (e.g., a one-off movement of state within particles at a given time point that would be otherwise awkward to code directly in your model), or (2) where you have provided pars and these imply a different model state size. In this case you must provide transform_state to fill in new model state, move things around, or delete model state depending on how the state has changed. This function will be passed three arguments: (1) the current model state, (2) the result of the $info() method from the model used to this point, (3) the result of the $info() method for the new model that was created with pars which will be run from this point. Future versions of this interface may allow passing the parameters in too.