Makes the input time series equidistant.
This is recommended before performing a permutation distancing test.
This function first inserts NA's for missing x_values,
then it tries to shift double value to previous or next NA's,
finally it aggregates the remaining identical x_values.
Usage
insert_NA_and_try_to_shift(x, x_values, y)
Value
List with the modified x, x_values, y:
x = factor vector with conditions or phases (e.g., "A" and "B").
x_values = (optional) vector with distance (time markers) between observations.
y = vector with observed values.
Arguments
x
factor vector to indicate conditions or phases (e.g., "A" and "B")
x_values
numerical vector with distance (time markers) between observations