plot.Weibull: Density Plot by Weibull kernel

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

View source: R/DEEVD.R

Description

Plot density by using Weibull Kernel.

Usage

1
2
## S3 method for class 'Weibull'
plot(x, ...)

Arguments

x

an object of class "Weibull"

...

Not presently used in this implementation

Value

nothing

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.

See Also

For Gumbel kernel see plot.Gumbel. To calculate Weibull estimated values see Weibull and for MSE use mse.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
y <- rlnorm(100, meanlog = 0, sdlog = 1)
h <- 1.5
xx <- seq(min(y) + 0.05, max(y), length = 200)
den <- Weibull(x = xx, y = y, k = 200, h = h)
plot(den, type = "l")

##other details can also be added
y <- rlnorm(100, meanlog = 0, sdlog = 1)
grid <- seq(min(y) + 0.05, max(y), length = 200)
h <- 0.79 * IQR(y) * length(y) ^ (-1/5)
gr <- Weibull(x = grid, y = y, k = 200, h = h)
plot(gr, type = "s", ylab = "Density Function", lty = 1, xlab = "Time")

## To add true density along with estimated
d1 <- density(y, bw = h)
lines(d1, type = "p", col = "green")
legend("topright", c("Real Density", "Density by Weibull Kernel"),
col=c("green", "black"), lty=c(1,2))

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