data_simul_KDE: Kernel Density Estimation-based Data Simulation
Description
Simulates data based on the kernel density estimation (KDE) of given data.
KDE is a non-parametric way to estimate the probability density function of a random variable.
This function applies the accept-reject method to generate values that follow
the estimated density of the original dataset.
Usage
data_simul_KDE(orig_vals, n = NULL, kernel = "gaussian")
Value
Numeric vector of n simulated values.
Arguments
orig_vals
Numeric vector of values from the original dataset.
n
Integer, number of observations to simulate. If NULL, the function
simulates the same number of observations as in the original dataset. Defaults to NULL.
kernel
Character, specifying the kernel to be used for KDE. Defaults to "gaussian".