Advertisement
Guest User

Untitled

a guest
Nov 21st, 2014
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. install.packages("copula")
  2. library(copula)
  3. # parameters
  4. theta <- 2 #parameter for gumbel-copula
  5. #copula-object
  6. cgumbel <- gumbelCopula(param = theta, dim = 2,
  7. use.indepC = c("message", "TRUE", "FALSE"))
  8.  
  9. pquantile <- .5 # quantile I want to condition on (u = x^*)
  10.  
  11. n <- 1e3
  12. valpha <- array(pquantile,n) #vector of identical quantile
  13. v <- seq(.01,.99,length.out=n) #arguemtns for conditional copula distribution
  14. vcCopula1 <- cCopula(cbind(valpha,v),cop=cgumbel) #conditional copula function
  15.  
  16. plot(v,vcCopula1,xlab="v",ylab="c_u(v)", main="conditional copula")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement