The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
For time series the order of the observations carries information: a
synthetic series should reproduce the marginal distribution and
the autocorrelation (and, for several series, the cross-correlation).
fit_synthesizer() has a method for ts objects
with four generators.
method |
What it preserves | How |
|---|---|---|
"copula_var" (default) |
marginals, auto- and cross-correlation | VAR on normal scores, bootstrapped innovations |
"block" |
short-range dependence, exact values | moving (circular) block bootstrap |
"stationary" |
short-range dependence, exact values | stationary bootstrap (Politis & Romano, 1994) |
"iid" |
marginals and contemporaneous correlation only | cross-sectional copula |
Each series is transformed to normal scores through its empirical
distribution, a vector autoregression is fitted (order chosen by AIC up
to max_lag), new paths are simulated with innovations
resampled from the fitted residuals, and the paths are mapped back
through the empirical quantile functions.
fit <- fit_synthesizer(ldeaths)
fit
#> <sp_ts_synthesizer>
#> trained on : 72 time points, 1 series (frequency 12)
#> method : copula_var (VAR order 5)
syn <- generate(fit, seed = 1)
plot_ts(ldeaths, syn)Synthetic series can be of any length and start anywhere:
long <- generate(fit, n = 240, start = c(1980, 1), seed = 2)
tsp(long)
#> [1] 1980.000 1999.917 12.000Block bootstraps resample stretches of the observed series, so they keep short-range dependence and the exact values (and non-linear features within blocks), at the price of repeating observed values:
fit_b <- fit_synthesizer(lh, method = "stationary", block_length = 8)
syn_b <- generate(fit_b, n = 96, seed = 1)
plot_ts(lh, syn_b)order of the copula-VAR should
cover the seasonal period (e.g. order = 12 for monthly
data, see vignette("augmentation")).simulate(fit, nsim = 10) returns ten independent
synthetic series.Politis, D. N. and Romano, J. P. (1994). The stationary bootstrap. Journal of the American Statistical Association, 89(428), 1303–1313.
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.