generate_clayton_copula: Generate data from the Clayton copula.

Description Usage Arguments Value Examples

Description

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

Usage

1

Arguments

n

Sample size.

phi

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

Value

A dataframe containing n observations of Y1, Y2.

Examples

1
2
3
4
5
6
7
8
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")

CJAMP documentation built on May 1, 2019, 9:15 p.m.