Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- install.packages("copula")
- library(copula)
- # parameters
- theta <- 2 #parameter for gumbel-copula
- #copula-object
- cgumbel <- gumbelCopula(param = theta, dim = 2,
- use.indepC = c("message", "TRUE", "FALSE"))
- pquantile <- .5 # quantile I want to condition on (u = x^*)
- n <- 1e3
- valpha <- array(pquantile,n) #vector of identical quantile
- v <- seq(.01,.99,length.out=n) #arguemtns for conditional copula distribution
- vcCopula1 <- cCopula(cbind(valpha,v),cop=cgumbel) #conditional copula function
- plot(v,vcCopula1,xlab="v",ylab="c_u(v)", main="conditional copula")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement