R/plot.cv.gcdclust.R

Defines functions plot.cv.gcdclust

Documented in plot.cv.gcdclust

plot.cv.gcdclust <-
function(x, sign.lambda = 1, ...) {
  
    cvobj <- x
    xlab <- "log(Lambda)"
    if (sign.lambda < 0) 
        xlab <- paste("-", xlab, sep = "")
    plot.args <- list(x = sign.lambda * log(cvobj$lambda), y = cvobj$cvm, 
        ylim = range(cvobj$cvupper, cvobj$cvlo), xlab = xlab, 
        ylab = cvobj$name, type = "n")
    new.args <- list(...)
    if (length(new.args)) 
        plot.args[names(new.args)] <- new.args
    do.call("plot", plot.args)
    error.bars(sign.lambda * log(cvobj$lambda), cvobj$cvupper, 
        cvobj$cvlo, width = 0.02, col = "darkgrey")
    points(sign.lambda * log(cvobj$lambda), cvobj$cvm, pch = 20, 
        col = "red")
    axis(side = 3, at = sign.lambda * log(cvobj$lambda), labels = paste(cvobj$nz), 
        tick = FALSE, line = 0)
    abline(v = sign.lambda * log(cvobj$lambda.min), lty = 3)
    abline(v = sign.lambda * log(cvobj$lambda.1se), lty = 3)
    invisible()
}
KarimOualkacha/HHSVM-ClusterNet documentation built on Feb. 24, 2018, 11:28 a.m.