Created
August 29, 2015 11:46
-
-
Save mick001/59d952691eff6e917206 to your computer and use it in GitHub Desktop.
How to fit a copula model in R (part 3). Full article at http://www.firsttimeprogrammer.blogspot.com/2015/02/how-to-fit-copula-model-in-r.html
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
# Pseudo observations | |
p_obs <- pobs(mat) | |
plot(p_obs[,1],p_obs[,2],main="Pseudo/simulated observations: BLUE/RED",xlab="u",ylab="v",col="blue") | |
# Simulate data | |
set.seed(100) | |
u1 = rCopula(500,normalCopula(coef(fit.cop),dim=2)) | |
points(u1[,1],u1[,2],col="red") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment