R/simu.Clayton.R

Defines functions simu.Clayton

Documented in simu.Clayton

simu.Clayton=function(n,alpha,scale1=1,scale2=1,shape1=1,shape2=1){

  V = runif(n, 0, 1)
  W = runif(n, 0, 1)
  U = (V^(-alpha)*W^(-alpha/(alpha+1))-V^(-alpha)+1)^(-1/alpha)

  X=(-log(U)/scale1)^(1/shape1)
  Y=(-log(V)/scale2)^(1/shape2)

  print(c(true_Kendall_tau=alpha/(alpha+2)))
  cbind(U,V,X,Y)
}

Try the Copula.surv package in your browser

Any scripts or data that you put into this service are public.

Copula.surv documentation built on March 18, 2022, 5:24 p.m.