R/summary.lmfm.R

Defines functions summary.lmfm

Documented in summary.lmfm

#' Comparison Summaries for Linear Regression Models
#' 
#' Compute a summary of each model in an \code{lmfm} object.
#' 
#' 
#' @param object an \code{lmfm} object.
#' @param correlation a logical value.  If TRUE, the correlation matrices for
#' the coefficients are included in the summaries.
#' @param \dots additional arguments required by the generic
#' \code{\link{summary}} function.
#' @return a list with class summary.lmfm whose elements are summaries of each
#' model in \code{object}.
#' @keywords methods regression
#' @examples
#' 
#' data(stackloss)
#' m1 <- lm(stack.loss ~ ., data = stackloss)
#' m2 <- lm(stack.loss ~ . - Acid.Conc., data = stackloss)
#' 
#' fm <- fit.models(m1, m2)
#' print(fm.sum <- summary(fm))


#' @export
summary.lmfm <- function(object, correlation = FALSE, ...)
{
  object <- lapply(object, summary, correlation = correlation, ...)
  oldClass(object) <- "summary.lmfm"
  object
}

Try the fit.models package in your browser

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

fit.models documentation built on Aug. 2, 2020, 5:06 p.m.