Description Usage Arguments Details Value Author(s) References See Also Examples
Plots the twodimensional confidence region for probability distribution parameters (supported distribution
suffixes: cauchy, gamma, invgauss, lnorm, llogis, logis, norm, unif, weibull) corresponding to a user given
complete or rightcensored dataset and level of significance. See the CRAN website
https://CRAN.Rproject.org/package=conf for a link to two crplot
vignettes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31  crplot(dataset, alpha, distn,
cen = rep(1, length(dataset)),
heuristic = 1,
maxdeg = 5,
ellipse_n = 4,
pts = TRUE,
mlelab = TRUE,
sf = NULL,
mar = c(4, 4.5, 2, 1.5),
xyswap = FALSE,
xlab = "",
ylab = "",
main = "",
xlas = 0,
ylas = 0,
origin = FALSE,
xlim = NULL,
ylim = NULL,
tol = .Machine$double.eps ^ 1,
info = FALSE,
maxcount = 30,
repair = TRUE,
jumpshift = 0.5,
jumpuphill = min(alpha, 0.01),
jumpinfo = FALSE,
showjump = FALSE,
showplot = TRUE,
animate = FALSE,
delay = 0.5,
exact = FALSE,
silent = FALSE )

dataset 
a 1 x n vector of data values. 
alpha 
significance level; resulting plot illustrates a 100(1  
distn 
distribution to fit the dataset to; accepted values: 
cen 
a vector of binary values specifying if the corresponding data values are rightcensored (0), or observed (1, default); its length must match length(dataset). 
heuristic 
numeric value selecting method for plotting: 0 for ellipticoriented point distribution, and 1 for smoothing boundary search heuristic. 
maxdeg 
maximum angle tolerance between consecutive plot segments in degrees. 
ellipse_n 
number of roughly equidistant confidence region points to plot using the ellipticoriented point distribution (must be a multiple of four because its algorithm exploits symmetry in the quadrants of an ellipse). 
pts 
displays confidence region boundary points identified if 
mlelab 
logical argument to include the maximum
likelihood estimate coordinate point (default is 
sf 
significant figures in axes labels specified using sf = c(x, y), where x and y represent the optional
digits argument in the R function 
mar 
specifies margin values for 
xyswap 
logical argument to switch the axes that the distribution parameter are shown. 
xlab 
string specifying the x axis label. 
ylab 
string specifying the y axis label. 
main 
string specifying the plot title. 
xlas 
numeric in 0, 1, 2, 3 specifying the style of axis labels (see 
ylas 
numeric in 0, 1, 2, 3 specifying the style of axis labels (see 
origin 
logical argument to include the plot origin (default is 
xlim 
twoelement vector containing horizontal axis minimum and maximum values. 
ylim 
twoelement vector containing vertical axis minimum and maximum values. 
tol 
the 
info 
logical argument to return plot information: MLE is returned as a list; (x, y) plot point coordinates and corresponding phi angles (with respect to MLE) are returned as a list. 
maxcount 
integer value specifying the number of smoothing search iterations before terminating with 
repair 
logical argument to repair regions inaccessible using a radial angle from its MLE due to multiple roots at select φ angles. 
jumpshift 
see vignette "conf Advanced Options" for details; location (as a fractional value between 0 and 1) along the vertical or horizontal "gap" (near an uncharted region) to locate a jumpcenter toward; can be either a scalar value (uniformly applied to all jumpcenters) or vector of length four (with unique values for its respective quadrants, relative to the MLE). 
jumpuphill 
see vignette "conf Advanced Options" for details; significance level increase to 
jumpinfo 
logical argument to return plot info (see 
showjump 
logical argument specifying if jumpcenter repair reference points appear on the confidence region plot. 
showplot 
logical argument specifying if a plot is output; altering from its default of 
animate 
logical argument specifying if an animated plot build will display; the annimation sequence is given in successive plots. 
delay 
numeric value of delay (in seconds) between successive plots when 
exact 
logical argument specifying if alpha value is adjusted to compensate for negative coverage bias to achieve (1  alpha) coverage probability using previously recorded Monte Carlo simulation results; available for limited values of alpha (roughly <= 0.2–0.3), n (typically n = 4, 5, ..., 50) and distributions (distn suffixes: weibull, llogis, norm). 
silent 
logical argument specifying if console output should be suppressed. 
This function plots a confidence region for a variety of twoparameter distributions. It requires:
a vector of dataset values,
the level of significance (alpha), and
a population distribution to fit the data to.
Plots display according to probability density function parameterization given later in this section. Two heuristics (and their associated combination) are available to plot confidence regions. Along with their descriptions, they are:
Smoothing Boundary Search Heuristic (default). This heuristic plots more points in areas of
greater curvature to ensure a smooth appearance throughout the confidence region boundary. Its
maxdeg
parameter specifies the maximum tolerable angle between three successive points.
Lower values of maxdeg
result in smoother plots, and its default value of 5 degrees
provides adequate smoothing in most circumstances. Values of maxdeg
≤ 3 are not
recommended due to their complicating implications to trigonometric numerical approximations near 0
and 1; their use may result in plot errors.
EllipticOriented Point Distribution. This heuristic allows the user to specify
a number of points to plot along the confidence region boundary at roughly uniform intervals.
Its name is derived from the technique it uses to choose these points—an extension of the Steiner
generation of a nondegenerate conic section, also known as the parallelogram method—which identifies
points along an ellipse that are approximately equidistant. To exploit the computational benefits of
ellipse symmetry over its four quadrants, ellipse_n
value must be divisible by four.
By default, crplot
implements the smoothing boundary search heuristic. Alternatively,
the user can plot using the ellipticoriented point distribution algorithm, or a combination
of them both. Combining the two techniques initializes the plot using the ellipticoriented point
distribution algorithm, and then subsequently populates additional points in areas of high curvature
(those outside of the maximum angle tolerance parameterization) in accordance with the smoothing
boundary search heuristic. This combination results when the smoothing boundary search heuristic
is specified in conjunction with an ellipse_n
value greater than four.
Both of the aforementioned heuristics use a radial profile log likelihood function to identify points along the confidence region boundary. It cuts the log likelihood function in a directional azimuth from its MLE, and locates the associated confidence region boundary point using the asymptotic results associated with the ratio test statistic 2 [log L(θ)  log L(θ hat)] which converges in distribution to the chisquare distribution with two degrees of freedom (for a two parameter distribution).
The default axes convention in use by crplot
are
Horizontal  Vertical  
Distribution  Axis  Axis 
Cauchy  a  s 
gamma  θ  κ 
inverse Gaussian  μ  λ 
log logistic  λ  κ 
log normal  μ  σ 
logistic  μ  σ 
normal  μ  σ 
uniform  a  b 
Weibull  κ  λ 
where each respective distribution is defined below.
The Cauchy distribution for the realnumbered location parameter a, scale parameter s, and x is a real number, has the probability density function
1 / (s π (1 + ((x  a) / s) ^ 2)).
The gamma distribution for shape parameter κ > 0, scale parameter θ > 0, and x > 0, has the probability density function
1 / (Gamma(κ) θ ^ κ) x ^ {(κ  1)} exp(x / θ).
The inverse Gaussian distribution for mean μ > 0, shape parameter λ > 0, and x > 0, has the probability density function
√ (λ / (2 π x ^ 3)) exp(  λ (x  μ) ^ 2 / (2 μ ^ 2 x)).
The log logistic distribution for scale parameter λ > 0, shape parameter κ > 0, and x ≥ 0, has a probability density function
(κ λ) (x λ) ^ {(κ  1)} / (1 + (λ x) ^ κ) ^ 2.
The log normal distribution for the realnumbered mean μ of the logarithm, standard deviation σ > 0 of the logarithm, and x > 0, has the probability density function
1 / (x σ √(2 π)) exp((\log x  μ) ^ 2 / (2 σ ^ 2)).
The logistic distribution for the realnumbered location parameter μ, scale parameter σ, and x is a real number, has the probability density function
(1 / σ) exp((x  μ) / σ) (1 + exp((x  μ) / σ)) ^ {2}
The normal distribution for the realnumbered mean μ, standard deviation σ > 0, and x is a real number, has the probability density function
1 / √ (2 π σ ^ 2) exp((x  μ) ^ 2 / (2 σ ^ 2)).
The uniform distribution for realvalued parameters a and b where a < b and a ≤ x ≤ b, has the probability density function
1 / (b  a).
The Weibull distribution for scale parameter λ > 0, shape parameter κ > 0, and x > 0, has the probability density function
κ (λ ^ κ) x ^ {(κ  1)} exp((λ x) ^ κ).
If the optional argument info = TRUE
is included then a list is returned with:
parm1*: a vector containing the associated confidence region boundary values for parameter 1
parm2*: a vector containing the associated confidence region boundary values for parameter 2
phi: a vector containing the angles used
parm1hat*: the MLE for parameter 1
parm2hat*: the MLE for parameter 2
*Note: "param1" and "param2" are placeholders that will be replaced with the appropriate parameter names based on the probability distribution.
Christopher Weld (ceweld@email.wm.edu)
Lawrence Leemis (leemis@math.wm.edu)
Jaeger, A. (2016), "Computation of Two and ThreeDimensional Confidence Regions with the Likelihood Ratio", The American Statistician, 49, 48–53.
Weld, C., Loh, A., Leemis, L. (in press), "Plotting LikelihoodRatio Based Confidence Regions for TwoParameter Univariate Probability Models", The American Statistician.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19  ## plot the 95% confidence region for Weibull shape and scale parameters
## corresponding to the given ballbearing dataset
ballbearing < c(17.88, 28.92, 33.00, 41.52, 42.12, 45.60, 48.48, 51.84,
51.96, 54.12, 55.56, 67.80, 68.64, 68.64, 68.88, 84.12,
93.12, 98.64, 105.12, 105.84, 127.92, 128.04, 173.40)
crplot(dataset = ballbearing, distn = "weibull", alpha = 0.05)
## repeat this plot using the ellipticoriented point distribution heuristic
crplot(dataset = ballbearing, distn = "weibull", alpha = 0.05,
heuristic = 0, ellipse_n = 80)
## combine the two heuristics, compensating any ellipticoriented point verticies whose apparent
## angles > 6 degrees with additional points, and expand the plot area to include the origin
crplot(dataset = ballbearing, distn = "weibull", alpha = 0.05,
maxdeg = 6, ellipse_n = 80, origin = TRUE)
## next use the inverse Gaussian distribution and show no plot points
crplot(dataset = ballbearing, distn = "invgauss", alpha = 0.05,
pts = FALSE)

[1] "95% confidence region plot complete; made using 102 boundary points."
[1] "95% confidence region plot complete; made using 80 boundary points."
[1] "95% confidence region plot complete; made using 112 boundary points."
[1] "95% confidence region plot complete; made using 103 boundary points."
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.