R/compare_p_values.R

Defines functions compare_p_values

Documented in compare_p_values compare_p_values

compare_p_values <- function(pval, pval2, stat, stat2) {
  if ( length(pval) == 0 | length(pval2) == 0 | length(stat) == 0 | length(stat2) == 0 ) {
    return(FALSE);
  } else {
    if ( is.na(pval2)  | is.na(stat2)  | is.na(pval) | is.na(stat) ) {
      pval2 = 0.0;
      return(FALSE);       #(pval < pval2);
    } else {
      if ( pval == pval2 ) {
        return (stat > stat2);
      } else {
       return ( pval < pval2);
      }
    }
  }
}

Try the MXM package in your browser

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

MXM documentation built on Aug. 25, 2022, 9:05 a.m.