| Title: | Dirichlet Quantile Bootstrap for Time Series |
|---|---|
| Description: | Provides a Dirichlet-based quantile bootstrap method for time series with rank-preserving reconstruction and averaged bootstrap samples. The package generates bootstrap trajectories, a mean bootstrap series, and uncertainty intervals for time series resampling. |
| Authors: | Ahmed Hamimes [aut, cre] |
| Maintainer: | Ahmed Hamimes <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.1 |
| Built: | 2026-06-08 06:46:04 UTC |
| Source: | https://github.com/cran/DPQBootstrap |
Generate bootstrap time series using a Dirichlet-based quantile bootstrap with rank-preserving reconstruction.
dpq_bootstrap(x, R = 500, alpha = 1, seed = NULL)dpq_bootstrap(x, R = 500, alpha = 1, seed = NULL)
x |
Numeric vector. Original time series. |
R |
Integer. Number of bootstrap replications. |
alpha |
Positive numeric. Dirichlet concentration parameter. |
seed |
Optional seed. |
A list containing bootstrap samples, mean series, quantiles and ranks.
x <- c(120, 125, 118, 130, 128, 135, 140, 138, 145, 150) res <- dpq_bootstrap(x, R = 20, alpha = 1, seed = 123) res$mean_series dim(res$samples)x <- c(120, 125, 118, 130, 128, 135, 140, 138, 145, 150) res <- dpq_bootstrap(x, R = 20, alpha = 1, seed = 123) res$mean_series dim(res$samples)
Plot DP-Quantile Bootstrap Result
plot_dpq(object, dates = NULL, interval = "50")plot_dpq(object, dates = NULL, interval = "50")
object |
Object returned by dpq_bootstrap(). |
dates |
Optional vector of dates. |
interval |
Character. Either '50' or '95'. |
A ggplot object.
x <- c(120, 125, 118, 130, 128, 135, 140, 138, 145, 150) res <- dpq_bootstrap(x, R = 20, alpha = 1, seed = 123) if (requireNamespace('ggplot2', quietly = TRUE)) { plot_dpq(res, interval = '50') }x <- c(120, 125, 118, 130, 128, 135, 140, 138, 145, 150) res <- dpq_bootstrap(x, R = 20, alpha = 1, seed = 123) if (requireNamespace('ggplot2', quietly = TRUE)) { plot_dpq(res, interval = '50') }