Bivariate T Copula
Purpose
Input various Marginals and view Bivariate T Copula .Load the libraries
> library(scatterplot3d) > library(copula) |
Create a t Copula with t Marginals with rho as 0.2 and 0.9
> par(mfrow = c(2, 2)) > t.cop <- ellipCopula(family = "t", dim = 2, dispstr = "ex", param = 0.2, + df = 3) > t.mvdc <- mvdc(copula = t.cop, margins = c("norm", "norm"), paramMargins = list(list(mean = 0, + sd = 1), list(mean = 0, sd = 1))) > contour(t.mvdc, dmvdc, xlim = c(-3, 3), ylim = c(-3, 3), main = paste("Marginal gaussian (rho) = ", + 0.2)) > t.cop <- ellipCopula(family = "t", dim = 2, dispstr = "ex", param = 0.9, + df = 3) > t.mvdc <- mvdc(copula = t.cop, margins = c("norm", "norm"), paramMargins = list(list(mean = 0, + sd = 1), list(mean = 0, sd = 1))) > contour(t.mvdc, dmvdc, xlim = c(-3, 3), ylim = c(-3, 3), main = paste("Marginal gaussian (rho) = ", + 0.9)) > t.cop <- ellipCopula(family = "t", dim = 2, dispstr = "ex", param = 0.2, + df = 3) > t.mvdc <- mvdc(copula = t.cop, margins = c("t", "t"), paramMargins = list(list(df = 3), + list(df = 3))) > contour(t.mvdc, dmvdc, xlim = c(-3, 3), ylim = c(-3, 3), main = paste("Marginal t (rho) = ", + 0.2)) > t.cop <- ellipCopula(family = "t", dim = 2, dispstr = "ex", param = 0.9, + df = 3) > t.mvdc <- mvdc(copula = t.cop, margins = c("t", "t"), paramMargins = list(list(df = 3), + list(df = 3))) > contour(t.mvdc, dmvdc, xlim = c(-3, 3), ylim = c(-3, 3), main = paste("Marginal t (rho) = ", + 0.9)) |