R/MgRefit.R

MgRefit <- function(object,data,step,silent=FALSE,verbose=FALSE){
  object$call$data <- data
  try2fit <- try(refit <- eval(object$call),silent=silent)
  if (inherits(try2fit,"try-error")==TRUE){
    if (verbose==TRUE)
      warning(paste("During bootstrapping: model ",class(object)," failed in step ",step),immediate.=TRUE)
    NULL
  }
  else{
    refit$call$data <- NULL
    refit
  }
}

Try the ModelGood package in your browser

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

ModelGood documentation built on May 2, 2019, 5 p.m.