R/print.NSM3Ch6MCc.R

Defines functions print.NSM3Ch6MCc

Documented in print.NSM3Ch6MCc

print.NSM3Ch6MCc <-
  function(x,...){
    if(x$method!="Exact"){
      cat(paste0("\n",x$method, " Approximation "))
      if(x$method=="Monte Carlo"){cat("(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 experimentwise alpha=", x$alpha, ", the approximate upper cutoff value is ",x$stat.name, "=",x$cutoff.U, ",\n"))      
    } else{
      cat(paste0("For the given experimentwise alpha=", x$alpha, ", the upper cutoff value is ",x$stat.name, "=" ,x$cutoff.U, ",", " with true experimentwise 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.