Perform a decomposition of trend model residuals

Usually, decomposition is done one time on the time series data, but you can also do a decomposition of the residuals from fitting the trend model. This process can improve the fit of the model by combining the information from the trend analysis and the decomposition.

To combine the decomposition and trend analysis information, do the following:

  1. Do the trend analysis of the data and store the residuals.
  2. Do the decomposition of the stored residuals, omitting the trend component from the decomposition, since data was already detrended by the trend analysis procedure.