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