Learn R Programming

PDFEstimator (version 4.5)

estimatePDFmv: Multivariate Nonparametric Density Estimation

Description

Estimates the multivariate probability density function for a data sample containing up to 3 variables.

Usage

estimatePDFmv(sample, debug = 0, resolution = NULL)

Value

x

estimated range of density data

pdf

estimated probability density function

Arguments

sample

data sample from which to calculate the density estimate. Each column of data represents an independent variable.

debug

verbose output printed to console

resolution

grid length of data points for each independent variable.

Author

Jenny Farmer, Donald Jacobs

Details

A multivariate nonparametric density estimator based on the maximum-entropy method. Accurately predicts a probability density function (PDF) for random data for 1, 2, or 3 variables.

References

Farmer, J. and D. Jacobs (2018). "High throughput nonparametric probability density estimation." PLoS One 13(5): e0196937.

Examples

Run this code
#Estimates a 2-variable normal distribution with 10000 sample points

library(MultiRNG)
nSamples = 5000
cmat = matrix(c(1.0, 0.0, 0.0, 1.0), nrow = 2, ncol = 2)
meanvec = c(0, 0)
sample = draw.d.variate.normal(no.row = nSamples, d = 2,
                               mean.vec = meanvec, cov.mat = cmat)
mvPDF = estimatePDFmv(sample)


Run the code above in your browser using DataLab