# NOT RUN {
ilnorm(0.5, meanlog = 5, sdlog = 0.5)
set.seed(8675309)
ilnorm(runif(10), 8, 2, showPDF = TRUE)
set.seed(8675309)
ilnorm(runif(10), 8, 2, showECDF = TRUE)
set.seed(8675309)
ilnorm(runif(10), 8, 2, showPDF = TRUE, showECDF = TRUE, sampleColor = "blue3")
set.seed(8675309)
ilnorm(runif(10), 8, 2, showPDF = TRUE, showCDF = FALSE)
# }
# NOT RUN {
ilnorm(runif(100), 8, 2, showPDF = TRUE, minPlotQuantile = 0.02, maxPlotQuantile = 0.98)
# }
# NOT RUN {
# plot the PDF and CDF without any variates
ilnorm(NULL, 8, 2, showPDF = TRUE, showCDF = TRUE)
# plot CDF with inversion and PDF using show
# }
# NOT RUN {
ilnorm(runif(10), 8, 2, show = c(1,1,0))
# }
# NOT RUN {
ilnorm(runif(10), 8, 2, show = 6)
# plot CDF with inversion and ECDF using show, using vunif
# }
# NOT RUN {
ilnorm(vunif(10), 8, 2, show = c(1,0,1))
# }
# NOT RUN {
ilnorm(vunif(10), 8, 2, show = 5)
# plot CDF with inversion, PDF, and ECDF using show
# }
# NOT RUN {
ilnorm(vunif(10), 8, 2, show = c(1,1,1))
# }
# NOT RUN {
ilnorm(vunif(10), 8, 2, show = 7)
# plot three different CDF+PDF+ECDF horizontal displays,
# with title only on the first display
par(mfrow = c(3,3)) # 3 rows, 3 cols, filling rows before columns
set.seed(8675309)
ilnorm(runif(20), 8, 2, show = 7, respectLayout = TRUE)
ilnorm(runif(20), 8, 2, show = 7, respectLayout = TRUE, showTitle = FALSE)
ilnorm(runif(20), 8, 2, show = 7, respectLayout = TRUE, showTitle = FALSE)
# overlay visual exploration of ks.test results
set.seed(54321)
vals <- ilnorm (runif(10), 8, 2, showECDF = TRUE)
D <- as.numeric(ks.test(vals, "plnorm", 8, 2)$statistic)
for (x in seq(0.75, 1.25, by = 0.05)) {
y <- plnorm(x, 8, 2)
segments(x, y, x, y + D, col = "darkgreen", lwd = 2, xpd = NA)
}
# }
# NOT RUN {
# display animation of all components
ilnorm(runif(10), 8, 2, show = 7, plotDelay = 0.1)
# display animation of CDF and PDF components only
ilnorm(runif(10), 8, 2, show = 5, plotDelay = 0.1)
# pause at each stage of inversion
ilnorm(runif(10), 8, 2, show = 7, plotDelay = -1)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab