[R-br] função BiCopKPlot

Natalia Martins nsmbarreto em gmail.com
Segunda Março 24 16:30:07 BRT 2014


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
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://listas.inf.ufpr.br/pipermail/r-br/attachments/20140324/3bda9494/attachment.html>


Mais detalhes sobre a lista de discussão R-br