Learn R Programming

DELTD (version 2.6.5)

dencomb: Plot the Densities for Comparison

Description

Plot the Estimated Densities with Real Density for Comparison .

Usage

dencomb(y, k, h, comb)

Arguments

y

a numeric vector of positive values.

k

gird points.

h

the bandwidth

comb

mention the combination which kernel estimated densities are to be compared. If Lognormal and Birnbaum-Saunders kernel densities are to be compared along with real density then use "TLB". If Lognormal and Erlang then use "TLE". If Lognormal and Gamma to be compared then use "TLG". For Birnbaum-Saunders and Erlang use "TBE". For Birnbaum-Saunders and Gamma then use "TBG". For Erlang and Gamma use "TEG". For Lognormal, Birnbaum-Saunders and Erlang use "TLBE". For Lognormal, Birnbaum-Saunders and Gamma use "TLBG". For Birnbaum-Saunders, Erlang and Gamma use "TBEG". To compare all densities in one graph use "TLBEG".

Value

Plot of Estimated Densities with Real Data Density.

References

  • Jin, X.; Kawczak, J. 2003. Birnbaum-Saunders & Lognormal kernel estimators for modeling durations in high frequency financial data. Annals of Economics and Finance 4, 103<U+2013>124.

  • Salha, R. B.; Ahmed, E. S.; Alhoubi, I. M. 2014. Hazard rate function estimation ksing Erlang Kernel. Pure Mathematical Sciences 3 (4), 141<U+2013>152.

  • Chen, S. X. 2000. Probability density function estimation using Gamma kernels. Annals of the Institute of Statistical Mathematics 52 (3), 471-480.

See Also

For indivisual densities of each kernels see plot.Erlang, plot.BS, plot.LN, and plot.Gamma

Examples

Run this code
# NOT RUN {
y <- rexp(10,1)
h <- 0.79 * IQR(y) * length(y) ^ (-1/5)
dencomb(y,20,h,"TLB")
# }

Run the code above in your browser using DataLab