pl2curves {DPQ} | R Documentation |
Plot 2 Noncentral Distribution Curves for Visual Comparison
Description
Plot two noncentral (chi-squared or t
or ..) distribution curves
for visual comparison.
Usage
pl2curves(fun1, fun2, df, ncp, log = FALSE,
from = 0, to = 2 * ncp, p.log = "", n = 2001,
leg = TRUE, col2 = 2, lwd2 = 2, lty2 = 3, ...)
Arguments
fun1 , fun2 |
|
df , ncp , log |
parameters to be passed and used in both functions, which hence typically are non-central chi-squared or t density, probability or quantile functions. |
from , to |
numbers determining the x-range, passed to
|
p.log |
string, passed as |
n |
the number of evaluation points, passed to |
leg |
logical specifying if a |
col2 , lwd2 , lty2 |
color, line width and line type for the second curve. (The first curve uses defaults for these graphical properties.) |
... |
further arguments passed to first |
Value
TODO: inivisible return both curve() results, i.e., (x,y1, y2), possibly as data frame
Author(s)
Martin Maechler
See Also
curve
, ..
Examples
p.dnchiBessel <- function(df, ncp, log=FALSE, from=0, to = 2*ncp, p.log="", ...)
{
pl2curves(dnchisqBessel, dchisq, df=df, ncp=ncp, log=log,
from=from, to=to, p.log=p.log, ...)
}
## TODO the p.dnchiB() examples >>>>>> ../tests/chisq-nonc-ex.R <<<