ftrunc {boodd} | R Documentation |
Robust Estimators of the Mean Based on Regeneration Blocks.
Description
The function calculates various statistics (mean, median, truncated, and Winsorized mean) based on regeneration blocks obtained from the data. It also computes the mean block size. It relies on block-based calculations for robust statistics by eliminating either too large blocks or too large values of the mean on a given block.
Usage
ftrunc(x, atom_f, m = quantile(x, 0.05), M = quantile(x, 0.95), trunc)
Arguments
x |
A vector or time series. |
atom_f |
A numeric value specifying an atom of the Markov chain. |
m |
A numeric value; the lower truncation threshold
Default is the 5th percentile of |
M |
A numeric value; the upper truncation threshold
Default is the 95th percentile of |
trunc |
A numeric value specifying the truncation threshold for computing the truncated and Winsorized means of the block length. |
Details
This function uses blocks obtained from the input data x
to compute
several descriptive statistics, including the mean size of blocks,
overall mean, median, and robust estimates like truncated and Winsorized means.
The function internally uses GetBlocks
to divide the input data
into regenerative blocks when the process hits the atom atom_f
.
The parameters m
and M
represent the lower and upper truncation
thresholds, respectively. By default, these are set to the 5th and 95th percentiles
of the input data, but they can be manually adjusted by the user to perform customized truncation.
The parameter trunc
is used to eliminate blocks which lengths are greater than
trunc
.
Value
A numeric vector containing the following elements:
-
"taumean"
- the mean block size, -
"fmean"
- the mean of the input data, -
"fmed"
- the median of the input data, -
"tmean"
- the truncated mean of the blocks based on the truncation threshold, -
"wmean"
- the Winsorized mean of the blocks based on the truncation threshold.
References
Bertail, P. and Dudek, A. (2025). Bootstrap for Dependent Data, with an R package (by Bernard Desgraupes and Karolina Marek) - submitted.
Bertail, P., Clémençon, S. and Tressou, J. (2015). Bootstrapping Robust Statistics for Markovian Data Applications to Regenerative R‐Statistics and L‐Statistics. Journal of Time Series Analysis, 36, 462–480.
See Also
GetBlocks
, findBestEpsilon
, GetPseudoBlocks
,
smallEnsemble
,
regenboot
.
Examples
n=500 # the length of the process
lambda=0.6 # arrival rate
mu=0.8 # departure rat
X = genMM1(n,lambda,mu) # generate MM1 queue
atom = 0 # specify the atom
trunc = 30 # set truncation threshold
result = ftrunc(x=X, atom_f=atom, m=0, trunc = trunc) # apply function
print(result)