dlg_marginal_wrapper {lg} | R Documentation |
Marginal estimates for multivariate data
Description
Estimates the marginal locally Gaussian parameters for a multivariate data set
Usage
dlg_marginal_wrapper(data_matrix, eval_matrix, bw_vector)
Arguments
data_matrix |
The matrix of data points. One column constitutes an observation vector. |
eval_matrix |
The matrix of evaluation points. One column constitutes a vector of grid points. |
bw_vector |
The vector of bandwidths, one element per component. |
Details
This function takes in a matrix of observations, a matrix of evaluation
points and a vector of bandwidths, and does a locally Gaussian fit on each of
the marginals using the dlg_bivariate
-function. This function assumes
that the data and evaluation points are organized column-wise in matrices,
and that the bandwidth is found in the corresponding element in the bandwidth
matrix. The primary use for this function is multivariate density estimation
using the "5par_marginals_fixed"-method.
Value
A list with marginal parameter and density estimates as provided by
the dlg_bivariate
-function. One element per column in the data.
Examples
data_matrix <- cbind(rnorm(100), rnorm(100))
eval_matrix <- cbind(seq(-4, 4, 1), seq(-4, 4, 1))
bw <- c(1, 1)
estimate <- dlg_marginal_wrapper(data_matrix, eval_matrix = eval_matrix, bw = bw)