SCEM uses the residual sum of squares for each group to give a sense of the error in estimation. It is defined by:
RSS(S_q) = _k S_q _i = 1^n_k ||y_k,i - _S_q (in_k) - c_k||^2ASCII representation
(See Chazin et al. 2019, Supplemental Materials 1).
The trend function for each individual time series is estimated non-parametrically
by the local linear estimate (as discussed in Fan and Gijbels (1996)). Then, the common trend
function for the group is estimated by taking the average over the group. Next, the shift functions
are estimated as the differences from the individual trend functions and finally, the residual sum
of squares are calculated using the original values, the common trend functions and the shifts.