LG_boot_statistics: Statistics based on the bootstrapped replicates.

Description Usage Arguments Value

View source: R/LG_boot_statistics.R

Description

This 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 confidence intervals.

Usage

1
2
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

logic, default FALSE. When this is used, no computations are performed, and only the names to be used on the resulting vector will be returned.

Value

This function can produce quite different outputs depending on the value names_only. 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. This strategy has been chosen in order keep the intermediate objects as small as possible (but I have not tested this to see if there should be any difference in performance, so it might perhaps be an inane choice). Anyway, we do need the names of the content if we should need to split our 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 July 28, 2017, 12:15 a.m.