R/print.cv.npmr.R

Defines functions print.cv.npmr

Documented in print.cv.npmr

print.cv.npmr <-
function(x, ...) {

    rank = qr(x$fit$B[,,1])$rank
    error = x$error[which(x$lambda == x$lambda.min)]/x$n

    cat('\n Call:\n')
    print(x$call)
    cat('\n')
    cat('Optimal lambda: ')
    cat(x$lambda.min, '\n')
    cat('Rank of fitted coefficient matrix: ')
    cat(rank, '\n')
    cat('Mean CV error: ')
    cat(error, '\n\n')
}

Try the npmr package in your browser

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

npmr documentation built on May 2, 2019, 3:16 p.m.