Skip to content

Instantly share code, notes, and snippets.

@mick001
Last active March 13, 2016 22:19
Show Gist options
  • Save mick001/69cc610b7cb0932802c9 to your computer and use it in GitHub Desktop.
Save mick001/69cc610b7cb0932802c9 to your computer and use it in GitHub Desktop.
How to fit a copula model in R [heavily revised]. Part 1: basic tools. Full article at http://firsttimeprogrammer.blogspot.com/2016/03/how-to-fit-copula-model-in-r-heavily.html
# Generate a bivariate normal copula with rho = 0.7
normal <- normalCopula(param = 0.7, dim = 2)
# Generate a bivariate t-copula with rho = 0.8 and df = 2
stc <- tCopula(param = 0.8, dim = 2, df = 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment