| dcopula | R Documentation |
Density function for the Gaussian copula.
dcopula(u, R, log = FALSE)
u |
Numeric vector or matrix of uniformly-distributed margins on the interval [ |
R |
Numeric correlation matrix. If |
log |
Logical scalar. If |
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.
Numeric vector of probability densities.
Song P. 2000. Multivariate dispersion models generated from Gaussian copula. Scandinavian Journal of Statistics, 27(2): 305-320. DOI: 10.1111/1467-9469.00191
dmvlogis for density of the multivariate logistic distribution.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.