create synthetic timeseries based on a timeseries. Useful for null hypothesis testing
ar1Surrogates(time, vals, detrend = TRUE, method = "redfit", n.ens = 1)
LiPD "variable list" or vector of year/age values
LiPD "variable list" or vector of values
boolean variable, indicating whether one should remove a linear trend (default) or not. Note: does not affect the AR(1) fit, but does affect the generated timeseries
Method used for estimation. Possible values are "even" or "redfit"
Number of ensemble members to simulate
a vector or matrix of AR(1) surrogates for series X