dcop {dsfa} | R Documentation |
Probablitiy density function, distribution and random number generation for copulas.
dcop(W, delta, family_cop = "normal", log.p = FALSE, deriv = 0)
pcop(W, delta = 0, family_cop = "normal", log.p = FALSE)
rcop(n, delta = 0, family_cop = "normal")
W |
matrix of pseudo observations. Must have at least two columns. |
delta |
matrix of copula parameter. Must have at least one column. |
family_cop |
string, defines the copula family: |
log.p |
logical; if |
deriv |
derivative of order |
n |
number of observations. |
For more than 2 dimensions only the gaussian copula is implemented. The functions pcop
and rcop
are wrapper functions for 'copula' package.
The functions pcop
and rcop
are wrapper functions for the pCopula()
and rCopula()
.
Although the parameter space is larger in theory for some copulas, numeric under- and overflow limit the parameter space. The intervalls for the parameter delta
are given as follows:
independent
, min=0 and max=1
normal
, min=-1 and max=1
clayton
, min=1e-16 and max=28
gumbel
, min=1 and max=17
frank
, min=-35 and max=35
joe
, min=1e-16 and max=30
dcop
gives the density, pcop
gives the distribution function for a specified copula and rcop
generates random numbers, with given delta.
If the derivatives are calculated these are provided as the attributes gradient
, hessian
of the output of the density.
pcop()
: distribution function for copula.
rcop()
: random number generation for copula.
Schepsmeier U, Stöber J (2014). “Derivatives and Fisher information of bivariate copulas.” Statistical Papers, 55(2), 525–542.
Hofert M, Kojadinovic I, Mächler M, Yan J (2018). Elements of copula modeling with R. Springer.
u=0.3; v=0.7; p=0.5
pdf <- dcop(W=matrix(c(u,v), ncol=2), delta=matrix(p,ncol=1), family_cop="normal")
cdf <- pcop(W=matrix(c(u,v), ncol=2), delta=matrix(p,ncol=1), family_cop="normal")
r <- rcop(n=100, delta=matrix(p,nrow=100), family_cop="normal")