LG_approx | R Documentation |
This function approximates the local Gaussian auto- and cross-correlations for the given combination of tuning parameters.
LG_approx(
save_dir = NULL,
TS,
lag_max = ceiling(3 * sqrt(length(TS))),
LG_points,
.bws_mixture = c("mixture", "local", "global"),
bw_points = c(25, 35),
.bws_fixed = NULL,
.bws_fixed_only = FALSE,
content_details = c("rho_only", "rho_log.fun", "rho_all"),
LG_type = c("par_five", "par_one")
)
save_dir |
A specification of the directory to be used when
saving (and loading) data. The default value |
TS |
The time series we want to investigate by means of
techniques based on local Gaussian approximations. Note that
this argument in the "wrapper"- and "scribe"-functions can be
given as a character vector that specifies the file where
|
lag_max |
The number of lags to include in the analysis. The
default value |
LG_points |
An array that specifies the point at which it is
desired to compute the local Gaussian estimates. Use the
function |
.bws_mixture |
An argument that specifies how the global
bandwidths and those obtained by the nearest-neighbour strategy
should be combined. The three available options are
|
bw_points |
A vector, default |
.bws_fixed |
A vector of non-negative real values, that can be
used to specify fixed values for the bandwidths (which might be
of interest to do in a preliminary analysis). The default
value |
.bws_fixed_only |
A logic value, default |
content_details |
A character string from |
LG_type |
One of |
This function will return a list with nodes as described below:
The value of the argument LG_type
. This is
included in order to simplify the code later on.
The value of the argument .bws_mixture
.
This is included in order to simplify the code later on.
The value of the argument
content_details
. This is included in order to simplify
the code later on.
This will be null if LG_type
does not
contain "par_one", otherwise it will contain information about
the Local Gaussian approximation based on the one free
parameter approach. This can contain NA
-values if some
numerical convergence failed.
This will be null if LG_type
does not
contain "par_five", otherwise it will contain information about
the Local Gaussian approximation based on the five free
parameters approach. This object contains an attribute
convergence
that reveals if the numerical convergence of
the function localgauss
was successful.
The attributes that the
LG_extend_points
-function added when it was given the
LG_points
-argument.
Regarding the case where the LG_type
-argument is equal
to "par_one": The author of this package has always considered
the "par_one"-approach to be reasonable when the aim of the
investigation is to estimate a density at a given point.
However, the extraction of the correlation value from the
resulting density-estimate will in general not capture the
local geometrical properties of the targeted distribution at
the point of investigation. The "par_one"-approach is as such
(in general) a complete waste of computation resources.
It is not intended that this function should be called
directly. The idea is that the function
LG_approx_scribe
should be called, which then (after
some sanity testing of the arguments) will call this function
only when it is necessary, i.e. it will keep track of the
bookkeeping and prevent previously computed results from being
recomputed.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.