-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Kendall's tau for TCopula & non-archimedeans more generally #80
Comments
Indeed it is not. There is no default implementation, the archimedean copulas have their implementation but the elliptical ones have none. Do you want to provide a default implementation ? As PS : For the gaussian and elliptical copula, there are some known formulas right ? Maybe implementing those would be better. |
Does it mean that I can't calculate Kendall's tau for an Archimedean copula either? `julia> C = ClaytonCopula(2,1.5) julia> τ(C) julia> ` |
The function exists but is not exported yet : julia> using Copulas
julia> C = ClaytonCopula(2,10)
ClaytonCopula{2, Int64}(
G: Copulas.ClaytonGenerator{Int64}(10)
)
julia> Copulas.τ(C)
0.8333333333333334
julia> τ(C)
ERROR: UndefVarError: `τ` not defined
Stacktrace:
[1] top-level scope
@ REPL[8]:1
julia> Btw you might want to upgrade to 0.1.19 since we fixed a lot of bugs recently. We could make this public API by exporting the function, but since it is not implemented for all copulas I am not sure it is a good idea yet. If we have an implementation for ALL copulas, then yes we might export it :) |
Btw in fact it already works for the gaussian : julia> C = GaussianCopula([1 0.5; 0.5 1])
GaussianCopula{2, Matrix{Float64}}(
Σ: [1.0 0.5; 0.5 1.0]
)
julia> Copulas.τ(C)
0.16834795498215338
julia> |
Now I got it, however, what copulas is it missing for? It would be good to implement it together with Sperman's Rho |
The implementation is there : Lines 24 to 35 in d7cf205
But it is not well tested for the moment. What we could do is add some tests. |
I understand, that function is general. At least for now it can be used. You could try the copula T, I think it is giving some Nan values `julia> Copa=TCopula(4,Σ) julia> Copulas.τ(Copa) |
Yes, and also spearman's rho does not work on this one too. THis is indeed something that should be fixed if we want to export these functions and make them public API. |
Understood, thank you very much for the suggestion and for answering the Issue. |
Hello, when I try to calculate the kendal tau of any copula, it appears that it is not defined
`julia> Σ = [1.0 0.8; 0.8 1.0]
2×2 Matrix{Float64}:
1.0 0.8
0.8 1.0
julia> Cop = GaussianCopula(Σ)
GaussianCopula{2, Matrix{Float64}}(
Σ: [1.0 0.8; 0.8 1.0]
)
julia> τ(Cop)
ERROR: UndefVarError:
τ
not definedStacktrace:
[1] top-level scope
@ REPL[7]:1`
The text was updated successfully, but these errors were encountered: