generate_clayton_copula {CJAMP}R Documentation

Generate data from the Clayton copula.

Description

Function to generate two quantitative phenotypes Y_1, Y_2, from the bivariate Clayton copula with standard normal marginal distributions.

Usage

generate_clayton_copula(n = NULL, phi = NULL)

Arguments

n

Sample size.

phi

Integer specifying the value of the copula parameter \phi for the dependence between the two generated phenotypes.

Value

A dataframe containing n observations of Y_1, Y_2.

Examples


set.seed(10)
dat1a <- generate_clayton_copula(n = 1000, phi = 0.5)
dat1b <- generate_clayton_copula(n = 1000, phi = 2)
dat1c <- generate_clayton_copula(n = 1000, phi = 8)
par(mfrow = c(3, 1))
plot(dat1a$Y1, dat1a$Y2, main="Clayton copula, tau = 0.2")
plot(dat1b$Y1, dat1b$Y2, main="Clayton copula, tau = 0.5")
plot(dat1c$Y1, dat1c$Y2, main="Clayton copula, tau = 0.8")


[Package CJAMP version 0.1.1 Index]