Package {DPQBootstrap}


Title: Dirichlet Quantile Bootstrap for Time Series
Version: 0.1.1
Maintainer: Ahmed Hamimes <ahmed.hamimes@univ-constantine3.dz>
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.
License: MIT + file LICENSE
Encoding: UTF-8
RoxygenNote: 7.3.3
Imports: stats, rlang
Suggests: ggplot2
NeedsCompilation: no
Packaged: 2026-05-01 15:52:54 UTC; c63 AMG
Author: Ahmed Hamimes [aut, cre]
Repository: CRAN
Date/Publication: 2026-05-05 18:10:07 UTC

DP-Quantile Bootstrap for Time Series

Description

Generate bootstrap time series using a Dirichlet-based quantile bootstrap with rank-preserving reconstruction.

Usage

dpq_bootstrap(x, R = 500, alpha = 1, seed = NULL)

Arguments

x

Numeric vector. Original time series.

R

Integer. Number of bootstrap replications.

alpha

Positive numeric. Dirichlet concentration parameter.

seed

Optional seed.

Value

A list containing bootstrap samples, mean series, quantiles and ranks.

Examples

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

Description

Plot DP-Quantile Bootstrap Result

Usage

plot_dpq(object, dates = NULL, interval = "50")

Arguments

object

Object returned by dpq_bootstrap().

dates

Optional vector of dates.

interval

Character. Either '50' or '95'.

Value

A ggplot object.

Examples

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')
}