R/plot.grouped.R

"plot.grouped" <-
function(x, B = 100, sub.caption = deparse(formula(x)), ...){
    if(!inherits(x, "grouped"))
        stop("Use only with 'grouped' objects.\n")
    sub. <- x$call
    r <- residuals(x, B = B)$residuals
    fits <- fitted(x)
    plot(fits, r, ylab = "Residuals", xlab = "Fitted values",
                main = "Residuals vs Fitted", ...)
    abline(h = 0.0, lty = 2)
    title(sub = sub.caption, ...)
    invisible()
}

Try the grouped package in your browser

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

grouped documentation built on May 2, 2019, 2:42 a.m.