Description Usage Arguments Details Value Examples
View source: R/density_estimation.R
dlg_bivariate
returns the locally Gaussian density estimate of a
bivariate distribution on a given grid.
1 2 3 |
x |
The data matrix (or data frame). Must have exactly 2 columns. |
eval_points |
The grid where the density should be estimated. Must have exactly 2 columns. |
grid_size |
If |
bw |
The two bandwidths, a numeric vector of length 2. |
est_method |
The estimation method, must either be "1par" for estimation with just the local correlation, or "5par" for a full locally Gaussian fit with all 5 parameters. |
tol |
The numerical tolerance to be used in the optimization. Only applicable in the 1-parameter optimization. |
run_checks |
Logical. Should sanity checks be run on the arguments? Useful to disable this when doing cross-validation for example. |
marginal_estimates |
Provide the marginal estimates here if estimation
method is " |
bw_marginal |
Vector of bandwidths used to estimate the marginal distributions. |
This function serves as the backbone in the body of methods concerning local
Gaussian correlation. It takes a bivariate data set, x
, and a
bivariate set of grid points eval_points
, and returns the bivariate,
locally Gaussian density estimate in these points. We also need a vector of
bandwidths, bw
, with two elements, and an estimation method
est_method
A list including the data set $x
, the grid
$eval_points
, the bandwidths $bw
, as well as a matrix of the
estimated parameter estimates $par_est
and the estimated bivariate
density $f_est
.
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.