LG_boot_statistics: Statistics based on the bootstrapped replicates

View source: R/LG_boot_statistics.R

LG_boot_statisticsR Documentation

Statistics based on the bootstrapped replicates

Description

This internal function specifies the kind of statistics we want to extract from an array of estimated local Gaussian spectral densities, e.g. either when performing an analysis based upon a bunch of samples from a known distribution, or when bootstrapping is used to find pointwise confidence intervals.

Usage

LG_boot_statistics(x, all_statistics = FALSE, log_ = FALSE, names_only = FALSE)

Arguments

x

A vector extracted from the array of values that we want to investigate.

all_statistics

A logical value, default FALSE. The default will return a bunch of quantiles based on the collection of bootstrapped values, which can be used when we need estimates for the confidence intervals. all_statistics equals TRUE will in addition return a bunch of statistics related to the distribution of the bootstrapped values.

log_

A logic argument with default value FALSE. This decides if the statistics should be computed based on the logarithmic values of our replicates (when that makes sense, i.e. when we have nonzero values). It might be preferable to use log_=TRUE, but as we have no guarantee that it occasionally might not occur negative values for the estimated local Gaussian spectra, the default has nevertheless been set to FALSE.

names_only

Logical value, default FALSE. This can be used to extract the names of the resulting vector, without actually doing any computations.

Value

This function can produce quite different outputs depending on the value the names_only-argument. It will either be a vector that only gives the dimension-names (depending on all_statistics and log_) or it might be an _unnamed_ vector with the computed values. The names of the content is needed in order to figure out if it is necessary to split the computation into pieces, since the chosen solution then requires that we need to create the matrix the resulting pieces should be inserted into.


LAJordanger/localgaussSpec documentation built on May 6, 2023, 4:31 a.m.