Plot threshold \(u\) and runs parameter \(D\) diagnostic for the \(D\)-gaps estimator
Source:R/choose_uD.R
plot.choose_ud.Rdplot method for objects inheriting from class "choose_ud",
returned from choose_ud
Usage
# S3 method for class 'choose_ud'
plot(
x,
y = c("imts", "theta"),
level = 0.95,
interval_type = c("norm", "lik"),
conf_scale = c("theta", "log"),
alpha = 0.05,
constrain = TRUE,
for_abline = list(lty = 2, lwd = 1, col = 1),
digits = 3,
uprob = FALSE,
leg_pos = if (y == "imts") "topright" else "topleft",
...
)Arguments
- x
an object of class
c("choose_ud", "exdex"), a result of a call tochoose_ud.- y
A character scalar indicating what should be plotted on the vertical axes of the plot: information matrix test statistics (IMTS) if
y = "imts"and estimates of \(\theta\) ify = "theta". Ify = "theta", and eitherx$uorx$Dhave length one, then 100level% confidence intervals are added to the plot.- level
A numeric scalar in (0, 1). The confidence level used in calculating confidence intervals for \(\theta\). Only relevant if
y = "theta"and eitherx$uorx$Dhave length one.- interval_type
A character scalar. The type of confidence interval to be plotted, if
y = "theta". Seeconfint.dgaps.- conf_scale
A character scalar. If
interval_type = "norm"thenconf_scaledetermines the scale on which we use approximate large-sample normality of the estimator to estimate confidence intervals. Seeconfint.dgaps.- alpha
A numeric vector with entries in (0, 1). The size of the test to be performed.
- constrain
A logical scalar. The argument
constraintoconfint.dgaps.- for_abline
Only relevant when
y = "imts"and at one ofuorDis scalar. A list of graphical parameters to be passed toablineto indicate the critical value of the information matrix test (IMT) implied byalpha.- digits
An integer. Used for formatting the value of the threshold with
signifbefore adding its value to a plot.- uprob
A logical scalar. Should we plot
x$uon the horizontal axis (uprob = FALSE) or the approximate sample quantile to whichx$ucorresponds (uprob = TRUE)?- leg_pos
A character scalar. The position of any legend added to a plot. Only relevant when both the arguments
uandDin the call tochoose_udhave length greater than one.- ...
Additional arguments passed to
matplot.
Details
The type of plot produced depends mainly on y.
If y = "imts" then the values of IMTS are plotted against the
thresholds in x$u (or their corresponding approximate sample
quantile levels if uprob = TRUE) for each value of \(D\)
in x$D. Horizontal lines are added to indicate the critical
values of the IMT for the significance levels in alpha.
We would not reject at the 100alpha% level combinations of
threshold and \(D\) corresponding to values of the IMTS that fall
below the line.
If y = "theta" then estimates of \(\theta\) are plotted on the
vertical axis. If both x$u and x$D$ have length greater
than one then only these estimates are plotted. If either x$u
or x$D have length one then approximate 100level%
confidence intervals are added to the plot and the variable,
x$u or x$D that has length greater than one is plotted on
the horizontal axis.
Examples
See the examples in choose_ud.