R/plackettExpr.R

## This file is not to be edited. It is generated by ../inst/docs/mathnb/exprPrep.R
`plackettCopula.cdf.expr` <-
expression(0, 0.5/(alpha - 1) * (1 + (alpha - 1) * (u1 + u2) - 
    ((1 + (alpha - 1) * (u1 + u2))^2 - 4 * alpha * (alpha - 1) * 
        u1 * u2)^0.5))
`plackettCopula.cdf.algr` <-
expression({
    .value <- 0
    .grad <- array(0, c(length(.value), 1L), list(NULL, c("s")))
    .grad[, "s"] <- 0
    attr(.value, "gradient") <- .grad
    .value
}, {
    .expr1 <- alpha - 1
    .expr5 <- 1 + .expr1 * (u1 + u2)
    .value <- 0.5/.expr1 * (.expr5 - (.expr5^2 - 4 * alpha * 
        .expr1 * u1 * u2)^0.5)
    .grad <- array(0, c(length(.value), 1L), list(NULL, c("s")))
    .grad[, "s"] <- 0
    attr(.value, "gradient") <- .grad
    .value
})
`plackettCopula.cdfDerWrtArg.expr` <-
expression(0, 0.5/(alpha - 1) * ((alpha - 1) - 0.5 * ((2 * ((alpha - 
    1) * (1 + (alpha - 1) * (u1 + u2))) - 4 * alpha * (alpha - 
    1) * u2) * ((1 + (alpha - 1) * (u1 + u2))^2 - 4 * alpha * 
    (alpha - 1) * u1 * u2)^-0.5)))
`plackettCopula.cdfDerWrtArg.algr` <-
expression({
    .value <- 0
    .grad <- array(0, c(length(.value), 1L), list(NULL, c("s")))
    .grad[, "s"] <- 0
    attr(.value, "gradient") <- .grad
    .value
}, {
    .expr1 <- alpha - 1
    .expr5 <- 1 + .expr1 * (u1 + u2)
    .expr9 <- 4 * alpha * .expr1
    .value <- 0.5/.expr1 * (.expr1 - 0.5 * ((2 * (.expr1 * .expr5) - 
        .expr9 * u2) * (.expr5^2 - .expr9 * u1 * u2)^-0.5))
    .grad <- array(0, c(length(.value), 1L), list(NULL, c("s")))
    .grad[, "s"] <- 0
    attr(.value, "gradient") <- .grad
    .value
})
`plackettCopula.cdfDerWrtPar.expr` <-
expression(0, 0.5/(alpha - 1) * ((u1 + u2) - 0.5 * ((2 * ((u1 + 
    u2) * (1 + (alpha - 1) * (u1 + u2))) - (4 * (alpha - 1) + 
    4 * alpha) * u1 * u2) * ((1 + (alpha - 1) * (u1 + u2))^2 - 
    4 * alpha * (alpha - 1) * u1 * u2)^-0.5)) - 0.5/(alpha - 
    1)^2 * (1 + (alpha - 1) * (u1 + u2) - ((1 + (alpha - 1) * 
    (u1 + u2))^2 - 4 * alpha * (alpha - 1) * u1 * u2)^0.5))
`plackettCopula.cdfDerWrtPar.algr` <-
expression({
    .value <- 0
    .grad <- array(0, c(length(.value), 1L), list(NULL, c("s")))
    .grad[, "s"] <- 0
    attr(.value, "gradient") <- .grad
    .value
}, {
    .expr1 <- alpha - 1
    .expr3 <- u1 + u2
    .expr5 <- 1 + .expr1 * .expr3
    .expr9 <- 4 * alpha
    .expr18 <- .expr5^2 - .expr9 * .expr1 * u1 * u2
    .value <- 0.5/.expr1 * (.expr3 - 0.5 * ((2 * (.expr3 * .expr5) - 
        (4 * .expr1 + .expr9) * u1 * u2) * .expr18^-0.5)) - 0.5/.expr1^2 * 
        (.expr5 - .expr18^0.5)
    .grad <- array(0, c(length(.value), 1L), list(NULL, c("s")))
    .grad[, "s"] <- 0
    attr(.value, "gradient") <- .grad
    .value
})
`plackettCopula.pdf.expr` <-
expression(0, ((1 + (alpha - 1) * (u1 + u2))^2 - 4 * alpha * 
    (alpha - 1) * u1 * u2)^(-3/2) * alpha * (1 + (alpha - 1) * 
    (u1 + u2 - 2 * u1 * u2)))
