Modelling Dependence with Copulas in R

I was trying to reformulate an example at (Modelling Dependence with Copulas in R | DataScience+) but however i end up with an error while running the below code;
t.cop <- tCopula(dim=2)
set.seed(500)
m <- pobs(as.matrix(cbind(Data_A,Data_B)))
fit <- fitCopula(t.cop,m,method='ml')
coef(fit)

the error is as follows

t.cop <- tCopula(dim=2)
Error in tCopula(dim = 2) : could not find function "tCopula"
set.seed(500)
m <- pobs(as.matrix(cbind(Data_A,Data_B)))
fit <- fitCopula(t.cop,m,method='ml')
Error in fitCopula(t.cop, m, method = "ml") :
could not find function "fitCopula"
coef(fit)
Error in coef(fit) : object 'fit' not found

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.