# NOT RUN {
require("MASS")
require("mvtnorm")
set.seed(42)
tauseq <- seq(0.1,0.9,by=0.1) #quantile levels
alphas <- seq(0*pi/32,16*pi/32,by=0.5*pi/32) #grid of angles
n <- 50 #sample size
#generate bivariate data
mu <- c(6, 10)
#correlated responses
rho <- 0.5
Sigma <- matrix(c(
1.0, rho,
rho, 1.0
),
ncol=2, byrow=TRUE)
X <- rmvnorm(n, mu, Sigma)
bivqu <- bivquant(X,alpha=alphas,tau=tauseq)
plot(bivqu, pch=20,col="grey")
#bigger n
set.seed(123)
n <- 100
X <- dgp_cop(n, family="clayton", margins=c("norm", "norm"),
paramMargins=list(list(mean = 4, sd = 1), list(mean = 4, sd = 5)),
rho=1.75)
bivqu <- bivquant(X,alpha=alphas,tau=tauseq)
plot(bivqu, pch=20,col="grey")
# }
Run the code above in your browser using DataLab