make_surrogate_annual_spline: make_surrogate_annual_spline

Description Usage Arguments Value

View source: R/utils-data-transformations.R

Description

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.

Usage

1
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.


ha0ye/portalDS documentation built on March 28, 2020, 1:21 p.m.