Consulte o arquivo fonte:

CDVine/R/BiCopChiPlot.R

Na linha 154 é definida a função H() e na linha 170 a função W()!

att,
FH


On 24 March 2014 16:36, Marcus Nunes <marcus.nunes@gmail.com> wrote:
Natália,

tenta rodar

library(CDVine)
CDVine:::H
CDVine:::W

Att,


On Mon, Mar 24, 2014 at 4:30 PM, Natalia Martins <nsmbarreto@gmail.com> wrote:
Prezados  boa tarde,
estou estudando a função BiCopKPlot utilizada para a modelagem de cópulas. 
Nesta função tem-se:

function (u1, u2, PLOT = TRUE, ...) 
{
    if (is.null(u1) == TRUE || is.null(u2) == TRUE) 
        stop("u1 and/or u2 are not set or have length zero.")
    if (length(u1) != length(u2)) 
        stop("Lengths of 'u1' and 'u2' do not match.")
    if (length(u1) < 2) 
        stop("Number of observations has to be at least 2.")
    if (PLOT != TRUE && PLOT != FALSE) 
        stop("The parameter 'PLOT' has to be set to 'TRUE' or 'FALSE'.")
    Wi <- W(u1, u2)
    Hi <- H(u1, u2)
    Hi.sort <- sort(Hi)
    n <- length(u1)
    W.in <- rep(NA, n)
    for (i in 1:n) {
        f = function(w) {
            w * (-log(w)) * (w - w * log(w))^(i - 1) * (1 - w + 
                w * log(w))^(n - i)
        }
        W.in[i] <- n * choose(n - 1, i - 1) * (integrate(f, lower = 0, 
            upper = 1)$value)
    }
    g <- function(w) {
        w - w * log(w)
    }
    if (PLOT) {
        plot(g, xlim = c(0, 1), ylim = c(0, 1), pch = "x", xlab = expression(W[1:n]), 
            ylab = "H", ...)
        points(W.in, Hi.sort, pch = "x", cex = 0.4, ...)
        abline(a = 0, b = 1)
    }
    else {
        kendall.plot.output <- list(W.in, Hi.sort)
        names(kendall.plot.output) <- c("W.in", "Hi.sort")
        return(kendall.plot.output)
    }
}

Porem, não encontrei no pdf da library(CDVine) como é definida a função H e W (em destaque).
Por favor se alguem souber e puder me ajudar.

Muito obrigada!

--

Natália Martins
Contato: (35) 91812482 

_______________________________________________
R-br mailing list
R-br@listas.c3sl.ufpr.br
https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br
Leia o guia de postagem (http://www.leg.ufpr.br/r-br-guia) e forneça código mínimo reproduzível.



--

_______________________________________________
R-br mailing list
R-br@listas.c3sl.ufpr.br
https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br
Leia o guia de postagem (http://www.leg.ufpr.br/r-br-guia) e forneça código mínimo reproduzível.