Make 2D kernel smooth distribution
make_2d_kernel_dist(
output,
x,
y,
n = 200,
lims = c(-0.1, 1.1, -0.1, 1.1),
h,
kde_fun = "ks"
)
A matrix of simulation output.
The name of the target variable.
Passed to ks::kde()
or MASS::kde2d()
.
If using ks::kde
, H = diag(h, 2, 2)
.
Note: the definition of bandwidth (h
) is different in two functions.
To get a similar output, the h
is about 50 to 5000 times smaller for ks::kde()
than MASS::kde2d()
Which to use? Choices: "ks" ks::kde
(default; faster and taking less memory); "MASS" MASS::kde2d
.
A kde2d
-type list of smooth distribution.