R/anova.fitmodel.r

Defines functions anova.fitmodel

Documented in anova.fitmodel

#' @name anova.fitmodel
#'
#' @title Analysis of Variance of fitted model
#'
#' @description Produces an analysis of variance of the "fitmodel" object
#'
#' @param object fitmodel object
#' @param ... other parameters passed to \code{anova}
#'
#' @importFrom "stats" "anova"
#'
#' @export

anova.fitmodel <- function(object, ...){

  if(class(object)[1] != "fitmodel")
    stop("Object is not of class 'fitmodel'.\n")




  if(length(object) == 2)
     anova(object$gam, ...)
  else
     NextMethod("anova")

}
pkuhnert/LRE documentation built on March 4, 2021, 2:50 a.m.