[R-SIG-Finance] extract parameters from fitCopula outputs !!

spencerg spencer.graves at prodsyse.com
Mon May 18 00:41:05 CEST 2009


      I have not used copulas, so I can't comment on whether what you've 
done is "correct". 


      In general, "all models are wrong, but some are useful." 
(http://en.wikiquote.org/wiki/George_Box)  It seems to me that most real 
data contain unmodeled components of variance, which generate the image 
of a lack of fit to one of the more traditional distributions like 
normal, binomial or Poisson.  This may be my own blindness, but I have 
yet to find a problem where I felt motivated to try copulas in place of 
more traditional methods provided, e.g., by qqnorm, nlme, lme4, dlm, 
sspir, and fda. 


      Hope this helps. 
      Spencer Graves


tawfiq just wrote:
> 2009/5/17 tawfiq just <just.tawfiq at gmail.com>
>
>   
>> 2009/5/17 spencerg <spencer.graves at prodsyse.com>
>>
>>     Your example is incomplete, because I do not have your "u".
>>     
>>>     However, the examples in the "fitCopula" help page should suffice to
>>> answer your question:  Consider in particular the multivariate example:
>>>   normal.cop <- normalCopula(c(0.6,0.36, 0.6),dim=3,dispstr="un")
>>>    x <- rcopula(normal.cop, n)     ## true observations
>>>    u <- apply(x, 2, rank) / (n + 1)  ## pseudo-observations
>>>    ## inverting Kendall's tau
>>>    fit.tau <- fitCopula(normal.cop, u, method="itau")
>>>
>>>         Compare str(fit.tau) with print(fit.tau).  This suggests we can
>>> answer your question with "fit.tau at estimate".
>>>
>>>     Hope this helps.     Spencer Graves
>>>  tawfiq just wrote:
>>>
>>>       
>>>> hello
>>>>
>>>> i have the following output from fitting a normal copula (copula package)
>>>>
>>>>  normal.cop <- normalCopula(c(0,0,0,0,0,0,0,0,0,0),dim=5,dispstr="un")
>>>> fit.tau <- fitCopula(normal.cop, u, method="itau")
>>>>
>>>> The estimation method is  Inversion of Kendall's Tau  based on  52
>>>> observations.
>>>>        Estimate Std. Error   z value Pr(>|z|)
>>>> rho.1  0.7609442 0.08183654  9.298343        0
>>>> rho.2  0.9123854 0.04060923 22.467440        0
>>>> rho.3  0.8854560 0.04804054 18.431432        0
>>>> rho.4  0.8730453 0.05525219 15.801100        0
>>>> rho.5  0.8296553 0.05762548 14.397370        0
>>>> rho.6  0.8022804 0.06063024 13.232347        0
>>>> rho.7  0.8120697 0.06072519 13.372865        0
>>>> rho.8  0.9470253 0.02154186 43.962098        0
>>>> rho.9  0.9333255 0.02565925 36.373847        0
>>>> rho.10 0.9591890 0.01818588 52.743616        0
>>>>
>>>> the question is how to extract the first column from the output, as a
>>>> vector
>>>> (0.7609442, 0.9123854, .....,0.9591890)
>>>>
>>>> thank you very much
>>>>
>>>>        [[alternative HTML version deleted]]
>>>>
>>>> _______________________________________________
>>>> R-SIG-Finance at stat.math.ethz.ch mailing list
>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>>>> -- Subscriber-posting only.
>>>> -- If you want to post, subscribe first.
>>>>
>>>>
>>>>
>>>>         
>>> thak you spencer for answer, that's what i was looking for
>>>       
>> to be more clair, what i wanted to do is to simulate a multivariate normal
>> copula using suppose i have a matrix of returns 50 * 4 dimension
>> x <- matrix(rnorm(200),50,4)
>> u <- apply(x, 2, rank) / (n + 1)  ## empirical distribution of x
>>   ## inverting Kendall's tau
>> normal.cop1 <- normalCopula(c(0,0,0,0,0,0),dim=4,dispstr="un")
>>
>> fit.tau <- fitCopula(normal.cop1, G, method="itau")  # fit data to copula
>> to evaluate rho
>>
>> normal.cop <- normalCopula(  fit.tau at estimate,dim=4,dispstr="un")
>>
>> u <- rcopula(normal.cop, 10)     # simulate normal copula that have same
>> caracteristics than data
>>
>>
>> is it correct what i have done?
>>
>> thank you again
>>
>>     
>
> Error in the instruction
> fit.tau <- fitCopula(normal.cop1, G, method="itau")  # fit data to copula to
> evaluate rho
>
> u insteade of G
>
> fit.tau <- fitCopula(normal.cop1, u, method="itau")  # fit data to copula to
> evaluate rho
>
> sorry
>
>



More information about the R-SIG-Finance mailing list