Learn R Programming

mosaic (version 0.4-1)

xpnorm: Augmented versions of pnorm and qnorm

Description

These functions behave similarly to the functions with the initial x removed from their names but add more verbose output and graphics.

Usage

xpnorm(q, mean = 0, sd = 1, plot = TRUE, verbose = TRUE,
    invisible = FALSE, digits = 4, lower.tail = TRUE,
    log.p = FALSE, xlim = mean + c(-4, 4) * sd,
    ylim = c(0, 1.4 * dnorm(mean, mean, sd)), vlwd = 2,
    vcol = trellis.par.get("add.line")$col, rot = 45,
    manipulate = FALSE, ...)

xqnorm(p, mean = 0, sd = 1, plot = TRUE, verbose = TRUE, digits = 4, lower.tail = TRUE, log.p = FALSE, xlim, ylim, invisible = FALSE, vlwd = 2, vcol = trellis.par.get("add.line")$col, rot = 45, ...)

Arguments

p
probability
q
quantile
mean,sd
parameters of normal distribution.
plot
logical. If TRUE, show an illustrative plot.
verbose
logical. If TRUE, display verbose output.
invisible
logical. If TRUE, return value invisibly.
digits
number of digits to display in output.
lower.tail
logical. If FALSE, use upper tail probabilities.
log.p
logical. If TRUE, uses the log of probabilities.
xlim,ylim
limits for plotting.
vlwd,vcol
line width and color for vertical lines.
rot
angle of rotation for text labels.
manipulate
logical. If TRUE and in RStudio, then sliders are added for ineractivity.
...
additional arguments.

See Also

histogram, chisq.test, pnorm, qnorm, qqmath, and plot.

Examples

Run this code
xpnorm(650, 500, 100)
xqnorm(.75, 500, 100)
if (require(manipulate)) {
  manipulate( xpnorm(score, 500, 100, verbose=verbose),
    score = slider(200,800),
	verbose = checkbox(TRUE, label="Verbose Output")
  )
}

Run the code above in your browser using DataLab