plot.QuantifQuantile: Plot of estimated conditional quantiles using optimal...

Description Usage Arguments Details References See Also Examples

Description

This function plots the estimated conditional quantiles by default. It can also illustrate our data driven selection criterion for N by providing the plot of the bootstrap estimated values of integrated squared error ISE(N) versus N.

Usage

1
2
3
## S3 method for class 'QuantifQuantile'
plot(x, col.plot = c(1:(length(x$alpha) + 1)),
  ise = FALSE, ...)

Arguments

x

An object of class QuantifQuantile, which is the result of QuantifQuantile or QuantifQuantile.d2.

col.plot

Vector of size length(x$alpha)+1. The first entry corresponds to the color of the data points while the other colors are for the conditional quantiles curves, points or surfaces.

ise

Whether it plots the ISE curves in addition to the estimated quantile curves (if ise=TRUE, two different plots).

...

Arguments to be passed to par.

Details

If X is univariate, the graph is two-dimensional and if X is bivariate, it provides a 3D-graph using the rgl package. When only one value for x is considered, estimated conditional quantiles are plotted as points. When x is a grid of values, they are plotted as curves if d=1 and surfaces if d=2.

When ise=TRUE, the first plot allows to adapt the choice of the grid for N, called testN. For example, if the curve is decreasing with N, it indicates that the values in testN are too small and the optimal N is larger.

References

Charlier, I. and Paindaveine, D. and Saracco, J., Conditional quantile estimation through optimal quantization, Journal of Statistical Planning and Inference, 2015 (156), 14-30.

Charlier, I. and Paindaveine, D. and Saracco, J., Conditional quantile estimator based on optimal quantization: from theory to practice, Submitted.

See Also

QuantifQuantile, QuantifQuantile.d2 and QuantifQuantile.d

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#for a univariate X
set.seed(644972)
n <- 300
X <- runif(300,-2,2)
Y <- X^2+rnorm(n)
res <- QuantifQuantile(X,Y,testN=seq(10,25,by=5))
plot(res,ise=TRUE)

## Not run: 
set.seed(92536)
n <- 300
X <- runif(300,-2,2)
Y <- X^2+rnorm(n)
res <- QuantifQuantile(X,Y,testN=seq(10,25,by=5),x=1)
plot(res,ise=TRUE)


#for a bivariate X
#(a few seconds to execute)
set.seed(253664)
d <- 2
n <- 1000
X<-matrix(runif(d*n,-2,2),nr=d)
Y<-apply(X^2,2,sum)+rnorm(n)
res <- QuantifQuantile.d2(X,Y,testN=seq(80,130,by=10),B=20,tildeB=15)
plot(res,ise=TRUE)

set.seed(193854)
d <- 2
n <- 1000
X<-matrix(runif(d*n,-2,2),nr=d)
Y<-apply(X^2,2,sum)+rnorm(n)
res <- QuantifQuantile.d2(X,Y,testN=seq(110,140,by=10),x=as.matrix(c(1,0)),
B=30,tildeB=20)
plot(res,ise=TRUE)

## End(Not run)

QuantifQuantile documentation built on May 2, 2019, 2:10 a.m.