Learn R Programming

Sim.DiffProc (version 2.5)

Kern_general: Adjustment the Density of Random Variable by Kernel Methods

Description

kernel density estimates. Its default method does so with the given kernel and bandwidth for univariate observations, and adjusted your density with distributions.

Usage

Kern_general(Data, bw, k, Law = c("exp", "GAmma", "chisq", "Beta", 
            "fisher", "student", "weibull", "Normlog", "Norm"))

Arguments

Data
a numeric vector of the observed values.
bw
the smoothing bandwidth to be used. The kernels are scaled such that this is the standard deviation of the smoothing kernel. bw=c('Irt','scott','Ucv','Bcv','SJ') or manual, see details bw.nrd0
k
a character string giving the smoothing kernel to be used. This must be one of "gaussian", "rectangular", "triangular", "epanechnikov", "biweight", "cosine" or "optcosine"
Law
distribution function with Adjusted. see details Distributions (R >= 2.12.1)

Value

  • plot.density estimated with Adjustment.

Details

see details density

See Also

fctgeneral empirical distribution,hist_general Histograms Methods.

Examples

Run this code
X <- rexp(1000,1)
 par(mfrow=c(2,2))
 Kern_general(Data=X, bw='Irt', k="gaussian", Law = c("exp"))
 Kern_general(Data=X, bw='scott', k="gaussian", Law = c("exp"))
 Kern_general(Data=X, bw='Ucv', k="gaussian", Law = c("exp"))
 Kern_general(Data=X, bw=0.3, k="gaussian", Law = c("exp"))

Run the code above in your browser using DataLab