R/print.method.R

Defines functions print.method

##' @export
print.method <- function(x,...){
  if (x$name=="no plan")
    return(cat("\nNo data splitting: either apparent or independent test sample performance\n"))
  cat("\nMethod for estimating the prediction error:\n")
  if (x$internal.name=="crossval"){
    cat("\n",x$name,"\n\n")
    cat("Repeat: ",x$B,"\n")
  }
  else{
    if (x$internal.name=="loocv"){
      cat("\n",x$name,"\n\n")
    }
    else{
      cat("\nBootstrap cross-validation\n\n")
      if (x$M<x$N)
        cat("Type: subsampling\n",x$M," out of ",x$N,"\n\n")
      else
        cat("Type: resampling\nBootstrap sample size: ",x$N,"\n")
      cat("No. bootstrap samples: ",x$B,"\n")
    }
    cat("Sample size: ",x$N,"\n")
  }
}

Try the pec package in your browser

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

pec documentation built on April 11, 2023, 5:55 p.m.