Learn R Programming

ksm (version 1.0)

simu_kldiv: Kullback-Leibler divergence via Monte Carlo

Description

Given a target density and a kernel estimator, evaluate the Kullback-Leibler divergence by Monte Carlo integration by simulating draws from the corresponding model.

Usage

simu_kldiv(x, b, kernel, model, B = 10000L, nrep = 10L)

Value

a vector of length 2 containing the mean and the standard deviation of the estimator.

Arguments

x

a cube of dimension d by d by n containing the sample matrices which define the kernel matrix estimator

b

positive double, bandwidth parameter

model

integer between 1 and 6 indicating the simulation scenario

B

number of Monte Carlo replications, default to 10K