R/confusion.fda.R

confusion.fda <-
function (object, data, ...) 
{
    if (missing(data)) 
        return(object$confusion)
    Terms <- terms(object)
    attr(Terms, "intercept") <- 0
    m <- model.frame(Terms, data)
    x <- model.matrix(Terms, m)
    g <- model.extract(m, "response")
    confusion.default(predict(object, x, ...), g)
}

Try the mda package in your browser

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

mda documentation built on July 9, 2023, 7:14 p.m.