Description Usage Arguments Details Value References Examples
View source: R/density_estimation.R
Estimate a multivariate density function using locally Gaussian approximations
1 2 3 4 5 6 7 8 |
lg_object |
An object of type |
grid |
A matrix of grid points, where we want to evaluate the density estimate. |
level |
Specify a level if asymptotic standard deviations and confidence intervals should be returned. |
normalization_points |
How many grid points for approximating the integral of the density estimate, to use for normalization? |
bootstrap |
Calculate bootstrapped confidence intervals instead. |
B |
Number of bootstrap replications if using bootstrapped confidence intervals. |
This function does multivariate density estimation using the locally Gaussian
density estimator (LGDE), that was introduced by Otneim & Tjøstheim (2017).
The function takes as arguments an lg
-object as produced by the main
lg_main
-function (where all the running parameters are specified), and
a grid of points where the density estimate should be estimated.
A list containing the density estimate as well as all the running parameters that has been used. The elements are:
f_est
: The estimated multivariate density.
loc_mean
: The estimated local means if est_method
is "5par" or "5par_marginals_fixed", a matrix of zeros if
est_method
is "1par".
loc_sd
: The estimated local st. deviations if
est_method
is "5par" or "5par_marginals_fixed", a matrix
of ones if est_method
is "1par".
loc_cor
: Matrix of estimated local correlations, one
column for each pair of variables, in the same order as specified
in the bandwidth object.
x
: The data set.
bw
: The bandwidth object.
transformed_data
: The data transformed to approximate
marginal standard normality.
normalizing_constants
: The normalizing constants used to
transform data and grid back and forth to the marginal standard
normality scale, as seen in eq. (8) of Otneim & Tjøstheim (2017).
grid
: The grid where the estimation was performed, on the
original scale.
transformed_grid
: The grid where the estimation was
performed, on the marginal standard normal scale.
normalization_points
Number of grid points used
to approximate the integral of the density estimate, in order to
normalize?
normalization_constant
If approximated, the integral of the
non-normalized density estimate. NA if not normalized.
density_normalized
Logical, indicates whether the final
density estimate (contained in f_est) has been approximately
normalized to have unit integral.
loc_cor_sd
Estimated asymptotic standard deviation for the
local correlations.
loc_cor_lower
Lower confidence limit based on the asymptotic
standard deviation.
loc_cor_upper
Upper confidence limit based on the asymptotic
standard deviation.
Otneim, Håkon, and Dag Tjøstheim. "The locally gaussian density estimator for multivariate data." Statistics and Computing 27, no. 6 (2017): 1595-1616.
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.