Description Usage Arguments Details Value Author(s) References See Also Examples
For LuckModel
objects, the function plot
gives a method to display prior or posterior sets of canonical parameters graphically.
The strength parameter n^(0) resp. n^(n) is plotted on the abscissa (x) axis,
the main parameter y^(0) resp. y^(n) on the ordinate (y) axis.
Specific plotting options are given to plot
via the argument control
that is
a list of arguments that can be produced with the help of the function controlList
,
which is also described here.
1 2 3 4 5 6 |
x |
A |
y |
|
control |
The list of controls to address options for appearance of the plot.
This includes whether the prior or the posterior parameter set should be drawn.
Default is the value of |
add |
Whether the plot should be added to an existing plot or not.
Default is |
... |
Graphic parameters such as |
plotdim |
Which dimension of the main parameter y^(0) should be displayed in the ordinate (y axis).
With the default value |
posterior |
Whether the prior or the posterior parameter set should be drawn.
For the default |
annotate |
Whether annotations for the parameter set in the plot margins should be displayed.
For |
rDigits |
The number of digits to be displayed in the margin annotations (see |
numbers |
Whether the extremes of y^(0) resp. y^(n)
should be printed in the plot next to the four corners of the parameter set.
Default is |
rectangle |
Whether the rectangle containing the (non-rectangle) posterior parameter set should be drawn.
This can serve to illustrate that considering y^(n) as an interval-valued parameter,
without bearing in mind that the range of y^(n) changes with y^(n),
amounts to a loss of information, and may result in incorrect posterior inferences
(too wide bounds). This is the reason why posterior sets are not
explicitely represented as |
polygonCol |
The colour to fill the parameter set with. Default is |
borderCol |
The colour of the lines delineating the paramer set. Default is |
rectCol |
The colour of the lines delineating the rectangle circumscribing the parameter set (see |
rectLty |
The type of the lines delineating the rectangle circumscribing the paramer set (see |
numCol |
The colour to print the annotation numbers in the plot (see |
density |
As an alternative to filling the parameter set (see |
angle |
The slope of the shading lines, given as an angle in degrees, counter-cockwise.
If |
plotSeqLength |
The number of points for plotting the posterior parameter set contours.
The higher the number, the more accurate the display of the set contours.
The default value of |
The argument control
can be created via the function controlList
,
its usage and arguments which control the appearance of the plot are described above.
It may be called with only one or a few named arguments,
such that the default values are assigned to the rest.
If the LuckModel
object specifies
both y^(0) and n^(0) interval-valued,
then the prior parameter set is a simple rectangle.
If both y^(0) and n^(0) are single numbers,
the prior parameter set is drawn as a dot of the default line width.
The line width can be modified via the argument lwd
to plot()
(see par
).
If n^(0) is interval-valued,
posterior parameter sets have usually less trivial shapes.
For multidimensional main parameters, plotdim=NA
(the default)
will plot y against n for each dimension of y in the same plot,
such that the lower-dimension sets may be overplotted.
The plotting region, if not defined via ylim
, is determined by the first dimension.
Usually, it might be more useful to draw a separate plot for each dimension,
using plotdim=1
, plotdim=2
, etc.
The function is used for its side effects (the plot).
Gero Walter
Gero Walter and Thomas Augustin (2009), Imprecision and Prior-data Conflict in Generalized Bayesian Inference, Journal of Statistical Theory and Practice 3:255-271.
luck
for a general description of the package,
LuckModel
for the class this plot method is for, and
LuckModelData
for the class for its data
slot.
par
for how to specify colors, line types and other graphical parameters.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | luck1 <- LuckModel(n0=c(2,10), y0=c(3, 4), data=LuckModelData(tau=sum(rnorm(5)), n=5))
# prior parameter set
plot(luck1)
# posterior parameter set with annotations
plot(luck1, control = controlList(posterior = TRUE, annotate = TRUE))
# low-resolution posterior parameter set with numbers
plot(luck1, control = controlList(posterior = TRUE, plotSeqLength = 10, numbers = TRUE))
luck2 <- LuckModel(n0 = c(1,10), y0 = c(-5, 10, 5, 15))
# two-dimensional main parameter, in one plot, using shading lines instead of colour filling
plot(luck2, ylim=c(-6,16), control=controlList(borderCol=c(1,2), #
polygonCol=c("blue", "grey"), density=c(10,NA), angle=c(25,95)))
# posterior parameter set with rectangle and numbers, other graphical parameters
plot(luck1, control = controlList(posterior = TRUE, rectangle = TRUE, rectCol = 2, #
rectLty = "2244", numbers = TRUE, numCol = 4), #
xlim = c(0,15), ylim = c(0,10), cex.main = 0.8, cex = 0.5)
# adding the prior parameter set
plot(luck1, add = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.