dcopula: Density of the Gaussian Copula

View source: R/dcopula.R

dcopulaR Documentation

Density of the Gaussian Copula

Description

Density function for the Gaussian copula.

Usage

dcopula(u, R, log = FALSE)

Arguments

u

Numeric vector or matrix of uniformly-distributed margins on the interval [0, 1]. If matrix, then a vector of probability densities is returned with an element for each record of the matrix. Matrix records represent observations, and matrix fields represent dimensions.

R

Numeric correlation matrix. If u is a matrix, then R is recycled for each record of matrix u.

log

Logical scalar. If TRUE, then probabilities are given as log(density).

Details

Computes the probability density of the Gaussian copula. Given uniformly-distributed margins u on the interval [0, 1], applies the inverse cumulative distribution function of the standard normal (i.e., stats::qnorm) to map uniform margins to normal scores. Then, uses equation 1 of Song (2000) with the normal scores to calculate the probability density of the Gaussian copula.

Value

Numeric vector of probability densities.

References

Song P. 2000. Multivariate dispersion models generated from Gaussian copula. Scandinavian Journal of Statistics, 27(2): 305-320. DOI: 10.1111/1467-9469.00191

See Also

dmvlogis for density of the multivariate logistic distribution.

Examples

# Define uniform margins.
u<-c(0.324,0.383,0.917,0.015)

# Define correlation matrix.
R<-matrix(data=c(1.000,-0.80,0.64,-0.512,
                 -0.800,1.00,-0.80,0.640,
                 0.640,-0.80,1.00,-0.800,
                 -0.512,0.64,-0.80,1.000),
           ncol=4,byrow=TRUE)

# Compute log probability density.
dcopula(u=u,R=R,log=TRUE)

LocaTT documentation built on June 14, 2026, 1:06 a.m.