Created
March 27, 2016 21:35
-
-
Save mick001/31fbee9dc1c077f12a18 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
var_a <- pobs(mydata)[,1] | |
var_b <- pobs(mydata)[,2] | |
selectedCopula <- BiCopSelect(var_a, var_b, familyset = NA) | |
selectedCopula | |
## $p.value.indeptest | |
## [1] NA | |
## | |
## $family | |
## [1] 3 | |
## | |
## $par | |
## [1] 1.482169 | |
## | |
## $par2 | |
## [1] 0 | |
## | |
## attr(,"class") | |
## [1] "BiCop" | |
# Family = 1 -> Gaussian copula | |
# = 2 -> Student t copula (t-copula) | |
# = 3 -> Clayton | |
# ... | |
selectedCopula$family | |
## [1] 3 | |
# par -> parameter of the copula | |
selectedCopula$par | |
## [1] 1.482169 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment