Learn R Programming

HAC (version 0.1-7)

pHAC: Cumulative distribution function

Description

This function computes the cdf for a given sample and copula model.

Usage

pHAC(X, hac, margins = NULL, na.rm = FALSE, max.min = TRUE)

Arguments

hac
an object of the class hac.
X
a data matrix. The sample has to contain at least $2$ rows (observations), since the values of the cdf cannot be computed otherwise. The column names have to be identical to the names of the variables of the hac object.
margins
scalar or vector specifying how the margins are to compute. They can be determined nonparametrically denoted by "edf" or in parametric way , e.g. "norm". See estimate.copula
na.rm
boolean. If na.rm = TRUE and a row of X contains NA, the row is removed and not used for the computation. Corresponding warnings are shown.
max.min
boolean. If max.min = TRUE and an element of X is $\geq 1$ or $\leq 0$, it is set to $1-10^{-6}$ and $10^{-6}$ respectively.

Value

  • A vector containing the values of the cdf.

References

Joe, H. 1997, Multivariate Models and Dependence Concepts, Chapman & Hall. Nelsen, R.,B. 2006, An Introduction to Copulas, Spinger, 2nd Edition.

See Also

dHAC, dAC

Examples

Run this code
# a hac obejct is defined
M = matrix(c(2, 0, 0, 0, 3, 4, 0, 0, ~X1 + X5, ~X2, ~X3, ~X4 + X6),
ncol = 4, byrow = TRUE)
g.model = hac(HAC_GUMBEL, M)

# sample from copula g.model
sample = rHAC(100, g.model)

# cdf at each vector of the sample
values = pHAC(sample, g.model)

Run the code above in your browser using DataLab