| qqunif | R Documentation |
Q-Q plot for uniformly distributed random variables
qqunif(
u,
type = "unif",
logscale = TRUE,
base = 10,
col = palette()[4],
lcol = palette()[2],
ci = FALSE,
alpha = 0.05,
...
)
u |
A vector of uniformly distributed random variables. |
type |
Distribution type: |
logscale |
Logical; use log scale. |
base |
Base of the logarithm. |
col |
Color for points. |
lcol |
Color for the diagonal reference line. |
ci |
Logical; show confidence intervals. |
alpha |
Significance level for confidence intervals. |
... |
Additional graphical arguments passed to |
This function produces a Q-Q plot for a random variable following a uniform distribution, optionally on a logarithmic scale.
For type = "exp", the plot is based on exponential order statistics, which is generally more appropriate than directly log-transforming the expected uniform order statistics.
Invisibly returns the list produced by qqplot() with components:
Expected quantiles.
Observed quantiles.
Jing Hua Zhao
balakrishnan03gap \insertRefcasella02gap \insertRefdavison03gap
qqfun
## Not run:
u_obs <- runif(1000)
r <- qqunif(u_obs,pch=21,bg="blue",bty="n")
u_exp <- r$y
hits <- u_exp >= 2.30103
points(r$x[hits],u_exp[hits],pch=21,bg="green")
legend("topleft",sprintf("GC.lambda = %.4f",gc.lambda(u_obs)))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.