plot.choose_uk: Plot Threshold u and runs parameter K diagnostic for the...

Description Usage Arguments Details Value Examples See Also

View source: R/choose_uk.R


plot method for objects inheriting from class "choose_uk", returned from choose_uk


## S3 method for class 'choose_uk'
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", ...)



an object of class c("choose_uk", "exdex"), a result of a call to choose_uk.


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 θ if y = "theta". If y = "theta", and either x$u or x$k have length one, then 100level% confidence intervals are added to the plot.


A numeric scalar in (0, 1). The confidence level used in calculating confidence intervals for θ. Only relevant if y = "theta" and either x$u or x$k have length one.


A character scalar. The type of confidence interval to be plotted, if y = "theta". See confint.kgaps.


A character scalar. If interval_type = "norm" then conf_scale determines the scale on which we use approximate large-sample normality of the estimator to estimate confidence intervals. See confint.kgaps.


A numeric vector with entries in (0, 1). The size of the test to be performed.


A logical scalar. The argument constrain to confint.kgaps.


Only relevant when y = "imts" and at one of u or k is scalar. A list of graphical parameters to be passed to abline to indicate the critical value of the information matrix test (IMT) implied by alpha.


An integer. Used for formatting the value of the threshold with signif before adding its value to a plot.


A logical scalar. Should we plot x$u on the horizontal axis (uprob = FALSE) or the approximate sample quantile to which x$u corresponds (uprob = FALSE)?


A character scalar. The position of any legend added to a plot. Only relevant when both the arguments u and k in the call to choose_uk have length greater than one.


Additional arguments passed to matplot.


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 K in x$k. 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 K corresponding to values of the IMTS that fall below the line.

If y = "theta" then estimates of θ are plotted on the vertical axis. If both x$u and x$k$ have length greater than one then only these estimates are plotted. If either x$u or x$k have length one then approximate 100level% confidence intervals are added to the plot and the variable, x$u or x$k that has length greater than one is plotted on the horizontal axis.


Nothing is returned.


See the examples in choose_uk.

See Also


exdex documentation built on Aug. 6, 2019, 5:05 p.m.