#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