Inp = rollback(M,Inp,Range,Date)
M [ model ] - Model object with a single parameterization.
Inp [ struct ] - Database with a single set of input data for a Kalman filter.
Range [ numeric ] - Filter data range.
Date [ numeric ] - Date up to which the input data entries will be rolled back, see Description.
Inp [ struct ] - New database with new data sets added to each tseries for measurement variables, taking out one observation at a time, see Description.The function rollback takes a database with a single set of input data that is supposed to be used in a future call to a Kalman filter, model/filter, and creates additional data sets (i.e. addition columns in tseries for measurement variables contained in the database) in the following way:
the total number of the new data sets (new columns added to each measurement tseries) is N = NPer*Ny where NPer is the number of rollback periods, from Date to the end of Range (including both), and Ny is the number of measurement variables in the model M.
The first additional data set is created by removing the observation on the last measurement variable in the last period (i.e. end of Range) and replacing it with a NaN.
The second additional data set is created by removing the observatoins on the last two measurement variables in the last period, and so on.
The N-th (last) additional data set is created by removing all observations in all periods between Data and end of Range.
If the model m contains, for instance, 3 measurement variable, the following commands will produce a total of 13 Kalman filter runs, the first one on the original database d, and the other 12 on the rollback data sets, with individual observations removed one by one:
dd = rollback(m,d,qq(2000,1):qq(2015,4),qq(2015,1));
[mf,f] = filter(m,dd,qq(2000,1):qq(2015,4));