Package 'DPQBootstrap'

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

Help Index


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