xDensity
representation of a kernel smoothing estimator.R/kernelXD.R
kernelXD.Rd
Construct an xDensity
representation of a kernel smoothing estimator.
kernelXD(x, n = 512, from, to, mean, sd, any0 = FALSE, ...)
x | Vector of samples from the underlying distribution. |
---|---|
n, from, to | Optional arguments to |
mean, sd | Optional mean and standard deviation arguments for the extended density. Default to the mean and standard deviation of |
any0 | Logical; if |
... | Additional arguments to |
An xDensity
object.
# xDensity approximation to a noncentral-t distribution # true parameters lambda <- rnorm(1) # noncentrality parameter nu <- runif(1, 4, 6) # degrees of freedom # simulate data x <- rt(1e4, df = nu, ncp = lambda) # xDensity approximation xDens <- kernelXD(x)#> Warning: Endpoint matching failed. mean/sd set to empirical estimates.