R/print.NSM3Ch5c.R

Defines functions print.NSM3Ch5c

Documented in print.NSM3Ch5c

print.NSM3Ch5c <-function(x,...){
  
  if(x$method!="Exact"){
    cat("\n",x$method, " Approximation ")
      if(x$method=="Monte Carlo"){cat("(with ",x$n.mc, " Iterations) ")}
    cat("used: \n \n")
  }
  cat(paste0("Number of X values: ", x$m, " Number of Y values: ", x$n, "\n"))
  
	if(x$method!="Asymptotic"){
	  if(!is.null(x$two.sided)){
      cat(paste0("For the given alpha=", x$alpha, ", the lower cutoff value is ",x$stat.name,"=",x$cutoff.L, ",\n", "with true alpha level=",round(x$true.alpha.L,4), "\n"))
    }  
	 	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(x$method=="Asymptotic"){
		if(!is.null(x$two.sided)){
			cat(paste0("For the given alpha =", x$alpha, ", the approximate lower cutoff value is ",x$stat.name,"=",x$cutoff.L, "\n"))
		}		
		cat(paste0("For the given alpha =", x$alpha, ", the approximate upper cutoff value is ",x$stat.name, "=",x$cutoff.U, ",\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.