R/owa.R

owa<-function (x,y) 
{
  C5 = numeric()
  diff = y-x
  for(i in 1:length(x)){
    for(j in i:length(y)){
      C5 = c(C5, (diff[i]+diff[j])/2)
    }
  }
  owa=sort(C5)
  h.l = median(owa)
  list(owa=owa, h.l =h.l)
  
}

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.