QuantifQuantile: QuantifQuantile for X univariate

Description Usage Arguments Details Value References See Also Examples

Description

Estimation of conditional quantiles using optimal quantization when X is univariate.

Usage

1
2
3
QuantifQuantile(X, Y, alpha = c(0.05, 0.25, 0.5, 0.75, 0.95),
  x = seq(min(X), max(X), length = 100), testN = c(35, 40, 45, 50, 55),
  p = 2, B = 50, tildeB = 20, same_N = TRUE, ncores = 1)

Arguments

X

vector of covariates.

Y

vector of response variables.

alpha

vector of order of the quantiles.

x

vector of values for x in q_alpha(x).

testN

grid of values of N that will be tested.

p

L_p norm optimal quantization.

B

number of bootstrap replications for the bootstrap estimator.

tildeB

number of bootstrap replications for the choice of N.

same_N

whether to use the same value of N for each alpha (TRUE by default).

ncores

number of cores to use. Default is set to 1 (see Details below).

Details

Value

An object of class QuantifQuantile which is a list with the following components:

hatq_opt

A matrix containing the estimated conditional quantiles. The number of columns is the number of considered values for x and the number of rows the size of the order vector alpha. This object can also be returned using the usual fitted.values function.

N_opt

Optimal selected value for N. An integer if same_N=TRUE and a vector of integers of length length(alpha) otherwise.

hatISE_N

The matrix of estimated ISE provided by our selection criterion for N. The number of columns is then length(testN) and the number of rows length(alpha).

hatq_N

A 3-dimensional array containing the estimated conditional quantiles for each considered value for alpha, x and N.

X

The vector of covariates.

Y

The vector of response variables.

x

The considered vector of values for x in q_alpha(x).

alpha

The considered vector of order for the quantiles.

testN

The considered grid of values for N that were tested.

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.d2 and QuantifQuantile.d for multivariate versions.

plot.QuantifQuantile, print.QuantifQuantile, summary.QuantifQuantile

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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))
## Not run: 
res2 <- QuantifQuantile(X,Y,testN=seq(10,30,by=5),same_N=FALSE)

data(gironde)
X <- gironde[[1]]$middleemp
Y <- gironde[[2]]$density
set.seed(642536)
res <- QuantifQuantile(X,Y,testN=seq(5,25,by=5))

## End(Not run)

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