`plackettCopula.pdf.algr` <-
expression({
    .value <- 0
    .grad <- array(0, c(length(.value), 1L), list(NULL, c("s")))
    .grad[, "s"] <- 0
    attr(.value, "gradient") <- .grad
    .value
}, {
    .expr1 <- alpha - 1
    .expr2 <- u1 + u2
    .value <- ((1 + .expr1 * .expr2)^2 - 4 * alpha * .expr1 * 
        u1 * u2)^(-3/2) * alpha * (1 + .expr1 * (.expr2 - 2 * 
        u1 * u2))
    .grad <- array(0, c(length(.value), 1L), list(NULL, c("s")))
    .grad[, "s"] <- 0
    attr(.value, "gradient") <- .grad
    .value
})
`plackettCopula.pdfDerWrtArg.expr` <-
expression(0, ((1 + (alpha - 1) * (u1 + u2))^2 - 4 * alpha * 
    (alpha - 1) * u1 * u2)^((-3/2) - 1) * ((-3/2) * (2 * ((alpha - 
    1) * (1 + (alpha - 1) * (u1 + u2))) - 4 * alpha * (alpha - 
    1) * u2)) * alpha * (1 + (alpha - 1) * (u1 + u2 - 2 * u1 * 
    u2)) + ((1 + (alpha - 1) * (u1 + u2))^2 - 4 * alpha * (alpha - 
    1) * u1 * u2)^(-3/2) * alpha * ((alpha - 1) * (1 - 2 * u2)))
`plackettCopula.pdfDerWrtArg.algr` <-
expression({
    .value <- 0
    .grad <- array(0, c(length(.value), 1L), list(NULL, c("s")))
    .grad[, "s"] <- 0
    attr(.value, "gradient") <- .grad
    .value
}, {
    .expr1 <- alpha - 1
    .expr2 <- u1 + u2
    .expr4 <- 1 + .expr1 * .expr2
    .expr7 <- 4 * alpha * .expr1
    .expr10 <- .expr4^2 - .expr7 * u1 * u2
    .expr12 <- -3/2
    .value <- .expr10^(.expr12 - 1) * (.expr12 * (2 * (.expr1 * 
        .expr4) - .expr7 * u2)) * alpha * (1 + .expr1 * (.expr2 - 
        2 * u1 * u2)) + .expr10^.expr12 * alpha * (.expr1 * (1 - 
        2 * u2))
    .grad <- array(0, c(length(.value), 1L), list(NULL, c("s")))
    .grad[, "s"] <- 0
    attr(.value, "gradient") <- .grad
    .value
})
`plackettCopula.pdfDerWrtPar.expr` <-
expression(0, (((1 + (alpha - 1) * (u1 + u2))^2 - 4 * alpha * 
    (alpha - 1) * u1 * u2)^((-3/2) - 1) * ((-3/2) * (2 * ((u1 + 
    u2) * (1 + (alpha - 1) * (u1 + u2))) - (4 * (alpha - 1) + 
    4 * alpha) * u1 * u2)) * alpha + ((1 + (alpha - 1) * (u1 + 
    u2))^2 - 4 * alpha * (alpha - 1) * u1 * u2)^(-3/2)) * (1 + 
    (alpha - 1) * (u1 + u2 - 2 * u1 * u2)) + ((1 + (alpha - 1) * 
    (u1 + u2))^2 - 4 * alpha * (alpha - 1) * u1 * u2)^(-3/2) * 
    alpha * (u1 + u2 - 2 * u1 * u2))
`plackettCopula.pdfDerWrtPar.algr` <-
expression({
    .value <- 0
    .grad <- array(0, c(length(.value), 1L), list(NULL, c("s")))
    .grad[, "s"] <- 0
    attr(.value, "gradient") <- .grad
    .value
}, {
    .expr1 <- alpha - 1
    .expr2 <- u1 + u2
    .expr4 <- 1 + .expr1 * .expr2
    .expr6 <- 4 * alpha
    .expr10 <- .expr4^2 - .expr6 * .expr1 * u1 * u2
    .expr12 <- -3/2
    .expr25 <- .expr10^.expr12
    .expr29 <- .expr2 - 2 * u1 * u2
    .value <- (.expr10^(.expr12 - 1) * (.expr12 * (2 * (.expr2 * 
        .expr4) - (4 * .expr1 + .expr6) * u1 * u2)) * alpha + 
        .expr25) * (1 + .expr1 * .expr29) + .expr25 * alpha * 
        .expr29
    .grad <- array(0, c(length(.value), 1L), list(NULL, c("s")))
    .grad[, "s"] <- 0
    attr(.value, "gradient") <- .grad
    .value
})

Try the copula package in your browser

Any scripts or data that you put into this service are public.

copula documentation built on Sept. 11, 2024, 7:48 p.m.