Skip to contents

For use to calculate RMChE, this calculates the squared change error between observed and predicted columns.

Usage

calculate_sq_ch(response, pred, test_period, test_period_flex)

Arguments

response

Observations to test.

pred

Predictions to test.

test_period

Length of period to test for RMChE. If NULL, beginning and end points of each group in group_col are compared. Otherwise, test_period must be set to an integer n and for each group, comparisons are made between the end point and n periods prior.

test_period_flex

Logical value indicating if test_period is less than the full length of the series, should change error still be calculated for that point. Defaults to FALSE.