R/print.NSM3Ch6c.R

Defines functions print.NSM3Ch6c

Documented in print.NSM3Ch6c

print.NSM3Ch6c <-
function(x,...){
  if(x$method!="Exact"){
    cat(paste0("\n",x$method, " Approximation "))
    if(x$method=="Monte Carlo"){cat(paste0("(with ",x$n.mc, " Iterations) "))}
    cat("used: \n \n")
  }
  
  if(is.null(x$trt)){
    cat("Group sizes:", x$n, "\n")
  }
  
  if(!is.null(x$trt)){
    cat("Control group size:", x$trt, "Treatment group size(s): ", x$n, "\n")
  }
  
  if(x$method=="Asymptotic"){  
    cat(paste0("For the given alpha=", x$alpha, ", the approximate upper cutoff value is ",x$stat.name, "=",x$cutoff.U, ",\n"))
  } else{
    cat(paste0("For the given alpha=", x$alpha, ", the upper cutoff value is ",x$stat.name, "=" ,x$cutoff.U, ",\n", "with true alpha level=",round(x$true.alpha.U,4), "\n"))
  }
  if(!is.null(x$extra)){
    cat(x$extra, "\n")
  }
}

Try the NSM3 package in your browser

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

NSM3 documentation built on Sept. 8, 2023, 5:52 p.m.