[R] Error while fitting gumbel copula

Martin Maechler maechler at stat.math.ethz.ch
Wed Aug 10 18:08:03 CEST 2016


>>>>> Isaudin Ismail <isaudin at gmail.com>
>>>>>     on Tue, 9 Aug 2016 14:30:18 +0100 writes:

    > Dear R experts,
    > I have 5 time series of data (A, B, C, D and E) with all same lengths. All
    > series exhibit gamma distribution except for B which is lognormal
    > distribution. I am using copula package to model the joint-distribution of
    > these 5 times series.

    > I have selected Archimedean copula and successfully fitted  Frank and
    > Clayton copula. The problem is when trying to fit Gumbel copula.

    > The following are the codes I used to run in R.

    > # Data of 5 time series

    > A <- A
    > B <- B
    > C <- C
    > D <- D
    > E <- E

well, the above is really an "interesting" block of R code ;-)

--

More seriously, please learn to use reproducible examples,
e.g., from here
  http://bit.ly/MRE_R (nice to remember: MRE = Minimal Reproducible Example)
or here
  http://adv-r.had.co.nz/Reproducibility.html

then we will be glad to help you,
notably I as maintainer of the package 'copula' which you are
using (without saying so).

With regards,
Martin Maechler


    > # Combined between A and C
    > A+C <- A + C

    > gumbel.copula <- gumbelCopula(dim = 5)
    > m <- pobs(as.matrix(cbind(A+C, B, D, E)))
    > fit.gumbel<- fitCopula(gumbel.copula, m, method = 'ml')

    > And the error while trying to fit gumbel copula:

    > Error in optim(start, loglikCopula, lower = lower, upper = upper, method =
    > method,  :
    > non-finite finite-difference value [1]
    > In addition: Warning message:
    > In .local(copula, tau, ...) : tau is out of the range [0, 1]

    > Appreciate all help!

    > Many thanks,
    > Isaudin

    > [[alternative HTML version deleted]]

    > ______________________________________________
    > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
    > https://stat.ethz.ch/mailman/listinfo/r-help
    > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
    > and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list