Weibull: Estimated Density Values by Weibull kernel

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/DEEVD.R

Description

The Weibull kernel is developed by Salha et al. (2014). They used it to nonparametric estimation of the probability density function (pdf) and the hazard rate function for independent and identically distributed (iid) data. Weibull Kernel is

K_w≤ft( x, \frac{1}{h}\right)(t) =\frac{Γ(1+h)}{hx}≤ft[ \frac{tΓ(1+h)}{x}\right] ^{\frac{1}{h}-1} exp≤ft( -≤ft( \frac{tΓ(1+h)}{x}\right) ^\frac{1}{h}\right)

Usage

1
Weibull(x = NULL, y, k = NULL, h = NULL)

Arguments

x

scheme for generating grid points

y

a numeric vector of positive values

k

number of gird points

h

the bandwidth

Details

see the details in the Gumbel

Value

x

grid points

y

estimated values of density

Author(s)

Javaria Ahmad Khan, Atif Akbar.

References

Salha, R. B., El Shekh Ahmed, H. I., & Alhoubi, I. M. 2014. Hazard Rate Function Estimation Using Weibull Kernel. Open Journal of Statistics 4 (08), 650-661. Silverman, B. W. 1986. Density Estimation. Chapman & Hall/ CRC, London.

See Also

For Gumbel kernel see Gumbel. To plot its density see plot.Weibull and to calculate MSE mse.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#Data can be simulated or real data
## Number of grid points "k" should be at least equal to the data size.
### If user define the generating scheme of gridpoints than number of gridpoints should
####be equal or greater than "k"
##### otherwise NA will be produced.
y <- rexp(100, 1)
xx <- seq(min(y) + 0.05, max(y), length = 100)
h <- 2
den <- Weibull(x = xx, y = y, k = 200, h = h)

##If scheme for generating gridpoints is unknown
y <- rexp(50, 1)
h <- 3
den <- Weibull(y = y, k = 90, h = h)

##If user do not mention the number of grid points
y <- rexp(23, 1)
xx <- seq(min(y) + 0.05, max(y), length = 90)

## Not run: 
#any bandwidth can be used
require(KernSmooth)
h <- dpik(y)
den <- Weibull(x = xx, y = y, h = h)

## End(Not run)

#if bandwidth is missing
y <- rexp(100, 1)
xx <- seq(min(y) + 0.05, max(y), length = 100)
den <- Weibull(x = xx, y = y, k = 90)

DEEVD documentation built on Nov. 28, 2021, 5:07 p.m.