R/test_stat.R

Defines functions test_stat

Documented in test_stat

#' @export

## function to compute test statistic 

test_stat = function(F1, F2){
  Fest = rbind(F1, F2);
  difference <- matrix(apply(Fest,2,diff), ncol=1);
  if(dim(Fest)[2]==1){
    ## single point
    out <- apply(abs(difference),1,max)
  } else {
    out <- apply(abs(difference),2,max)
  }
  return(out)
}

Try the GSSE package in your browser

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

GSSE documentation built on May 2, 2019, 12:40 p.m.