plot.givitiCalibrationBelt {givitiR} | R Documentation |
Calibration Belt Plot
Description
The plot
method for calibration belt objects.
Usage
## S3 method for class 'givitiCalibrationBelt'
plot(x, xlim = c(0, 1), ylim = c(0, 1),
colBis = "red", xlab = "e", ylab = "o",
main = "GiViTI Calibration Belt", polynomialString = T,
pvalueString = T, nString = T, table = T, tableStrings = NULL,
unableToFitString = NULL, ...)
Arguments
x |
A |
xlim , ylim |
Numeric vectors of length 2, giving the
x and y coordinates ranges. Default values are |
colBis |
The color to be used for the bisector. The default value is red. |
xlab , ylab |
Titles for the x and y axis. Default values are "e" and "o", repectively. |
main |
The main title of the plot. The default value is "GiViTI Calibration Belt". |
polynomialString |
If the value is FALSE, the degree of the polynomial is not printed on the graphical area. If the value is TRUE, the degree m is reported. If a string is passed to this argument, the string is reported instead of the text "Polynomial degree". The default value is TRUE. |
pvalueString |
If the value is FALSE, the p-value of the test is not printed on the graphical area. If the value is TRUE, the p-value is reported. If a string is passed to this argument, the string is reported instead of the text "p-value". The default value is TRUE. |
nString |
If the value is FALSE, the sample size is not printed on the graphical area. If the value is TRUE, the sample size is reported. If a string is passed to this argument, the string is reported instead of the text "n". The default value is TRUE. |
table |
A boolean value indicating whether the table reporting the intersections of the calibration belt with the bisector should be printed on the plot. |
tableStrings |
Optional. A list with four character elements named
|
unableToFitString |
Optional. If a string is passed to this argument, this string is reported in the plot area when the dataset is not compatible with the fit of the calibration belt (e.g. data separation or no positive events). By default, in such cases the text "Unable to fit the Calibration Belt" is reported. |
... |
Other graphical parameters passed to the generic |
Value
The function generates the calibration belt plot. In addition, a list containing the following components is returned:
- p.value
The p-value of the test.
- m
The degree of the polynomial at the end of the forward selection.
See Also
givitiCalibrationBelt
to compute the calibaration belt and
givitiCalibrationTest
to perform the
associated calibration test.
Examples
#Random by-construction well calibrated model
e <- runif(100)
o <- rbinom(100, size = 1, prob = e)
cb <- givitiCalibrationBelt(o, e, "external")
plot(cb)
#Random by-construction poorly calibrated model
e <- runif(100)
o <- rbinom(100, size = 1, prob = logistic(logit(e)+2))
cb <- givitiCalibrationBelt(o, e, "external")
plot(cb)