Description Usage Arguments Details Value Author(s) Examples
Various routines to visualize BPAs
1 2 3 4 |
x |
BPA to plot |
xrange |
Optional: xrange=c(1,5) limits the x-axis to [1,5] |
col |
Optional: col = c(3,4) defines the colors of the Bel and the Pl line. |
... |
Optional: additional parameters passed to the plot routine (except linewidth, linetype and color) |
newplot |
Optional: Create a new plot or draw lines onto an existing plot. |
sample |
set of data values, e. g. c(1.5,2,3.5) |
ds |
BPA for qq plot resembling sample |
points |
Optional, points=TRUE: plot the sample values as points + line, otherwise only a straight line. |
Plots Bel([-Inf,x]) and Pl([-Inf,x]). These functions bound all CDFs.
Plots a quantile-quantile plot between data and a BPA.
Returns Bel([-Inf,x]), e. g. for own plotting routines.
Returns Pl([-Inf,x]), e. g. for own plotting routines.
The function dscdf plots Bel([-Inf,x]) and Pl([-Inf,x]), the bounds on all CDFs. Arbitrary graphics parameters can be passed to dscdf. dsqqplot plots a quantile-quantile plot between data and a BPA. dsbel and dspl return the function Bel([-Inf,x])/ Pl([-Inf,x]) as a set of (x,y)-type points, e. g. for own plotting routines.
The example generates a BPA. It plots the BPA first without, then with additional parameters. Finally it uses the functions dsbel and dspl for plotting points into the diagram. Then it generates a BPA from a normal pbox with imprecise standard deviation. It tests with a QQ plot, if the function fits well to a random sample from N(0,1).
dscdf returns the x and y coordinates of the plotted lines for further use.
Philipp Limbourg <p.limbourg@uni-due.de>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | print("Plot new BPA")
a=dsstruct(rbind(c(1,2,0.3),c(1.5,5,0.5),c(4,6,0.2)))
dscdf(a)
dscdf(a,xrange=c(0,7),xlab="Important parameter")
print("Bel([-Inf,x])")
bel=dsbel(a)
print("Pl([-Inf,x])")
pl=dspl(a)
points(pl,lwd=5,col='red')
points(bel,lwd=5,col='pink')
print("See if a pbox from N(0,[0.5,1.5]) fits data from N(0,1)")
data=rnorm(100,0,1)
pbox=dsodf(qnorm,1000,0,dsstruct(c(0.5,1.5,1)))
print("Plot pbox")
dscdf(pbox)
print("qq plot")
dsqqplot(pbox,data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.