R/check_assumptions.R

Defines functions check_assumptions

check_assumptions <- function(object, method, std) {
  

  if (!inherits(object, "lm")) { 
    stop(paste0(object, "is of class", class(object), " but it needs to be of 
                class lm." ))
  }
  if (!is.logical(std) || length(std) != 1) {
    stop("std must be a logical value. Set std to TRUE or FALSE.")
  }
  if (!(method %in% c("ml", "skew", "kurt", "div.ks", "div.cvm", "div.kl" 
                      #,"reml", "pskew"
  ))) {
    stop(paste0(method, " is not a supported estimation method. 
                Please provide valid variable name for method."))
  } 

}

Try the trafo package in your browser

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

trafo documentation built on May 2, 2019, 2:13 p.m.