bws_global: Compute global bandwidths for Local Gaussian estimates

View source: R/bws_global.R

bws_globalR Documentation

Compute global bandwidths for Local Gaussian estimates

Description

This internal function will check if a file with previous computations exists, and if so rather read the results from that file than recomputing the results. If no file is found in the specified directory, or if only some of the results are computed, then it will do the required computations and create a file to be used later on.

Usage

bws_global(save_dir = NULL, TS, lag_min = 0, lag_max)

Arguments

save_dir

A specification of the directory to be used when saving (and loading) data. The default value NULL will turn of the interaction with disk.

TS

The time series we want to investigate by means of local Gaussian (auto- and cross-) correlations, and later on with local Gaussian spectra. Note that it is assumed that this time series have normalised marginals. The code anticipates that this time series should have a logical attribute bootstrap that decides some of the actions taken under the evaluation, if no such attribute are found, the default will be to assume that bootstrap should be FALSE.

lag_min

A non-negative integer, default value 0, that specifies the lowest lagged pairs to compute the bandwidths for. This allows the computation of the bandwidths to be performed in smaller chunks.

lag_max

How many lags should be included in the analysis.

Value

This function will return the desired bandwidths to the work-flow, and in addition save/update a file with the desired information. If later on there is a need for a computation with a higher value for lag_max, then the values from the saved file will be used in order to avoid redoing previous computations.


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