Generate surrogate time series by computing a mean seasonal trend for each year, and shuffling the residuals. This differs from make_surrogate_seasonal in that the data are not sampled uniformly at the same time each year. Thus, we also ask for the day_of_year as input, in order to compute the mean seasonal trend.

make_surrogate_annual_spline(ts, num_surr = 100, day_of_year = NULL)

Arguments

ts

the original time series

num_surr

the number of null surrogates to generate

day_of_year

a vector of the numerical day of year, e.g. January 1 = 1, January 2 = 2, December 31 = 365 (leap years are a bit funny, but I don't think it should have a large effect)

Value

A matrix where each column is a separate surrogate with the same length as ts.