# NOT RUN {
require("MASS")
require("mvtnorm")
set.seed(42)
n <- 50
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)
result <- geomqu2d_norm2(X, probs=c(0.8,0.9), k=8)
plot(result)
#now independent responses
rho <- 0.0
Sigma <- matrix(c(
1.0, rho,
rho, 1.0
),
ncol=2, byrow=TRUE)
X <- rmvnorm(n, mu, Sigma)
result <- geomqu2d_norm2(X, probs=c(0.8,0.9), k=8)
plot(result)
#now some non-normal data
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)
result <- geomqu2d_norm2(X, probs=c(0.8,0.9), k=8)
plot(result)
# }
Run the code above in your browser using DataLab