Reputation:
I have a question about the R
package copula
. When using fitCopula
to fit a copula to data, more specifically a 15 dimensional t-copula to a set of 12 stock daily returns, the function only returns the rho1 and df estimates, but not the variance-covariance matrix (or correlation matrix P) estimate which I need to simulate random deviates from the distribution. How do I extract the variance-covariance matrix (or the correlation matrix) estimate?
Function output:
fitCopula() estimation based on 'maximum pseudo-likelihood'
and a sample of size 261.
Estimate Std. Error z value Pr(>|z|)
rho.1 0.50338 0.05137 9.799 <2e-16 ***
df 9.88200 NA NA NA
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
The maximized loglikelihood is 1005
Optimization converged
Number of loglikelihood evaluations:
function gradient
28 10
So the rho and df estimates are here, but where is the correlation (or variance-covariance) matrix estimate? I've read the package vignette but unfortunately I haven't found the answer, so I'm hoping you might help me.
Upvotes: 0
Views: 1085
Reputation: 196
In your code, the tCopula is fitted with a single correlation value. If you require a more flexible structure, you need to change the tCopula passed to fitCopula. Set the parameters param=rep(0.2, 66), dim=12 and dispstr="un". With this copula, the output of fitCopula will contain 66 values defining the upper triangle of the correlation matrix.
For further details, check the help page of tCopula and ellipCopula and the explanations of the parameters therein.
Upvotes: 1