Created
March 27, 2016 21:36
-
-
Save mick001/92f18c40b0660ed16773 to your computer and use it in GitHub Desktop.
How to fit a copula model in R [heavily revised]. Part 2: fitting the copula. Full article at
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Estimate copula parameters | |
cop_model <- claytonCopula(dim = 2) | |
m <- pobs(as.matrix(mydata)) | |
fit <- fitCopula(cop_model, m, method = 'ml') | |
coef(fit) | |
## param | |
## 1.482168 | |
# Check Kendall's tau value for the Clayton copula with theta = 1.48 | |
tau(claytonCopula(param = 1.48)) | |
## [1] 0.4252874 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment