Compute NSGEV quantiles.

# S3 method for NSGEV
quantile(x, probs = c(0.9, 0.95, 0.99), data = NULL, psi = NULL, ...)

Arguments

x

A NSGEV object.

probs

Vector of probabilities.

data

A data frame with the covariates. If NULL, the data frame affached to the model given in object is used.

psi

Vecor of model coefficients.

...

Not used yet.

Value

A matrix of quantiles, with one row for each observation of data and one column by probability.

Author

Yves Deville

Examples

df <- data.frame(t = 1:10)
## model structure
ns <- NSGEV(formulas = list("loc" = ~ alpha + beta * t,
                            "scale" = ~ delta,
                            "shape" = ~ xi),
             data = df)
psi <- c("alpha" = 1, "beta" = 0.1, "delta" = 0.6, "xi" = 0.06)
q <- quantile(ns, psi = psi) 
matplot(x = df$t, y = q, type = "l", lty = 1:3, lwd = 2,
        main = "model quantiles")
legend("bottomright", legend = colnames(q), lty = 1:3, col = 1:3,
        lwd = 2)