Description Usage Arguments Value Note Examples
Computes the conditional quantile function (QYgX
)
or distribution function (FYgX
) of a response
at specified quantile levels, given some observed predictors.
This is like the quantile version of the pcondrvine
function
in the copsupp
packages, except that it (1) only
takes the response to be the last entry in the vine, and (2) saves
computation time by accepting the predictors converted to an independent
set (thus bypassing the need to specify the distribution of the predictors).
1 2 3 |
tau |
Vector of quantile levels to evaluate at. Or, different vectors (of the same length) can be specified for each observation by making this a matrix (with rows corresponding to observations). |
ucond |
Matrix of uniform independent predictors. The i'th
column corresponds to the PIT score of the i'th predictor linked to the
response, conditional on previously linked predictors. See
|
cops |
Vector of copula model names, corresponding to the columns of
|
cpars |
List of parameter vectors corresponding to |
QY, FY |
Vectorized (marginal) quantile function/cdf of the response. |
y |
Vector of values to evaluate the cdf at. |
A matrix, with columns being the quantile levels, and rows
corresponding to the observations in ucond
.
If copulas are not permutation-symmetric, ensure that the copula specified has its fist argument corresponding to the predictor, and second argument the response.
1 2 3 4 5 6 7 8 9 10 11 12 | (dat <- matrix(runif(3*6), ncol = 3))
tau <- c(0.1, 0.3, 0.7, 0.9)
cops <- c("gum", "bvtcop", "frk")
cpars <- list(3.5, c(0.6, 3), 2.5)
## Get tau quantiles for the predictors in `dat`
QYgX(tau, dat, cops = cops, cpars = cpars, QY = qexp)
## Get sample for these predictors:
(v <- runif(nrow(dat)))
(y <- QYgX(matrix(v), dat, cops = cops, cpars = cpars, QY = qexp))
FYgX(y, dat, cops, cpars, FY = pexp) # Same as v.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.