| getMinMax {fastGraph} | R Documentation |
Finds a Reasonable Domain for Plotting a Graph
Description
This function computes a reasonable domain for plotting one, two, or three distribution functions by truncating small tail probabilities. This function also lists the population medians.
Usage
getMinMax(xmin = NULL, xmax = NULL, distA, parmA1 = NULL, parmA2 = NULL, distB = NULL,
parmB1 = NULL, parmB2 = NULL, distC = NULL, parmC1 = NULL, parmC2 = NULL)
Arguments
xmin |
A lower bound, usually set to |
xmax |
An upper bound, usually set to |
distA |
Character variable naming the first probability density function (starting with "d") or cumulative density function (starting with "p"). |
parmA1 |
The first argument in |
parmA2 |
The second argument in |
distB |
Character variable naming the second probability density function (starting with "d") or cumulative density function (starting with "p"). |
parmB1 |
The first argument in |
parmB2 |
The second argument in |
distC |
Character variable naming the third probability density function (starting with "d") or cumulative density function (starting with "p"). |
parmC1 |
The first argument in |
parmC2 |
The second argument in |
Details
This function getMinMax is automatically called by plotDist and shadeDist,
so the user does not actually need to directly call getMinMax when
executing plotDist and shadeDist.
This function by itself does not construct a graph.
Value
xmin |
A reasonable value of a lower bound for the domain of a graph. |
xmax |
A reasonable value of an upper bound for the domain of a graph. |
medianA |
The population median of |
medianB |
The population median of |
medianC |
The population median of |
Author(s)
Steven T. Garren, James Madison University, Harrisonburg, Virginia, USA
See Also
Examples
getMinMax( , , "dnorm", 20, 5 ) # Normal(mu=20, sigma=5)
# Standard normal, and t with 4 degrees of freedom
getMinMax( , , "dnorm", 0, 1, "dt", 4, 0 )
# Standard normal, central t with 4 d.f., and t with 4 d.f. and non-centrality parmater = 1.2
getMinMax( , , "dnorm", 0, 1, "dt", 4, 0, "dt", 4, 1.2 )
# Force minimum to be -3.
getMinMax( -3, , "dnorm", 0, 1 )
# Force maximum to be 3.
getMinMax( , 3, "dnorm", 0, 1 )