# NOT RUN {
iweibull(0.7, 3, 2)
set.seed(8675309)
iweibull(runif(10), 3, 2, showPDF = TRUE)
set.seed(8675309)
iweibull(runif(10), 3, 2, showECDF = TRUE)
set.seed(8675309)
iweibull(runif(10), 3, 2, showPDF = TRUE, showECDF = TRUE)
set.seed(8675309)
iweibull(runif(10), 3, 2, showPDF = TRUE, showCDF = FALSE)
iweibull(runif(120), 3, 2, showPDF = TRUE, minPlotQuantile = 0.02, maxPlotQuantile = 0.98)
# use resetRowsMargins to allow visual exploration of ks.test results
set.seed(54321)
vals <- iweibull(runif(10), 3, 2, showECDF = TRUE, resetRowsMargins = FALSE)
D <- as.numeric(ks.test(vals, "pweibull", 3, 2)$statistic)
for (x in seq(1.5, 2.0, by = 0.025)) {
y <- pweibull(x, 3, 2)
segments(x, y, x, y + D, col = "darkgreen", lwd = 2, xpd = NA)
}
# show the PDF and CDF without any variates
iweibull(NULL, 3, 2)
# show CDF with inversion and PDF using show
iweibull(runif(10), 3, 2, show = c(1,1,0))
iweibull(runif(10), 3, 2, show = 6)
# show CDF with inversion and ECDF using show
iweibull(runif(10), 3, 2, show = c(1,0,1))
iweibull(runif(10), 3, 2, show = 5)
# show CDF with inversion, PDF, and ECDF using show
iweibull(runif(10), 3, 2, show = c(1,1,1))
iweibull(runif(10), 3, 2, show = 7)
# }
Run the code above in your browser using DataLab